Donald Knuth's <i>The Art of Computer Programming</i> has, in its first volume, a lengthy section on simulating an elevator. It is a single regular elevator (nothing "special" going on as in the post here), but even so, as he tries to make things precise, you realize how much detail is involved, and get some appreciation for the task of programming.<p>It occupies about 15 pages (plus several pages of exercises and solutions). Knuth started working on TAOCP when he was a PhD student at Caltech:<p>> <i>The program developed below simulates the elevator system in the Mathematics building of the California Institute of Technology. The results of such a simulation will perhaps be of use only to people who make reasonably frequent visits to Caltech; and even for them, it may be simpler just to try using the elevator several times instead of writing a computer program.</i> […]<p>> <i>The algorithm we will now study may not reflect the elevator’s true principles of operation, but it is believed to be the simplest set of rules that explain all the phenomena observed during several hours of experimentation by the author during the writing of this section.</i> […]<p>> <i>The elevator system described above is quite complicated by comparison with other algorithms we have seen in this book, but the choice of a real-life system is more typical of a simulation problem than any cooked-up “textbook example” would ever be.</i><p>It ends with:<p>> <i>It is hoped that some reader will learn as much about simulation from the example above as the author learned about elevators while the example was being prepared.</i><p>And one of the exercises adds:<p>> <i>It is perhaps significant to note that although the author had used the elevator system for years and thought he knew it well, it wasn’t until he attempted to write this section that he realized there were quite a few facts about the elevator’s system of choosing directions that he did not know. He went back to experiment with the elevator six separate times, each time believing he had finally achieved a complete understanding of its</i> modus operandi. <i>(Now he is reluctant to ride it for fear that some new facet of its operation will appear, contradicting the algorithms given.) We often fail to realize how little we know about a thing until we attempt to simulate it on a computer.</i>
Deviant Ollam & Howard Payne did a great talk on Elevator Hacking at Def Con 22.<p>You can catch it at:<p><a href="https://archive.org/details/Defcon22_Talk29/DEF+CON+22+Hacking+Conference+Presentation+By+Deviant+Ollam+%26+Howard+Payne+-+Elevator+Hacking+-+From+the+Pit+to+the+Penthouse+-+Video+and+Slides.m4v#" rel="nofollow">https://archive.org/details/Defcon22_Talk29/DEF+CON+22+Hacki...</a><p>or<p><a href="https://www.youtube.com/watch?v=oHf1vD5_b5I" rel="nofollow">https://www.youtube.com/watch?v=oHf1vD5_b5I</a> [01:00:15]
I found a "mode" in an elevator in India that I have not seen anywhere else: if a destination floor number is highlighted, and you press it twice, it gets cancelled. I have used this magic power just once, when an obnoxious man got on and insisted on having a loud conversation on his phone. Since he wasn't paying attention, I double-tapped his floor number and made him skip. I happened to get off at the floor before his, so the elevator went down to the first floor after dropping me off. Small pleasures....
My favorite interview question is "how do elevators work"?<p>0. If they immediately blurt out something like "I know how elevators work", probably don't hire them.<p>1. You can find out what areas they're most interested in. Do they jump straight to the physical mechanics? The programming? The UI? The abstraction that they're solving a problem?<p>2. Eventually, they reach a point where they just have to say "I don't know". The rabbit hole really just keeps going with elevators. You could know this question is coming and we will still easily reach the knowledge boundary.<p>3. If they "don't know" you can ask them to guess how a system might work. Or give them time to research it and follow up with you later.
The elevator in the apartment building I currently live in has a quirk which adds ~2s to the travel. If you know this quirk you can save the ~2s on each use.<p>So if you just pick the floor then it waits 2 seconds before closing the door. Obviously the elevator waits for the door to get fully shut before it starts moving.<p>If you first press the "shut door" button and then the floor button, then the door shuts within any delays, which means the elevator starts moving 2 seconds earlier.
If you're interested in elevators and the hacking thereof I would also highly recommend this talk: <a href="https://youtu.be/ZUvGfuLlZus" rel="nofollow">https://youtu.be/ZUvGfuLlZus</a>
Related, Elevator Saga. <a href="https://news.ycombinator.com/item?id=27487111" rel="nofollow">https://news.ycombinator.com/item?id=27487111</a><p>A game where you program the logic of elevators to move people around efficiently. Surprisingly complicated.
One time when working as a pentester, we were doing redteaming (read: breaking into target buildings, physically). Well, they were doing redteaming; I always wanted to, but never quite got the opportunity.<p>One of the ideas thrown around for achieving the objective was to somehow get ahold of an elevator key, stop it, and hide in there until the building closed.<p>I don't know if they actually did that, but it would've been hilarious to see them pop out like a scoobie doo villain and jack into an ethernet port while the janitor has no idea what's going on.
Slightly off-topic, but I'd definitely recommend Colson Whitehead's _The Intuitionist_[1] for anyone interested in the intersection of elevators and speculative mysteries. Never thought I'd get the chance to post this to an HN thread...<p>[1] <a href="https://en.wikipedia.org/wiki/The_Intuitionist" rel="nofollow">https://en.wikipedia.org/wiki/The_Intuitionist</a>
"pet mode" reminded about my cat many years ago - we lived on the 5th floor of an apartment building, and going outside the cat would walk the stairs down, yet coming back the cat would sit near elevator on the ground floor until somebody would come to use the elevator and everybody knew that "the white cat rides to the 5th floor" so they would let him out there.
If says this about 'Pet Mode'<p>> Does not infect other passengers if the animal has an infection<p>I think this must be a mistranslation. There are very few infectious diseases that a human can get from being around a house pet. I think they mean allergies.
I had read somewhere that holding the boor close button along with your desired floor button will override the que in many elevators, taking you directly to that floor. I successfully tested the button combo in the elevator in my building. It came in handy when a kid pressed all the buttons and then stuck his tongue out at me.
Another dumb story from "back in my day". When I was in college way back in 1976, me and my Best friend back then both had graduated early and had to live in the dorm the first year until we were 18. The dorm they made us stay in was 6 stories and had a crappy old elevator. Being a couple of goofy hacker types with nothing better to do on a weekend, we figured out how to get up on top of the elevator and to use the alternate control panel up there. We sat up there and could control it, people would get on, we could listen to them talk, stop the elevator between floors and they would get all scared, we would flicker the lights on and off, make it go to the wrong floor and so forth. Pretty fun stuff for a couple of nerds.<p>We got bored with that pretty quickly until, 4 gals form the girls floor decided they were going to camp out in there and set the Guinness record for the longest stay in an elevator. Some of the bigger dudes knew that we had hacked the elevator and asked us if we wanted to mess them up. Well... Of course. So we got on top and were listen to them yakkedy yak. Then we took it to between the 6th and 5th floors and locked it in place, then opened the upper doors on the 6th floor where a bunch of guys with big trash cans full of water were waiting.<p>We thought they were just going to douse them good. So we opened the ceiling trap door to the elevator with the lights off and those gals were screaming and squealing like crazy. Then come dude tossed a string of fire crackers in there followed by two giant Garbage cans of water right after that. Must have been at least a couple hundred gallons of water, who knows.<p>Then we set the thing to go to the first floor and jumped off. Waiting on the first floor where a bunch of people who were in on it with cameras to capture the whole things as the doors opened it was like the seas parting and flooding out as these poor drenched young ladies came floating out. Picture was on the front page of the school paper "Guinness Elevator Record Attempt Drenched" or something.<p>They called the cops and all that but no one squealed on us and it was all in good fun but to teach everyone a lesson they shut down the elevators for 3 weeks. Young people don't care, worth a climb of the stairs for all the fun!<p>BTW, I ended up marrying one of the gals on the elevator and yes I told her I was in on it, later. She loved that for some reason :)
Another such list is on Wikipedia: <a href="https://en.wikipedia.org/wiki/Elevator#Special_operating_modes" rel="nofollow">https://en.wikipedia.org/wiki/Elevator#Special_operating_mod...</a><p>Wiki lists a "Riot mode", which is just amazing if it's a thing.
Since we’re talking about elevators, it would appear anyone can call the elevator’s emergency phone line. Which is good, but also has unintended consequences: <a href="https://vm.tiktok.com/ZMdXyQ5ra/" rel="nofollow">https://vm.tiktok.com/ZMdXyQ5ra/</a>
I wondered why, during the pandemic, it wasn't common to let elevators "air out" while they were idle. Given what we know about COVID-19 and how it spreads with aerosols. From looking at this list, it appears that that's not a mode they would have by default.
My university had an elevator with a special three-button keypress that took you to a dark sub-basement full of asbestos warnings and terrifyingly dark that wasn't listed on the display.
ALMOST HUMAN<p><pre><code> The thinking elevator,
so the makers proudly say,
will optimize its program
in an almost human way.
And truly, the resemblance
is uncomfortably strong:
it isn't merely thinking,
it is even thinking wrong.
</code></pre>
(Piet Hein, 1973)
I ran into <a href="https://www.youtube.com/watch?v=ZUvGfuLlZus" rel="nofollow">https://www.youtube.com/watch?v=ZUvGfuLlZus</a> (Elevator Hacking: From the Pit to the Penthouse) awhile back, and it was so interesting to me that I ended up watching the entire 2 hours in one sitting.
There is also riot mode, where it won't stop on the first floor. It's used to stop people from just running in off the street and using elevators.
Maybe this is common knowledge, but I never knew people used fandom for topics like this. I’m amazed that it had 800+ articles and over 1000 videos on a wiki dedicated to elevators.
The elevator in my building only lets you select one floor. Accidentally press the one above yours? Now you have to go there first.<p>Any idea what the purpose of that is? Price discrimination? Abuse prevention? "Well, the ancient elevator did it that way and we want the new one to be the same" backwards "compatibility"?
I recall hearing of a mode one time where elevators would only go to the 2nd floor and not the 1st. Something for crime, etc.<p>Maybe it was from a movie or something ...<p>Edit : Thanks! Found it - <a href="https://en.wikipedia.org/wiki/Elevator#Riot_mode" rel="nofollow">https://en.wikipedia.org/wiki/Elevator#Riot_mode</a>
I’ll just leave this here… I love this guy, he is so passionate about mechanical stuff. A bit on the odd side but a lot of heart.<p><a href="https://youtube.com/c/WestCoastElevators" rel="nofollow">https://youtube.com/c/WestCoastElevators</a>
I was electrocuted fucking around with an old elevator once. Now I just get on it and travel to my destination. :) A very humbling experience to have happen in front of your peers.
Not sure if it's still true, but if to pick up the emergence phone (but don't push the call button) you could often use DTMF tones to call a number for free.
my personal favorite is the Sabbath mode <a href="https://elevation.fandom.com/wiki/Sabbath_service_(SHO)" rel="nofollow">https://elevation.fandom.com/wiki/Sabbath_service_(SHO)</a><p>not to pick on a specific belief system, but it's quite interesting the lengths people go to follow the letter but not the spirit of things.
Pfft. List is far from
complete. I have done 3rd party interfaces to several elevator controllers. I am highly encumbered by NDA’s, so won’t say much. But I still wonder what “Korean Lunch 2” mode does???