-1 points
*

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.

permalink
report
reply
1 point

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…

permalink
report
parent
reply
1 point
*

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.

permalink
report
parent
reply
8 points

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)?

permalink
report
parent
reply
2 points
*

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.

permalink
report
parent
reply
1 point

programmer linguistigs is certainly something to behold.

permalink
report
parent
reply
1 point

They said 1st as an abbreviation of first (it’s a normal abbreviation 1st, 2nd, 3rd … 7th abbreviate first, second, third … seventh)

permalink
report
parent
reply
1 point

Sure, but you have to see how it’s an own goal if you’re showing up to table 0.

permalink
report
parent
reply
0 points

Nonbinary

permalink
report
reply
-6 points
*

Bullshit.

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

permalink
report
reply
-1 points

1st would be ‘B’, first is ‘A’

permalink
report
parent
reply
2 points
*

If you want to be both wrong and confusing

If you want to use correct English and be clear don’t use ordinals: Say “index 0, index 1” etc

Save ordinals for contexts without indices: the first time through this loop, the last record"

permalink
report
parent
reply
1 point

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?

permalink
report
parent
reply
1 point

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

permalink
report
parent
reply
1 point

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?

permalink
report
parent
reply
20 points

That would be wrong in every technical sense. You’re saying that .first() would skip the 0th item.

First = leftmost.

permalink
report
parent
reply
2 points
*

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.

permalink
report
parent
reply
0 points

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.

permalink
report
parent
reply
2 points

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.

permalink
report
parent
reply
6 points

No, there is simply no such thing as “zeroth”, that’s not how ordinal numbers work. If I have the following numbered list:

  1. Foo

  2. Bar

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

permalink
report
parent
reply
66 points

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.

permalink
report
reply
3 points

Or… or… hear me out… one of them turns around on their chair, and says “hey there”.

permalink
report
parent
reply
2 points

They were at the corner

permalink
report
parent
reply
6 points

username checks out

permalink
report
parent
reply
120 points

She is right, using 0 index for physical stuff is stupid.

permalink
report
reply
24 points

Works for floors!

permalink
report
parent
reply
27 points

Not on this side of the pond. We typically don’t have a ground floor, that’s just the first floor.

permalink
report
parent
reply
13 points

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.

permalink
report
parent
reply
9 points

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?

permalink
report
parent
reply
45 points

Your rulers start at 1? That sounds annoying.

permalink
report
parent
reply
4 points

Touchè

permalink
report
parent
reply
20 points

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.

permalink
report
parent
reply
23 points

That’s why decent rulers have a 0 and a margin:

permalink
report
parent
reply
19 points

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.

permalink
report
parent
reply
10 points
*

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.”?

permalink
report
parent
reply
9 points

There’s another way to think about it which I actually use. Look in the empty bin and say “zero”, then move an apple and say “one”.

permalink
report
parent
reply
6 points

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”

permalink
report
parent
reply
8 points

Why? It seems exactly as valid to me, and more valid if you like positional numberings of your physical stuff.

You just count the number of times you departed from an item in order, rather than the times you arrived.

permalink
report
parent
reply
0 points

Guy is wrong. Went to 0th table. She asked for 1st table.

permalink
report
parent
reply
9 points

Blame the restaurant for having a table identified as zero

permalink
report
parent
reply

Programmer Humor

!programmerhumor@lemmy.ml

Create post

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

Rules:

  • Posts must be relevant to programming, programmers, or computer science.
  • No NSFW content.
  • Jokes must be in good taste. No hate speech, bigotry, etc.

Community stats

  • 5.3K

    Monthly active users

  • 884

    Posts

  • 8.9K

    Comments

Community moderators