fizzbuzz.io
3 is Fizz

Will it Fizz? Will it Buzz?

FizzBuzz is a simple programming challenge that has become trendy to challenge job candidates with.

"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”."

For example:
  • 1
  • 2
  • Fizz
  • 4
  • Buzz
  • Fizz
  • 7
  • 8
  • Fizz
  • Buzz
  • 11
  • Fizz
  • 13
  • 14
  • FizzBuzz
  • 16
  • 17
...and so on.

Why ask candidates?

Anecdotally, 8 out of 10 recent CS graduates can't write it successfully in the language of their choice. It is a handy tool to screen out those who might have padded their resume, and perhaps to watch how a developer approaches problem solving, but far too often it is merely a token.

Further reading »

Why a gem and a website?

In interviews, I’m consistently asked to whiteboard (or actually code) my solution to the FizzBuzz problem, and I decided once and for all to code my definitive answer instead of endless whiteboarding. FizzBuzz is a robust solution to the problem, and fizzbuzz.io offers a simple, effective API to solve the FizzBuzz problem in a modern fashion.

Fork it on Github »

So it's a joke?

Not at all! I treated this project with the utmost sincerity and seriousness. It is not perfect, but it is an example of code as craft, TDD, API development, and has been a delightful kata, writing and rewriting a basic, solved problem from new angles.