2090 views

# The 7 Deadly Sins Of Programming

1. last year

### Kimball L

13 May 2019 Testers, Xojo Pro Meridian, ID, USA

2. ### Norman P

13 May 2019 Testers, Xojo Pro outside LMAO !!!!!!!

not a 0 based list ? :P

3. ### Kimball L

13 May 2019 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

13 May 2019 Testers, Xojo Pro outside LMAO !!!!!!!

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

but .....

5. ### Karen A

13 May 2019 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

13 May 2019 Europe (France, Strasbourg)

#8: I will deliver your software by tomorrow.

7. ### Louis D

13 May 2019 Testers, Xojo Pro 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

13 May 2019 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

13 May 2019 Testers, Xojo Pro QC, Canada

I think I just did. ;-)

10. ### Kimball L

13 May 2019 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

13 May 2019 Xojo Inc, Third Party Store

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

12. ### Joost R

14 May 2019 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

14 May 2019 Testers 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

14 May 2019 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

14 May 2019 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

14 May 2019 Testers, Xojo Pro outside LMAO !!!!!!!

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

17. ### scott b

14 May 2019 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

14 May 2019 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

14 May 2019 Testers, Xojo Pro outside LMAO !!!!!!!

sounds like superposition in the macro world to me :P

20. ### Paul L

14 May 2019 Xojo Inc, Third Party Store

@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.