News for hackers. Stuff that matters.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by js2 on Saturday August 18, 2018 @12:36PM (#17789249)
Yes, but do you start at 0 or 1? Also, is the last step you take onto the floor/landing counted?

And when going down, do you use negative numbers?

So many questions left unanswered. I feel you aren't a true stair counting nerd afterall.

:-)

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.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by davchana on Saturday August 18, 2018 @02:30PM (#17789827)
For me, I have always counted it as a step if my foot-in-the-air lands on a different level than the other foot.

So, if I am walking; & approach a flight of stairs going upwards, before until my both feet are on same plane, stairs have not started & I can't start counting. As soon as I step "up", my feet is on different (higher in this case going upwards), I count it as first stair. Same on the other side. I continue counting till I am stepping up. As soon as I land my both feets on same level; any foot-step after that doesn't get counted in step-count.

Other way to count steps are imagine if we look ar stairs' drawing or cross-section view from side; i.e. a right-angled zig-zag line going up. On both ends, ground & landing lines are also there i.e. the drawing has always a horizontal line on upper & lower side representing floor & landing. This line is from bottom-left; going upwards towards top-right; the drawing's triangular section of bottom-right is, assume, filled in with concrete/anything; & a person walks on left-top section.

Any 90 degree outward bend on this side is a step.

           ┍────   
          ┍┙
         ┍┙
        ┍┙
   ────┙
Four steps in above.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by Someone on Saturday August 18, 2018 @03:15PM (#17790077)
”I have always counted it as a step if my foot-in-the-air lands on a different level than the other foot.”

That algorithm doesn’t count steps of a stair, it counts the number of steps you take to go up (or down) a staircase.

Those are different if you follow this nerd’s way, which, by the way, has benefits other than making it easier to count stairs. It’s a fairly easy way to get some strength training. I think everybody who can should take stairs two steps at a time. That gives you some cushion in old age, as you’ll be able to go back to one step at a time, and postpones the day where taking a stair becomes impossible.

If two steps is easy, you can make going up harder (I don’t advise that going down stairs) by sitting deeper, with your thighs horizontally, or by taking three steps at a time (four steps is out of reach for most)

Re:A Nerd’s Way to Walk Up the Stairs (2011) by TheSpiceIsLife on Saturday August 18, 2018 @03:40PM (#17790198)
Would taking two steps at a time in this was possibly cause more knee-joint wear?
Re:A Nerd’s Way to Walk Up the Stairs (2011) by Someone on Saturday August 18, 2018 @03:48PM (#17790259)
It increases forces on the joint, but I think the benefits of having stronger muscles more than compensate for that. That will be dependent on various factors, though (leg length, fitness, weight, tiredness, to mention a few. I rarely do three anymore, and go back to one sometimes)
Re:A Nerd’s Way to Walk Up the Stairs (2011) by NeedMoreTea on Saturday August 18, 2018 @01:15PM (#17789453)
Please don't. It's bad enough that the US and UK can't agree on floor numbering. :)

  USA 1st, 2nd, 3rd
  UK Ground, 1st, 2nd
Is the basement in the US 0?
Re:A Nerd’s Way to Walk Up the Stairs (2011) by jacobolus on Saturday August 18, 2018 @01:21PM (#17789493)
No, like the creator of the Anno Domini system https://en.wikipedia.org/wiki/Year_zero, American elevator labelers do not believe in “unnatural” numbers < 1. Below the “first floor” they jump straight to B1.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by js2 on Saturday August 18, 2018 @01:30PM (#17789537)
Some US buildings also skip the 13th floor. Does the UK share this superstition?
Re:A Nerd’s Way to Walk Up the Stairs (2011) by Symbiote on Saturday August 18, 2018 @01:59PM (#17789665)
Occasionally, in buildings designed for American businesses, like some of the large bank buildings.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by notyourwork on Saturday August 18, 2018 @03:12PM (#17790062)
Basement is -1
Re:A Nerd’s Way to Walk Up the Stairs (2011) by _emacsomancer_ on Saturday August 18, 2018 @06:26PM (#17791176)
In the US or UK system? And, in any case, then what is 0?
Re:A Nerd’s Way to Walk Up the Stairs (2011) by phyzome on Saturday August 18, 2018 @08:38PM (#17791764)
Stairs are counted by their risers.
Re:A Nerd’s Way to Walk Up the Stairs (2011) by modells on Saturday August 18, 2018 @04:17PM (#17790418)
Subterranean floors should be numbered negatively.

And, why not number floors using binary or hex?

;)

Re:A Nerd’s Way to Walk Up the Stairs (2011) by sriku on Saturday August 18, 2018 @04:35PM (#17790507)
In India, not only are ground floors often numbered 0, subterranean ones are in many places numbered -1, -2.