1161
Off by one solitude (fed.dyne.org)
you are viewing a single comment's thread
view the rest of the comments
[-] tiredofsametab@fedia.io 1 points 4 hours ago

I've been a software engineer for almost 20 years now. 'A', at index 0*, is the first thing in the array.

* well, unless you're using some language that actually is not zero-indexed. I think LUA is one?

[-] NateNate60@lemmy.world 1 points 4 hours ago

That's because you use English, a language where ordinals traditionally begin at one.

[-] tiredofsametab@fedia.io 1 points 3 hours ago

So, based on

Every programmer knows that 'A' in ['A', 'B', 'C', 'D'] would be the 0th item; the first item is 'B'

You're saying I can't be a programmer because I speak English?

[-] NateNate60@lemmy.world 1 points 3 hours ago

No, what I said is true if you use zero-based numbering. But when communicating with others in English, the label "first" refers to the element with the smallest index. In zero-based numbering, the label "zeroth" refers to the element with the lowest index. It's just not the default in English, but you can definitely use zero-based numbering in English if you're willing to edit the configuration files.

this post was submitted on 19 Sep 2024
1161 points (98.4% liked)

Programmer Humor

32048 readers
2201 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS