Friday, March 2, 2007
Not too long ago Imran gave the world FizzBuzz. FizzBuzz is an incredibly easy programming problem whose sole purpose is to screen software development job applicants who are so bad that they can't write code at all. It has no other purpose. It was literally designed so that it requires programming skill, but if you have any programming skill at all, you can solve it in seconds.
You might expect the blog world to respond, if it responded at all, with a re-evaluation of its hiring priorities, or a re-examination of the ways in which software developers are hired, or even some new ideas about how to hire. Alternatively, if you were absurdly cynical, you might expect programmers to start coding FizzBuzz in every language from Haskell to SQL, and even to start holding FizzBuzz coding contests.
The great thing about being cynical is, it's rarely disappointing. Anybody who makes a prediction that large numbers of humans are going to continue acting like idiots will always get to enjoy the satisfaction of seeing their prediction come to pass. Because this is what people in fact do.
Anyone hoping to stop the madness is facing the usual frustration experienced by those who attempt to get more than three people to use their common sense in the same place at the same time. There was recently a post about a FizzBuzz contest on the Ruby-Talk mailing list which actually linked to Raganwald's Don't Overthink FizzBuzz for a description of the problem. (The FizzBuzz golf contest site appears to be down, but here's the link anyway.)
There is probably nothing more useless than coding a solution to FizzBuzz. It is not a profitable problem; it is not a difficult problem. You will learn nothing, you will not make a cent. The sole purpose of this programming problem is to weed out coders so incompetent that they have no hope of ever learning to program anything. It is only useful to people who hire programmers. Yet programmers are coding it in droves, all over the Web. It's even being called the programmer's "Stairway to Heaven," except that's completely wrong, because playing "Stairway to Heaven" does require some practice and skill.
Obviously I'm just complaining about people being stupid, which is of course at least as unproductive as the actual stupidity itself. But the funny thing is, I think you can use FizzBuzz as a hiring screen in another way. Don't ever hire anybody who can't code FizzBuzz; and don't ever hire anybody who does code FizzBuzz. Because the question is, why has anybody ever coded a FizzBuzz implementation? You get no money, you learn nothing, you don't get laid, you don't get a cookie, you don't even get to wear a shiny paper hat. (Although I suppose nobody's stopping you.) What on earth is the point?
People code FizzBuzz because it's safe. Every programmer out there who has wasted a second of their time on a FizzBuzz implementation has had something better to do, some dream, some goal, some ambition that they passed up to write FizzBuzz instead -- just like everybody out there who's ever sat on the couch and watched Friends instead of doing something worthwhile with their lives. They read about it on the Internet, it involves some form of effort -- insofar as lifting your fingers and then dropping them on a keyboard must burn some fractional quantity of a calorie -- and it's a lot less frightening than taking that dream program you've always wanted to code and actually coding it. (Or worse yet, making a first pass at it, realizing it sucks, throwing it away, and starting again. Which is what you have to do if you want to get anywhere.)
The thing is, if you've got some person who really thinks that coding FizzBuzz is worth the time it takes out of their short life, the few inches it brings them closer to the grave, they're going to be that wasteful with your time too. Even after you've bought that time from them. Hiring somebody who spends the time to write a FizzBuzz means that the thing you hire them to write will turn into a FizzBuzz. Those FizzBuzzers will FizzBuzz it up, until it's so damn FizzBuzzed that nobody but an utter FizzBuzz would be willing to work on it in the first place.
Keep in mind, FizzBuzz is basically an idiot detector. Anybody who bothers to code FizzBuzz is saying, ooh, an idiot detector. I'd better aim this at my own head and see what happens. Then they manage to code FizzBuzz and they go, "yay! I'm not an idiot!"
At the risk of raining on their parades, if you aim an idiot detector at your own head, it really doesn't matter what the readout is.