After yet another FizzBuzz flare up sparked by a post that has since been removed by the blog owner I felt the need to air my views about FizzBuzz and similar types of interview puzzles. The post stated that of their interview experiences only "40%" could complete the FizzBuzz test in their language of choice drawn out on paper within 10 minutes. Their view was that it was thumbs down if you didn't complete FizzBuzz.
This sparked comments on Twitter with the running theme that FizzBuzz isn't a suitable interview test on which to assess candidates and the usual micro-war ensued with arguments for and against its usage.
I can see both sides of the argument, but I'm of the opinion that:
FizzBuzz mainly tests whether or not you know the modulus operator.
For those that know of the operator the test becomes a basic IF statement and a loop. Pretend that you don't know about the modulus operator and the test takes on another dimension. I'm not sure this added dimension would be that dramatic but it still gives more to think about. Throw in a little interview pressure and fear of failure and it's not too surprising to hear that not everybody can solve this puzzle within the given time frame.
I would expect a senior developer to be able to complete FizzBuzz and if they were unaware of the test it would suggest that they don't follow any of the popular blogs from the development culture. This doesn't make a person a bad developer and not knowing who Scott Hanselman is won't necessarily mean they can't get their stuff done.
FizzBuzz is a fun puzzle but basing everything on that, win or lose, only tells a tiny fragment of the story.
Technical tests are essential but should be based around the candidate. If I see a CV that tells me a developer has been creating ASP.Net Web Applications for the last 5 years, guess what I'm going to base my technical tests around? ASP.Net Web Applications! The key aspect of a technical test is to establish whether a person can do what they claim. No tricky puzzles or tounge twisters required.
I don't write code day to day using a pen and paper and generally don't have somebody sat behind me staring at my screen so I'm not convinced that doing that for an interview is going to get the best out of everybody.
Underneath those interview nerves is some brilliance waiting to surface! By all means use FizzBuzz, but don't forget that there's more to life that FizzBuzz.
Another key point to the technical test is seeing how a developer performs when trying to solve something that they don't know the answer to. For this you would need to find a small task that is out of context, some kind of puzzle like... FizzBuzz!
To see code examples of FizzBuzz see: http://rosettacode.org/wiki/FizzBuzz