Hacker News new | past | comments | ask | show | jobs | submit login

I know this problem. The last time someone asked me to write a sort in an interview I ended up implementing bubble sort. "You know", I said, "I remember knowing how better sorts worked, once. But I'm blanking on it now, so let me just write the stupidest thing that could possibly work, and then after that I'll see if I've had time to remember anything."

It didn't seem to be a big deal. Nor should it be -- the goal of your interviewer is to watch you do things like: test your code, remember to check the edge cases, manipulate pointers correctly, be able to figure out how your brain-dead bubblesort algorithm is likely to scale as N grows larger, knowing what exceptions are and understanding their proper role...

It's possible that the interview is better if you're missing your higher brain functions while you're writing the demo code. You're trying to demonstrate your everyday habits, the things you do instinctively, when your memory, your cram session, and Stack Overflow all fail you. It's like asking a trumpeter to pick up their instrument and blow a few notes: according to Malcolm Gladwell, some orchestra conductors claim to be able to detect expert players with nothing more than this one test.

ADDENDUM: Oh, look, Reg Braithwaite already said this, more or less:

http://weblog.raganwald.com/2007/01/dont-overthink-fizzbuzz....




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: