A few days ago I had a crazy idea that counting numbers (first, second, etc) should start with zeroth instead of first. Not only would that help with teaching programming, but also many real world confusions and off-by-one errors would go away. Compare this:
The first year of the third millennium begins at 2001/01/01 00:00:00
to this:
The zeroth year of the 2nd millennium begins at 2000/00/00 00:00:00
Of course that would never happen, but as a thought experiment, I rest my case :-)
With this change, you could no longer say “now that we’ve found the fourth object, we finally have four objects”. You’d have to remember to say “now that we’ve found the third object, we finally have four objects” which seems to be a new opportunity to make off-by-one error. It’s not clear to me that you’d be fixing more errors than you’re introducing. I echo WhySpace’s request for more examples of things you’re trying to fix with this change.
Yes, there will always be some off-by-one errors, so the best we can hope for is to pick the convention that creates less of them. That said, the fact that most programming languages choose the zero-based convention seems to suggest that that’s the best one.
A friend of mine at university made the following observations about this.
The word “first” has no connection with the number 1; it’s originally the same word as “foremost”. So “first” should be the ordinal corresponding to 0.
The word “second” has no connection with the number 2; it’s from the Latin secundus meaning “following”. So “second” should be the ordinal corresponding to 1.
But “third” and later ordinals are actually derived from the cardinates “three” and up.
So we have a gap at 2 which needs a new ordinal. He proposed “twifth”. So: first, second, twifth, third, fourth, etc.
Sarcasm is difficult to assess in online discussions, so I hope you will forgive me if I paraphrase what I think you’re actually saying as follows: “That’s a bloody stupid idea, because if you say 0->first, 1->second then you also need to say 21->twenty-second and that would be incredibly confusing and annoying, so if we switched to zero-based ordinals we definitely should not do that.”
(I’m only ~95% sure you don’t mean it seriously.)
I do not think that counting “first, second, twifth, third, …” implies also counting ”..., nineteenth, twentieth, twenty-second, …” or ”..., nineteenth, twenty-first, twenty-second, …”; one may reasonably be moved more strongly by etymology in some cases than in others. I think we are all very much used to using “first” for the, er, initial item in an enumeration and “second” for the one after it, which is the real reason why the etymological argument has what force it does; the strength of association between ordinal number and position decreases as one moves further down the list, and is entirely gone by the time we’re into the twenties, and analogy is powerful but not that powerful.
I am not particularly endorsing my friend’s proposal, in any case. I’m ambivalent about its actual merits, and in any case I’m not actually going to start numbering ordinals from zero outside mathematics and programming. Mostly, I think it’s amusing.
… But if I were persuaded, it would probably be because by some means currently inconceivable to me the whole anglophone world had been persuaded to rethink its numerical terminology. In that case, I suppose it would be worth considering redefining the “Xty-second” words for consistency.
I think that’s way overconfident. I think the context implies at most a 50% chance of sarcasm.
(Sarcasm, that is, relative to the first comment—I’m suggesting, in other words, that cousin_it’s degree of seriousness did not change much between the two comments.)
No, I was completely serious and I really like your friend’s idea. Sorry if that came across as sarcasm.
As for twentieth vs twenty-first, I think it’s better to keep twentieth, unless you also change the cardinal twenty to twenty-zero, which doesn’t seem useful. So nineteenth, twentieth, twenty-second, twenty-twifth, etc.
My apologies for the misunderstanding. I agree that (conditional on doing all this stuff) you wouldn’t want “twenty-first” corresponding to 20 even if you had “twenty-second” corresponding to 21.
I always have to consciously adjust for off-by-one errors, so this sounded appealing at first. (In the same way that Tau is appealing.)
However, after a bit of thought, I’m unable to come up with an example where this would help. Usually, the issue is that the 7th thru 10th seats aren’t actually 10-7=3 seats, but 4 seats. (the 7th, 8th, 9th, and 10th seats).
Calling them the 6th thru 9th seats doesn’t solve this. Can someone give an example of what it does solve, outside of timekeeping? (i.e., anything that counting time in beats wouldn’t solve?)
The first ten things have one-digit numbers, except the last one which has a two-digit number.
The second ten things have numbers starting with 1, except the last one which starts with 2.
The first thing in the first ten things has number 01, so “first” means simultaneously 0 and 1.
All of those go away with zero-based counting.
Also zero-based counting has many benefits for programming:
The first memory address is all zeroes, not 00000001.
The first grid cell originates at (0, 0), not (1, 1).
The idioms a[i / n], a[i % n], a[i * n + j] don’t work as well with one-based counting.
I think the underlying reason for all of those is the way modular arithmetic works. If a and b are positive integers, then the possible results of both a / b (integer division) and a % b (modulus) range from 0 rather than 1. Since digits in a number, indices in a sequence, etc. are often defined by these operations, zero-based counting feels more natural.
As to your problem, it can be solved by consistently using half-open ranges, which is another good idea that works well with mine :-)
The main examples to me are timekeeping, modular arithmetic, and memory addressing. The first moment of time, the first modulus and the first memory address are all 0. It seems harder to come up with natural examples where the first something is 1.
Your problem would be solved by using half-open ranges everywhere, which is another good idea that works well with mine.
An interesting demonstration of the arbitrariness of ordinal numbers is that Romans didn’t count like we do. They counted sheep like us, but they counted days differently. Our modern calendar goes from the year −1 to the year +1 and you seem to propose going from −0 to +0. But the Roman calendar went from the day −2 to the day +1. Similarly, when the Greeks told them to put in a leap day “every fourth year” they put one in every third year.
Like you said, would never happen, but you aren’t wrong that it’d be better.
Most stuff that a person thinks up is better than the stuff that just kind of develops from people bumping into each other, the hard part is getting everyone to agree to change over.
A few days ago I had a crazy idea that counting numbers (first, second, etc) should start with zeroth instead of first. Not only would that help with teaching programming, but also many real world confusions and off-by-one errors would go away. Compare this:
to this:
Of course that would never happen, but as a thought experiment, I rest my case :-)
With this change, you could no longer say “now that we’ve found the fourth object, we finally have four objects”. You’d have to remember to say “now that we’ve found the third object, we finally have four objects” which seems to be a new opportunity to make off-by-one error. It’s not clear to me that you’d be fixing more errors than you’re introducing. I echo WhySpace’s request for more examples of things you’re trying to fix with this change.
Yes, there will always be some off-by-one errors, so the best we can hope for is to pick the convention that creates less of them. That said, the fact that most programming languages choose the zero-based convention seems to suggest that that’s the best one.
There’s also the revealed word of our prophet Dijkstra: EWD83 - Why numbering should start at zero.
The fact that humans count “one, two, three...” and not “zero, one, two...” does suggest that there is a best one and it’s not zero-based.
Replied to WhySpace, curious what you think.
A friend of mine at university made the following observations about this.
The word “first” has no connection with the number 1; it’s originally the same word as “foremost”. So “first” should be the ordinal corresponding to 0.
The word “second” has no connection with the number 2; it’s from the Latin secundus meaning “following”. So “second” should be the ordinal corresponding to 1.
But “third” and later ordinals are actually derived from the cardinates “three” and up.
So we have a gap at 2 which needs a new ordinal. He proposed “twifth”. So: first, second, twifth, third, fourth, etc.
Yeah, that’s a great upgrade to my idea. Using “twenty-second” for the ordinal following twentieth makes a lot of sense.
Sarcasm is difficult to assess in online discussions, so I hope you will forgive me if I paraphrase what I think you’re actually saying as follows: “That’s a bloody stupid idea, because if you say 0->first, 1->second then you also need to say 21->twenty-second and that would be incredibly confusing and annoying, so if we switched to zero-based ordinals we definitely should not do that.”
(I’m only ~95% sure you don’t mean it seriously.)
I do not think that counting “first, second, twifth, third, …” implies also counting ”..., nineteenth, twentieth, twenty-second, …” or ”..., nineteenth, twenty-first, twenty-second, …”; one may reasonably be moved more strongly by etymology in some cases than in others. I think we are all very much used to using “first” for the, er, initial item in an enumeration and “second” for the one after it, which is the real reason why the etymological argument has what force it does; the strength of association between ordinal number and position decreases as one moves further down the list, and is entirely gone by the time we’re into the twenties, and analogy is powerful but not that powerful.
I am not particularly endorsing my friend’s proposal, in any case. I’m ambivalent about its actual merits, and in any case I’m not actually going to start numbering ordinals from zero outside mathematics and programming. Mostly, I think it’s amusing.
… But if I were persuaded, it would probably be because by some means currently inconceivable to me the whole anglophone world had been persuaded to rethink its numerical terminology. In that case, I suppose it would be worth considering redefining the “Xty-second” words for consistency.
I think that’s way overconfident. I think the context implies at most a 50% chance of sarcasm.
(Sarcasm, that is, relative to the first comment—I’m suggesting, in other words, that cousin_it’s degree of seriousness did not change much between the two comments.)
Evidently you were right. Have an upvote.
No, I was completely serious and I really like your friend’s idea. Sorry if that came across as sarcasm.
As for twentieth vs twenty-first, I think it’s better to keep twentieth, unless you also change the cardinal twenty to twenty-zero, which doesn’t seem useful. So nineteenth, twentieth, twenty-second, twenty-twifth, etc.
My apologies for the misunderstanding. I agree that (conditional on doing all this stuff) you wouldn’t want “twenty-first” corresponding to 20 even if you had “twenty-second” corresponding to 21.
I always have to consciously adjust for off-by-one errors, so this sounded appealing at first. (In the same way that Tau is appealing.)
However, after a bit of thought, I’m unable to come up with an example where this would help. Usually, the issue is that the 7th thru 10th seats aren’t actually 10-7=3 seats, but 4 seats. (the 7th, 8th, 9th, and 10th seats).
Calling them the 6th thru 9th seats doesn’t solve this. Can someone give an example of what it does solve, outside of timekeeping? (i.e., anything that counting time in beats wouldn’t solve?)
Some inconsistencies with one-based counting:
The first ten things have one-digit numbers, except the last one which has a two-digit number.
The second ten things have numbers starting with 1, except the last one which starts with 2.
The first thing in the first ten things has number 01, so “first” means simultaneously 0 and 1.
All of those go away with zero-based counting.
Also zero-based counting has many benefits for programming:
The first memory address is all zeroes, not 00000001.
The first grid cell originates at (0, 0), not (1, 1).
The idioms a[i / n], a[i % n], a[i * n + j] don’t work as well with one-based counting.
I think the underlying reason for all of those is the way modular arithmetic works. If a and b are positive integers, then the possible results of both a / b (integer division) and a % b (modulus) range from 0 rather than 1. Since digits in a number, indices in a sequence, etc. are often defined by these operations, zero-based counting feels more natural.
As to your problem, it can be solved by consistently using half-open ranges, which is another good idea that works well with mine :-)
Of course they’re three seats. “10th” is not a seat, it’s a fencepost! If you want “the 7th, 8th, 9th, and 10th seats” you should say 7th thru 11th.
You should say “7th to 11th”; “thru” (i.e. “through”) specifically implies inclusion of the right endpoint.
(Although unfortunately, “to” doesn’t likewise specifically imply exclusion.)
The main examples to me are timekeeping, modular arithmetic, and memory addressing. The first moment of time, the first modulus and the first memory address are all 0. It seems harder to come up with natural examples where the first something is 1.
Your problem would be solved by using half-open ranges everywhere, which is another good idea that works well with mine.
An interesting demonstration of the arbitrariness of ordinal numbers is that Romans didn’t count like we do. They counted sheep like us, but they counted days differently. Our modern calendar goes from the year −1 to the year +1 and you seem to propose going from −0 to +0. But the Roman calendar went from the day −2 to the day +1. Similarly, when the Greeks told them to put in a leap day “every fourth year” they put one in every third year.
Like you said, would never happen, but you aren’t wrong that it’d be better.
Most stuff that a person thinks up is better than the stuff that just kind of develops from people bumping into each other, the hard part is getting everyone to agree to change over.