Hacker News new | ask | show | jobs
by throwaway2016a 2769 days ago
I agree completely on Fizzbuzz. It has saved us from making so many bad hires. It takes 15 minutes during the interview and you learn so much about a candidate. Not only if they can do basic coding but also how they react when they encounter something that don't know or conversely how they react when they think something is "easy" or "beneath them".

10 years ago I was asked how to tell if an integer is divisible by two without using division or modulus. What they expected was to bit mask the 1s place in the integer and check for equality with 0. I'd take Fizzbuzz any day.

2 comments

10 years ago I was asked how to tell if an integer is divisible by two without using division or modulus. What they expected was to bit mask the 1s place in the integer and check for equality with 0.

Wait, it gets better. I was asked the "divisible by two" question and gave the standard bitmasking technique in response. But then my interviewer said that wasn't "allowed" either, because apparently this programming environment they do their daily work in (this was an old-school web development shop basically) doesn't support basic math operations of any kind except equality, plus and minus.

He then pressed me for something "even simpler", "perhaps using function calls". Then I figured out what the "right" answer was -- he wanted be to test for odd- or even-ness recursively by, well, you know how.

So after reminding him about the obvious performance drawbacks of such an approach, I asked him -- "So do you actually write code like this in production?"

To which his answer was: "No, but I do during interviews".

come on. this is so obvious. read an int at that location and see if you take a misaligned read fault. so easy.

if CPU masks it then time the read.

ok partly sarcasm but partly: this isn’t a hard question. i’m sure i could enumerate ALL the possible ways to do this. maybe i’m good at puzzles.

if your comment is about how awful an interview question it is, in that case yeah i agree. but not because it’s hard. anyone should be able to answer this.

I never said it was hard. I was pointing out that people have been asking easy screener type questions like fizzbuzz for at least 10 years.

Further I was pointing out I prefer fizzbuzz because it at least bears a resemblance to what would be done on a daily basis on the job.

> anyone should be able to answer this.

Anyone should be able to answer fizzbuzz yet people who look good on paper constantly fail it. This is why it is useful. And that is why it is actually not a bad interview question. (in my opinion)