I used to interview programmers with an elevator programming problem. Neat to see it expanded so excellently and cleanly in this piece. Well done!
I had this question during a Google interview. The interviewer became annoyed when I suggested that an elevator that sometimes went backwards to pick ip someone on a just-missed floor could at least be interesting, if not perfectly efficient. They had a preconceived idea that they wanted a stateless system and didn’t like my stateful approach, even if it was potentially better for end users.
Elevator Saga: An elevator programming game (2015)
61–70 of 103 posts
Re: Elevator Saga: An elevator programming game (2015)
#62Made me remember an interesting anecdote: During my PhD at Purdue I had the good luck to take the Pattern Recognition (nowadays would be called ML) course from Prof. Fukunaga, one of the pioneers in the field ( https://en.m.wikipedia.org/wiki/Keinosuke_Fukunaga ). In one of his classes he mentioned that years ago a company came to him, requesting his expertise in optimizing movement of a bank of elevators. He thought…
Boiler Up! I had Prof Fukunaga for EE301 I think (Might have been EE202). I was too young and dumb to recognize his brilliance.
Re: Elevator Saga: An elevator programming game (2015)
#63During Covid, I've often wished I could reprogram the elevator of the apartment building I live in. The current rule is only 2 people can be in the elevator at a time. Problems that arise: * Elevator stopping frequently, but already at capacity, slowing down overall performance * Elevator always goes to bottom (or top) first to pick up passengers going up (or down). This means if your waiting on the ground floor and…
I'd add a couple of sensors (one for volume and one for weight) to let the elevator itself determine how full it is and act accordingly.
I would also still have a "full" button for people to press, but not have the button actually do anything, except maybe light up.
Re: Elevator Saga: An elevator programming game (2015)
#64Earlier quoted context omitted.
I had this question during a Google interview. The interviewer became annoyed when I suggested that an elevator that sometimes went backwards to pick ip someone on a just-missed floor could at least be interesting, if not perfectly efficient. They had a preconceived idea that they wanted a stateless system and didn’t like my stateful approach, even if it was potentially better for end users.
That’s an example of a thing that may work well but would piss users off - it apparently reversing would annoy.
Re: Elevator Saga: An elevator programming game (2015)
#65Call me weird, but I’ve been fascinated by elevator logic since I was a child. I had a math curiosities book that dedicated a chapter to it and after reading that I was hooked on knowing more. I wish my knowledge of JavaScript was more than “programming language that’s not Java” so I could actually play this. Could anyone recommend an online introduction to JS so I can attempt to play this? I’m more of a bash guy.
Re: Elevator Saga: An elevator programming game (2015)
#66I used to interview programmers with an elevator programming problem. Neat to see it expanded so excellently and cleanly in this piece. Well done!
It's so open ended and they can talk about anything from the algorithm, to the mechanical design of elevators, to the UI, to a high-level discussion of all the different components.
Really lets you know quickly which parts of systems candidates are interested in.
Re: Elevator Saga: An elevator programming game (2015)
#67I always wished elevator buttons could toggle. If you accidentally press the wrong floor, just press it again to cancel. This may not work in all situations, but in some situations, it could be a time saver.
Re: Elevator Saga: An elevator programming game (2015)
#68During Covid, I've often wished I could reprogram the elevator of the apartment building I live in. The current rule is only 2 people can be in the elevator at a time. Problems that arise: * Elevator stopping frequently, but already at capacity, slowing down overall performance * Elevator always goes to bottom (or top) first to pick up passengers going up (or down). This means if your waiting on the ground floor and…
Re: Elevator Saga: An elevator programming game (2015)
#69During Covid, I've often wished I could reprogram the elevator of the apartment building I live in. The current rule is only 2 people can be in the elevator at a time. Problems that arise: * Elevator stopping frequently, but already at capacity, slowing down overall performance * Elevator always goes to bottom (or top) first to pick up passengers going up (or down). This means if your waiting on the ground floor and…
Re: Elevator Saga: An elevator programming game (2015)
#70During Covid, I've often wished I could reprogram the elevator of the apartment building I live in. The current rule is only 2 people can be in the elevator at a time. Problems that arise: * Elevator stopping frequently, but already at capacity, slowing down overall performance * Elevator always goes to bottom (or top) first to pick up passengers going up (or down). This means if your waiting on the ground floor and…
Would a first order approximation of "full" be "has two destinations"