Bruce's journal (original) (raw)
At work we have a simple little litmus test for candidates interviewing to be graduate developers - the children's game Fizz-Buzz.
The test is very simple:
Write a program that will output each of the numbers from 1 to 100 on a separate line except:
- when the number is a multiple of 3, output Fizz,
- when the number is a multiple of 5, output Buzz, and
- when the number is a multiple of both 3 and 5, output FizzBuzz.
A correct answer would therefore output:
1 2 Fizz 4 Buzz Fizz 7 8 Fizz Buzz 11 Fizz 13 14 FizzBuzz 16
...and so on.
The disturbing aspect is just how effectively this thins the field. We end up failing as many as a quarter of the university degree holding hopefuls1! This is why I can't do interviews - I find it hard to imagine that someone would apply for a programming job without the necessary skills to conquer something so small.
Mind you, that hasn't stopped me writing a solution using a finite state machine (FSM) and then spending most of the day taking that to the next level by writing a program to generate its own FSM using an evolutionary algorithm.
Tomorrow I get to find out if my little evolutionary algorithm is smarter than 25% of our candidates. 
1 We don't demand that the degree be anything to do with computers per se. Our lead support programmer, for example, has a classics degree and one of our chief systems architects is a biochemist.