Hacker News new | ask | show | jobs
by goto11 1062 days ago
Dijkstra have a certain way of writing as if his argument follows by logical necessity. But when you dig into the chain of reasoning, it hinges on the assertion that starting with 0 is "nicer". Which is of course a valid opinion, but starting with 1 also have nice properties, for example that the numbering of elements corresponds to the ordinal numbers. Having the first element be element 1 is pretty nice IMHO.

He ends with the assertion "In corporate religions as in others, the heretic must be cast out not because of the probability that he is wrong but because of the possibility that he is right." This sounds profound and edgy but is just an appeal to contrarians which can be used to justify absolutely anything. You criticize my theory X, that just shows how right I am! And anyway, isn't the "corporate religion" these days to start with 0, since this as what the big mainstream languages does?

2 comments

Yes, I also had found that paper to be surprisingly and disappointedly hand wavey. "Don't meet your heroes" type of thing. Math does not care about pointer arithmetic and i in summation and induction starts at 1. Same in Julia. It's an higher level accommodation to machine code primitives, which are indeed less gate expensive if indexes start at zero.
In addition to code, I think 0-indexing is also a nice convention for floor numbering. That way the Nth floor is N floors up from the ground level. This is already how basement levels work.
0-based floor numbering is infuriating. Telling someone that you live on the third floor which is actually numbered 2 is honestly dumb. I had to emigrate from the 1-based floor country a year ago and first floor numbered 0 is still throwing me off sometimes. And every single time I want to raise attention to a window somewhere.
If we admit negative numbers for basements, then were are not using the natural numbers anymore. This is a completely different question since the integers does not have a beginning.
I agree. Touche!
This is not a 6-hour slow risposte; it's my 6 hour anti procrastinate filter I swear. Anyway, just like all animals of habit, I immediately I agreed with floor zero because I come from a place where the lowest floor is not floor 1 (unlike the US). However, I can see somebody saying floor is the height of the ceiling, so floor 1 = 10 feet; floor 0 (underground) 0 feet. One thing we can all agree is that the calendar, without a zero, it's pretty bad.
I’m not sure about this. I’ve seen more index from 0 for induction and summation in Analysis.
"And anyway, isn't the "corporate religion" these days to start with 0, since this as what the big mainstream languages does? "

Exactly this. Our firm had been forced to change numbering of real-life items from 1-based to 0-based, because some cargo-cultist somewhere was amazed by the offsets and addresses and wanted to force this numbering scheme everywhere. Now there is a code inside that converts 1-based items to 0-based for legacy stuff, and we are still finding bugs caused by that. Every day to day operations are artificially harder because understanding what is actually unit number 1 or port number 2 is hard now, just like counting total number of anything and remembering to add 1 afterwards. But now we get to have a hype 0-based everything system, which nobody asked for. In some cases this can lead to such awesome combos like physical ports numbered 1-based, then 3rd party switch with 0-based, then Linux interface on top 1-based, then our config on top 0-based. Amazing and convenient, isn't it?:)