Live data from Hacker News

My favourite interview question (2006)

weblog.raganwald.com

11–20 of 100 posts

Re: My favourite interview question (2006)

#11
I once got a similar question, but with Battleship. I don't really enjoy these high-level design things, they seem silly and irrelevant to me, but I can see how someone with different interests would like it. (That particular place made me an offer, I'm not doing sour grapes.)

Re: My favourite interview question (2006)

#12

I once got a similar question, but with Battleship. I don't really enjoy these high-level design things, they seem silly and irrelevant to me, but I can see how someone with different interests would like it. (That particular place made me an offer, I'm not doing sour grapes.)

So what do you enjoy? "Implement a binary search algorithm for the following list in 10 minutes"? I find CS pop quiz-type questions to be next to worthless in assessing candidates.

Re: My favourite interview question (2006)

#13
post #3

Probably should have checked before posting...this was discussed 4 years ago: https://news.ycombinator.com/item?id=2062889 (so I guess it's eligible for re-discussion) I stumbled across it doing a Google search for "interview question elevator design"...I haven't been asked in a technical interview about how I would implement the logic for an elevator controller, but I heard about the question second-hand at a colleg…

This question gets a lot simpler once you realize how they were originally implemented and many still are today: state machines. There is no history, no FIFO, the only thing that exists is the now. It's lot easier to answer, "I'm going up and am on the 3rd floor, someone is waiting on the 4th floor, do I start slowing down?" Then it is to answer, "someone pushed up on 4th and someone pushed down on 7th.... etc.".

This is also why many elevators perform very poorly under heavy load. You want to skip floors when the elevator is already full.

Re: My favourite interview question (2006)

#14
I remember being interviewed in the DC area, where I was asked a question involving subway systems and routes. Being a mid-western lad completely unfamiliar with subways (and mass transit in general), I had a lot of trouble visualizing it. I would imagine that people who rode mass transit on a regular basis wouldn't have as much difficulty. Got a job offer anyway, though.

Re: My favourite interview question (2006)

#15
post #8
post #3

Probably should have checked before posting...this was discussed 4 years ago: https://news.ycombinator.com/item?id=2062889 (so I guess it's eligible for re-discussion) I stumbled across it doing a Google search for "interview question elevator design"...I haven't been asked in a technical interview about how I would implement the logic for an elevator controller, but I heard about the question second-hand at a colleg…

I lived in a building (6 floors) where the elevator appeared to be always in one of four states: Door opened, going to floor n, waiting for input inside elevator, waiting for input from anybody. It only remembers a single floor - where it's going now. Once it goes into the input state, it's a race among everybody who wants to take the elevator to push the buttons. I was never quite sure whether the 'waiting for input…

Yeah I'm pretty sure the elevator, at least that old one, doesn't know if you're in it, though more modern ones will open the door as you walk up.

Re: My favourite interview question (2006)

#16
I generally went with a question my friend told me, "what was the last non-work, non-school program you wrote?". The theory being that a person who has used programming for something personal was probably a better candidate since they saw personal value in their profession.

Re: My favourite interview question (2006)

#17

I generally went with a question my friend told me, "what was the last non-work, non-school program you wrote?". The theory being that a person who has used programming for something personal was probably a better candidate since they saw personal value in their profession.

In a good week I work 50 hours. In a bad week, 80 or 90 (or more). In my spare time I have family commitments, play guitar, draw, paint, hike, ride my mountain bike, and travel. Ask me that question and I'll probably find a way to wind up politely and leave.

Re: My favourite interview question (2006)

#20

I generally went with a question my friend told me, "what was the last non-work, non-school program you wrote?". The theory being that a person who has used programming for something personal was probably a better candidate since they saw personal value in their profession.

I used to think this way, but one of the best programmers I work with basically refuses to even touch a computer outside of work. And yet he's extremely good at what he does, and you can figure that out within like 15 seconds of talking to him about a hard problem. As far as heuristics go I don't think this is a good one.
Post reply on HN