So You Think You Can Program an Elevator
github.com
So You Think You Can Program an Elevator
1–10 of 118 posts
Re: So You Think You Can Program an Elevator
#2which introduces a whole new set of complexity.
Re: So You Think You Can Program an Elevator
#3Re: So You Think You Can Program an Elevator
#4Which I'm now closing as I lost too much time to this the first time I saw it.
Re: So You Think You Can Program an Elevator
#5I think many developers have been waiting for an elevator thinking "Damn this thing is DUMB! I could do a way better job coding the logic for this..." Can finally test it out.
Re: So You Think You Can Program an Elevator
#6However, I do think this is a great exercise for people new to programming. It's a common enough scenario that most people can recite 80% of the requirements of an elevator from memory.
Re: So You Think You Can Program an Elevator
#7Re: So You Think You Can Program an Elevator
#8Then there is the alternative system where you do not request UP or DOWN but you request the floor, otherwise known as destination dispatch https://en.wikipedia.org/wiki/Destination_dispatch which introduces a whole new set of complexity.
Re: So You Think You Can Program an Elevator
#9Re: So You Think You Can Program an Elevator
#10Very similar immediately playable JavaScript version. http://play.elevatorsaga.com/ Which I'm now closing as I lost too much time to this the first time I saw it.