Hacker News new | ask | show | jobs
by simonw 4069 days ago
If an interviewer asks FizzBuzz, it means they want to do a quick sanity check that you can write code to solve a simple problem. Answer the question and the interview can move on to something more interesting.

If you try to give a "clever" answer at this point rather than collaborating with the interviewer, it's likely to give a bad impression. A good interview process isn't just looking for people who are strong programmers, it's looking for people who are good engineers - and good engineers are people who collaborate well rather than trying to prove a point at the first available opportunity.

1 comments

I personally would find it a more experienced approach to look up a prewritten, tested library, used by other people.
It's not the point. At this point the interviewer isn't asking whether you can ship something, he's asking you whether you understand code or not. You need to fully comprehend what you're shipping, whether you imported it from a tested library or you built it yourself.
You should have seen the shambolic mess of a Python script I inherited from a colleague. The script was doing bash calls, to call itself with different arguments. Functions generating functions, not because of any high level of abstraction, but because she didn't know how to write a module. The code inside was more complex than fizzbuzz, but the way it was shipped was beyond terrible.

Coding something like fizbuzz is usually day one of a programming course. Using modules maybe day 2 or 3? I would see it as a sign of a more mature developer.

That's exactly the point of fizzbuzz: weed out those who clearly can't code. Only when the fizzbuzz test is passed can we start going into interesting parts, where an interviewer can assess whether you're a (truly) mature developer.