The 7 Deadly Sins Of Programming

  1. 2 months ago

    Kimball L

    May 13 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    -image-

  2. Norman P

    May 13 Pre-Release Testers, Xojo Pro www.great-white-software.com/b...

    not a 0 based list ? :P

  3. Kimball L

    May 13 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    1-based arrays are the first deadly sin, if you ask me.... But I wasn't going to bring that up, given certain details in Xojo's implementation of things....

  4. Norman P

    May 13 Pre-Release Testers, Xojo Pro www.great-white-software.com/b...

    I've always though that
    0 based = offsets
    1 based = indexes

    but .....

  5. Karen A

    May 13 Pre-Release Testers

    @Norman P I've always though that
    0 based = offsets
    1 based = indexes

    but .....

    I agree with you, though Xojo inc does not.

    IMO Indexes starting from 1 are less "geeky" so more intuitive to the non programmer ... After all how do you stand in the 0th position in line? That would apply to the first element of an array or character position in a string, so I would think that would be confusing to beginners.

    - karen

  6. Emile S

    May 13 Europe (France, Strasbourg)

    #8: I will deliver your software by tomorrow.

  7. Louis D

    May 13 Pre-Release Testers, Xojo Pro Montreal, QC, Canada

    IMO Indexes starting from 1 are less "geeky" so more intuitive to the non programmer ... After all how do you stand in the 0th position in line? That would apply to the first element of an array or character position in a string, so I would think that would be confusing to beginners.

    I disagree. Is a mile more intuitive than a kilometer? I think it is just the same. Beginners will learn to use the language the way it is with kilometers or miles, just the way it is. Old timers will have a much harder time adjusting if it changes.

  8. Karen A

    May 13 Pre-Release Testers

    @LouisDesjardins I disagree. Is a mile more intuitive than a kilometer?

    Apples and oranges....miles and kilometers are totally arbitrarily defined. Counting things is not.

    I can deal with either... the issue most have with indexes in Xojo is that in some cases they are 1 based and in other cases 0 based... and THAT is the core issue.

    That said, I don't see how anyone can argue that to a non-programer 1 based would be more intuitive because of how people think about real world things.

    - Karen

  9. Louis D

    May 13 Pre-Release Testers, Xojo Pro Montreal, QC, Canada

    I think I just did. ;-)

  10. Kimball L

    May 13 Pre-Release Testers, Xojo Pro Meridian, ID, USA

    The vast majority of other languages / environments start indexing everything at 0 - arrays, string character positions, lists, etc... everything starts with a 0th element. You can say that "non-programmers" think this is hard to understand, but the fact of the matter is that anyone who wants to use xojo is trying to be a programmer on some level, and I'd MUCH rather have xojo follow industry-wide practices with things like this, as it makes the language that much easier to adopt for people who are programmers, and it makes moving to other languages for people who learned on xojo easier as well.

    For example, would a middle-school technology teacher be happy to use a language that has some really oddball ways of doing things, knowing that their students will shortly (in high school or university) be exposed to heavyweight standards like java, C, php, C#, swift, etc? Indexing anything should start at 0. Period. Languages that index anything starting at 1 are oddball, and make adoption that much more difficult.

    However, Xojo is the worst offender I've ever seen in this regard, with some things 0-based and other 1-based. That's confusing to everyone, programmer or non-programmer alike. I'm glad to have heard that everything is moving to 0-based in the upcoming new framework.

  11. Paul L

    May 13 Xojo Inc http://docs.xojo.com

    Saw this 0-based sign when I was in Germany last fall:

    -image-

  12. Joost R

    May 14 Pre-Release Testers, Xojo Pro The Netherlands

    @Paul L Saw this 0-based sign when I was in Germany last fall:

    A sign in a department store where the levels are given compared to the street-surface. The comparison is wrong since you can have a department in the basement, which is -1. I guess the logic in the elevator has a zero based counter, where zero is the level to describe that the chains are broken.

  13. Tim S

    May 14 Canterbury, UK

    @Paul L Saw this 0-based sign when I was in Germany last fall:

    That's perfectly standard. 0 is ground floor, 1 is first floor, etc.

    Simples.

  14. Paul S

    May 14 Pre-Release Testers, Xojo Pro Europe (Netherlands, Den Haag)

    @Tim S That's perfectly standard. 0 is ground floor, 1 is first floor, etc.

    The Americans don't have a ground floor.
    They immediately go to the first floor. :D ;)

  15. scott b

    May 14 Pre-Release Testers, Xojo Pro local coffee shop

    @Paul S The Americans don't have a ground floor.
    They immediately go to the first floor. :D ;)

    because we are special....

  16. Norman P

    May 14 Pre-Release Testers, Xojo Pro www.great-white-software.com/b...

    there's a really bad politically incorrect joke just laying there you know ... :P

  17. scott b

    May 14 Pre-Release Testers, Xojo Pro local coffee shop

    @Norman P there's a really bad politically incorrect joke just laying there you know ... :P

    yes. yes I do know.
    we all need some humor these days.

  18. Dale A

    May 14 San Diego, California, USA

    @Paul S The Americans don't have a ground floor.
    They immediately go to the first floor. :D ;)

    And then many buildings make it worse by skipping floor index 13 and calling it 14 instead. So when you are on the 19th floor you are actually on the 18th. Spacial simultaneity, anyone?

  19. Norman P

    May 14 Pre-Release Testers, Xojo Pro www.great-white-software.com/b...

    sounds like superposition in the macro world to me :P

  20. Paul L

    May 14 Xojo Inc http://docs.xojo.com

    @Dale A And then many buildings make it worse by skipping floor index 13 and calling it 14 instead.

    Yeah, the XDC Marrott did not list the 13th floor, skipping from 12 to 14.

  21. Newer ›

or Sign Up to reply!