Live data from Hacker News

Elevator Saga: An elevator programming game (2015)

play.elevatorsaga.com

31–40 of 103 posts

Re: Elevator Saga: An elevator programming game (2015)

#31
post #21

Earlier quoted context omitted.

I think this was discussed there: https://news.ycombinator.com/item?id=8933979

this did indeed help understanding and fixing the issue.

Just in case this is interesting, a potentially more elegant way to solve this with modern JS is to use 'for(let i' instead of 'for(var i'.

The reason is that 'let' gives 'i' 'block scope', meaning that each iteration of the loop block gets its own scope so that 'i' isn't overwritten each time, and each function you declare captures the value of 'i' at the time it was declared.

In other words - the way you originally expected 'var' to behave is how 'let' behaves!

Re: Elevator Saga: An elevator programming game (2015)

#32
post #13

Earlier quoted context omitted.

They can be. Express elevators and such. But mainly the programs are limited to what floor the elevators idle at because more complicated programs even if more efficient overall often piss people off.

>which floors the elevators idle at... I recently spent 4 months in hospital which left me with an amount of time to kill in an attempt to stay sane. One of the games was trying to get places I was technically allowed but really shouldn't have been ("sod your 'no public access' signs, in not public, I'm an inpatient!"). Being confined to a wheelchair made the game a bit more difficult. One day one of the ward staff m…

That's amazing. I'll be trying that trick next time I have some time to kill in a building!

We also play the game sometimes of getting places we're not supposed to (as consultants). Walk around like you're from IT and are supposed to be there (technically both true), perhaps with a laptop under your arm, nobody will care what you do to any of the computers there. In schools and hospitals, and probably other places, try (variants of) the city you're in as password, perhaps combined with the postal code, and you usually get access to everything because of course the staff needs to actually help you. The username is pre-filled, don't worry about that (most of the time that's the field with more entropy).

It's honestly terrifying and short of locking rooms (because some of the personnel needs fast access to computers, preferably faster than plugging in and out smartcards all day long) there just isn't really a solution. I'm pretty sure we could have walked into a surgery room, we steered clear of any place that looked like it might head us into places with patients under actual operation. Why those aren't locked I don't know, probably there is a good reason so probably they can't change that...

Re: Elevator Saga: An elevator programming game (2015)

#33
post #32

Earlier quoted context omitted.

>which floors the elevators idle at... I recently spent 4 months in hospital which left me with an amount of time to kill in an attempt to stay sane. One of the games was trying to get places I was technically allowed but really shouldn't have been ("sod your 'no public access' signs, in not public, I'm an inpatient!"). Being confined to a wheelchair made the game a bit more difficult. One day one of the ward staff m…

That's amazing. I'll be trying that trick next time I have some time to kill in a building! We also play the game sometimes of getting places we're not supposed to (as consultants). Walk around like you're from IT and are supposed to be there (technically both true), perhaps with a laptop under your arm, nobody will care what you do to any of the computers there. In schools and hospitals, and probably other places, t…

I'm sure for surgery rooms (at least), needing someone to rush in to help and having them fumble with ID cards outweighs a bad party trying to, I guess, muck up a surgery or something.

Re: Elevator Saga: An elevator programming game (2015)

#34

During 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…

Elevator could also make a decent guess at fullness just by recording the discrete changes in weight. It wouldn't be perfect but again it would probably be better than allowing user input.

Re: Elevator Saga: An elevator programming game (2015)

#35
post #29

I 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.

It works this way often in (north-east) Asia. Double-tap a selected floor and it unselects. Brilliant.

Re: Elevator Saga: An elevator programming game (2015)

#36
post #32

Earlier quoted context omitted.

That's amazing. I'll be trying that trick next time I have some time to kill in a building! We also play the game sometimes of getting places we're not supposed to (as consultants). Walk around like you're from IT and are supposed to be there (technically both true), perhaps with a laptop under your arm, nobody will care what you do to any of the computers there. In schools and hospitals, and probably other places, t…

I'm sure for surgery rooms (at least), needing someone to rush in to help and having them fumble with ID cards outweighs a bad party trying to, I guess, muck up a surgery or something.

“Men are better than gates” - Gandalf - the real security on the surgery rooms are those in them.

Re: Elevator Saga: An elevator programming game (2015)

#37
post #13

Earlier quoted context omitted.

They can be. Express elevators and such. But mainly the programs are limited to what floor the elevators idle at because more complicated programs even if more efficient overall often piss people off.

>which floors the elevators idle at... I recently spent 4 months in hospital which left me with an amount of time to kill in an attempt to stay sane. One of the games was trying to get places I was technically allowed but really shouldn't have been ("sod your 'no public access' signs, in not public, I'm an inpatient!"). Being confined to a wheelchair made the game a bit more difficult. One day one of the ward staff m…

Hopefully you don’t have to spend the time again - but if you do it’s very easy to buy the fireman’s key on eBay. You didn’t hear that here.

Re: Elevator Saga: An elevator programming game (2015)

#38
post #32

Earlier quoted context omitted.

>which floors the elevators idle at... I recently spent 4 months in hospital which left me with an amount of time to kill in an attempt to stay sane. One of the games was trying to get places I was technically allowed but really shouldn't have been ("sod your 'no public access' signs, in not public, I'm an inpatient!"). Being confined to a wheelchair made the game a bit more difficult. One day one of the ward staff m…

That's amazing. I'll be trying that trick next time I have some time to kill in a building! We also play the game sometimes of getting places we're not supposed to (as consultants). Walk around like you're from IT and are supposed to be there (technically both true), perhaps with a laptop under your arm, nobody will care what you do to any of the computers there. In schools and hospitals, and probably other places, t…

[deleted]

Re: Elevator Saga: An elevator programming game (2015)

#39
post #15

Made 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)

#40

During 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…

During COVID I think it's totally reasonable for any person to be able to set the elevator as "full" - if you're returning from travel and quarantining, immunocompromised, etc. you might not want to travel with anyone.

Also,

* Elevator door closes when it's not in use - may as well stay open, get some ventilation, and use slightly less energy!

Post reply on HN