Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The ground floor is 0. The floor above 0 is 1. The floor below 0 is -1. Anything else is crazy TBH, the whole point of integer numbers is to count things that start at a defined point and go opposite ways. Why shift it and then reinvent weird pseudo-negative numbers like S1?

But then again people measure distance in feet and write dates as month day year :)



It would be nice if this was the case. In grad school I taught in a building that was on a hill and had once been separate buildings so different entrances were on different floor and the transition between the former separate buildings was 4 stairs.

So there was a floor with rooms numbered 1xx and 0xx. There was also a floor below the 0xx floor. They just numbered it 00xx. And you could enter the building on any of those floors depending on what door you picked.

The class I taught was in 0005. Room 005 was someone's office. So on the first day of every semester we would have students waiting outside the door of 005 instead of 0005...


You'd think if they had to go below 0 they could just prefix with a letter, like B (Below? Basement?) B1, B2, etc.


Could this be Dwinelle Hall at UC Berkeley?


nope. IU


Cool, Dwinelle at Berkeley is a fascinatingly bizarre building for seemingly very similar reasons, and (if I remember correctly) also with pretty much the same weird numbering system plus tiny staircases to adjust for mismatched heights between floors!


Counterpoint: because floors are sum types.

Floors 1 through 10 are "regular" floors. L is the lobby. P1 through P3 are the parking (basement) levels.

So you have three types: regular, lobby, and parking. And the elevator labels are of type regular | lobby | parking.

(Now you can't disagree with me because sum types are popular on HN, and I have framed this in terms of sum types.)


Sum types don't automatically define ordering between the possible values AFAIK? So in your implementation you'd have to manually define the

    up: (regular | lobby | parking) -> (regular | lobby | parking)

    down: (regular | lobby | parking) -> (regular | lobby | parking)
and

    which_way: (regular | lobby | parking) x (regular | lobby | parking) -> direction
If you use subset of integers you can just use operators inc, dec and <.

Yeah I know it was a joke.


If I build a building in the shape of a double helix, what order are the two floors in?

Hmm, are there actually an infinite number of floors? Do we need to switch to floating point?


> If I build a building in the shape of a double helix, what order are the two floors in?

Why separate the floors that are on the same level?

> Hmm, are there actually an infinite number of floors?

I assumed there isn't and that we use a subset of integers. If you have infinite number of floors - feel free to use full set of integers (if you have enough memory that is).

> Do we need to switch to floating point?

No point, if you have more than aleph0 floors - floats won't help you.


We have a building at the local university that has ground at one end level with transitory step between floors -1 and 0, you enter the building through the stair well, and descend or ascend to get to a floor. I wouldn't be surprised if an architect designed a building that did this on flat ground, violating the ability to number floors relative to ground with integers.


This is how it should be, but the only country in the world, AFAIK, that does it that way is Germany.


I think the only country i've been which does not do this is the US. It was pretty weird at first


There’s some confusion here about the exact word being used. The German word that is mistranslated here as “floor” is “Stock”, which actually means “addition”. So the floor above the ground floor is the first addition, not the “first floor”.


Not german here, this is standard and I'm a bit confused by your comment.

0 is ground floor.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: