Today I stumbled into http://codingdojo.org/cgi-bin/wiki.pl?KataFizzBuzz and decided to implement the kata as a little TDD finger exercise. Interestingly I learned that FizzBuzz is sometimes used in job interviews to validate a candidate’s ability to code. To my suprise I also learned that a lot of programmers seem to fail this test.
The FizzBuzz problem can shortly be described as:
Any number divisible by three is replaced by the word Fizz and any number divisible by five by the word Buzz. Numbers divisible by both become FizzBuzz. All other numbers remain as they are.
The task at hand is to “write a program that prints the numbers from 1 to 100 by applying the above rules”.