Why the fuck would you spell it “1st” if it’s not 1?
Edit: Which is not pronounced “onest”. I think people might be missing the point here; I’m actually a fan of zero indexing.
Interestingly, we’ve got the same glitch in the Gregorian calendar, where the year 0 doesn’t exist. So the 21st century started in 2001…
Yup. We should really zero-index century names and years AD/BC as well, but we don’t. If we were still using Roman numerals it would be no big deal, but we rarely do, so there’s a confusing clash. I’m not sure if it was this programming humour community or another where I had a big exchange on the topic before.
I suppose you could have some kind of positional system that’s one-indexed, so 999AD = 1111999AD, and 2000 would be written 2111, but you’d have to completely redo the way arithmetic works, and that defeats the point a bit. And, the new 999 would not be our 999, because it’s effectively base 9.
I feel like the joke would’ve landed better if it said “first”. I know it’s pronounced the same way, but I’m gonna argue anyway that there’s a subtle difference. I’ve heard 0th used in cs to describe what was at the 0-index, so in that context 1st would be"second", but “first” generally means “nothing before it”. English is weird. I wonder if anyone knows whether the word “first” or “1st” came 1st (lol)?
Ordinal vs. cardinal. It’s “first” not “onest”, right? Even the ancient proto-Germanic speakers could tell there’s a difference. (In fact, it’s basically a contraction of “foremost”, and has nothing to do with numbers; their weak numeracy was an advantage on this topic)
If we weren’t implicitly choosing 1-indexing it would be 1nd for “second” (and still not “onend” or something). That breaks down once you get to third and fourth, though.
They said 1st as an abbreviation of first (it’s a normal abbreviation 1st, 2nd, 3rd … 7th abbreviate first, second, third … seventh)
Nonbinary
Bullshit.
Every programmer knows that 'A'
in ['A', 'B', 'C', 'D']
would be the 0th item; the first item is 'B'
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?
That’s because you use English, a language where ordinals traditionally begin at one.
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?
That would be wrong in every technical sense. You’re saying that .first()
would skip the 0th item.
First = leftmost.
That’s because the word “first” in first()
uses one-based indexing. In true programmer fashion it would have been called zeroth()
but that is wholly unintuitive to most humans.
I maintain that the element with the lowest index is called the “zeroth” element in zero-based indexing and “first” in one-based indexing. The element with index N is the Nth element.
Indexes start from zero because they’re memory offsets, but array[0]
is still the first element because it’s an ordinal number, not an offset. It’s literally counting each element of the array. It lines up with the cardinality—you wouldn’t say ['A', 'B', 'C']
has two elements, despite array[2]
being the last element.
Most humans wouldd never write the word first
followed by ()
. It absolutely should have been zeroth()
, and would not cause any confusion amongst anyone who needed to write it.
No, there is simply no such thing as “zeroth”, that’s not how ordinal numbers work. If I have the following numbered list:
-
Foo
-
Bar
-
Baz
The first item is “Foo” which is indexed 5. It is not the fifth item, because the item indexed 5 comes first in the list, so the item indexed 5 is the first item. Ordinal numbers don’t refer to index, they refer to order.
And then he texts back ‘where are you?’ And then she texts back ‘the first table’ and he replies ‘umm I’m here too. But I don’t see you’ confused she asks him ’ table 0p?’ And then ‘01*?’ He says ‘no, 00.’ Releaved she says ‘lol I am at table 01’ he chuckles ‘I am at 00, I’ll go find you’
Later they get married and have kids. But relationship collapses and it ruins both of them and they cannot find the heart to love anyone again. Their children grow up broken and struggle through life. Some get arrested end up in prison, all of them repeatedly fall into a series of toxic relationships for the rest of their lives.
Or… or… hear me out… one of them turns around on their chair, and says “hey there”.
She is right, using 0 index for physical stuff is stupid.
i wish the people making buildings around here knew that. some start at floor 3, others at 5. some start at 0. others at 2. every building has its own story. you need to understand the building before you can understand your position in it.
if a building is built into a hillside in the uk and has exits on floors 2 and 5, which would be the ground floor?
I’ve seen a lot of rulers that actually don’t have a mark at 0 and instead go right to the edge as 0. Typically they are worn down, being made of wood, so the accuracy of the first inch is dubious. To ensure the distance is correct, sliding the ruler down one unit is a good idea. So, my ruler starts at 0 but my measurements start at 1.
Rulers measure cardinal quantities and not ordinal ones. There is no cardinal numbering scheme that starts at 1, all of them “start” at 0. For ordinal numbering schemes, the symbols are arbitrary anyway and you can start with whatever you want. It’s equally valid to start with 1, 0, -1, A, or “aardvark”. The only benefit to picking 1 as the start is to make it easier to count with your fingers while picking 0 lets you easily convert an ordinal quantity to a cardinal one.
Your job is to move apples from one bin to another. You pick up the first one and set it in the other bin, and say “zero.”?
When playing games with the kids, we start at 0 being the position you are currently in, then count from there.
e.g. in snakes and ladders, if you are on spot 30 and roll a 5, tap spot 30 and say “zero”, then spot 31 is “one” etc… till you are at spot 35 saying “five”.
Teaches the kids about zero and avoids miss counts from the younger ones counting their current position as “one”