UPDATE: This post was meant to be mostly tongue in cheek. I love programmers. Some of my best friends are programmers. Also, to be fair to the FizzBuzzers, the spec for this question is flawed, as are all specs as I point out in Why Can’t Spec Writers Write Specs.
Jeff writes about a simple “Fizz Buzz” test given by Reginald Braithwaite. Here’s the functional spec.
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”.
Mind you, this is not a trick question. It is as easy as it sounds. Or it should be. According to Reginald Braithwaite, the majority of comp sci graduates can’t do it.
Naturally, the very first comment to Jeff’s post solves this simple problem. But read further and be amazed at how many developers get it wrong in such a public forum!
The problem may not be that these programmers can’t program. It’s that they can’t read!
I think reading comprehension must be at an all-time low among graduating programmers. Perhaps it’s time to bring back more word problems in our curriculum. Of course we’ve all seen this lack of reading comprehension in comments to our blog posts, haven’t we? As in when someone completely argues against a misinterpretation of your post.
It never fails to amaze me at how some companies I’ve worked with (or at) praise developers who are fast, even if they do the wrong thing because they failed to understand the spec or include so many bugs as to have made the spec irrelevant.
At least he’s fast!
So what’s worse? A programmer who can’t write code, or a programmer who can, but can’t follow a spec?