A Test-Driven FizzBuzz Test

Joey deVilla is testing interview candidates with FizzBuzz:

I asked each candidate to do the exercise in the programming language of their choice, with pen and paper rather than on a computer. By requiring them to use pen and paper rather than letting them use a computer, I prevented them from simply Googling a solution. It would also force them to actually think about the solution rather than simply go through the “type in some code / run it and see what happens / type in some more code” cycle.

Commenters are expressing violent disagreement, violent agreement, and violent alternative implementations in everything from Perl to Racket.

One thing missing from the discussion was a worked example. To fill the gap, here’s a video of me driving FizzBuzz with tests:

Some thoughts: