News for hackers. Stuff that matters.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by CydeWeys on Saturday August 18, 2018 @12:53PM (#17789343)
I know you're joking, but the number of steps is well defined and doesn't vary as it's essentially a difference. The difference between two numbers is always the same regardless of whether you're using a 0-indexed or a 1-indexed base system. E.g. regardless of whether you call an element in an array [1] or [2], it's still two elements away from whatever is [3] or [4] -- the number of stairs climbed is the same.

So you're free to use either top-stepian or bottom-stepian notation when counting stairs and you'll get to the same answer either way. So it's just an implementation detail that's left undefined in the spec.

Re:A Nerd’s Way to Walk Up the Stairs (2011) by jacobolus on Saturday August 18, 2018 @01:15PM (#17789452)
0-indexing steps is clearly the only reasonable choice. Who in their right mind would call the ground the “first step”?
Re:A Nerd’s Way to Walk Up the Stairs (2011) by davchana on Saturday August 18, 2018 @02:32PM (#17789841)
Ground is never a step; zero or one; not. Because while we are on ground; we are on same level, stairs have not started yet. As soon as we put our foot on upper level than the other foot, stairs have started & that upper foot marks the / lands on "first" step.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by DougBTX on Saturday August 18, 2018 @03:12PM (#17790061)
Following the principle that array indexes are “between” the elements, the bottom of the first step is 0, and the top of the first step is 1. Then the ground, which is equal in elevation to the bottom of the first step, is at 0, and the floor after the last step is N, one past the index of the last valid step, N-1.

Half open zero based ranges are quite satisfying :-)

Re:A Nerd’s Way to Walk Up the Stairs (2011) by exegete on Saturday August 18, 2018 @05:07PM (#17790691)
I think it's the same people who call the ground floor the first floor. Coincidentally, I often have an off-by-one error in elevators.