1. Mar 2nd, 2007

    Learning from FizzBuzz: the developer pysche and code reuse

    If you’re hiring software developers, you already know that most of the resumés piling on your desk are deadweight. Good developers get hired in a heartbeat, and so most resumés come from those that are passed over at job interviews. And many of them can’t write a for loop to save their lives. That’s not a testament to the skills of the average software developer, it’s just a statistic influenced by the shallow end of the pool.

    If you try to interview all these people, you’ll never get to talk to the great candidates, someone else will make them an offer before you’re done grilling the deadweights. So you need a way to get to the better ones, or at least narrow the list to the candidates that can code.

    Reginald wrote at length about the FizzBuzz test, and I followed his posts (always a pleasure to read) and other blogs that picked on the meme. The FizzBuzz test is a classical deadweight screening test. It can’t tell the difference between a decent but inexperienced developer, a skilled one or a rockstar. But it can save you time otherwise wasted talking to non-coders.

    That’s all it’s design to do.

    The FizzBuzz meme spread to several blogs and many posts, and in following it, I got an interesting peek into the psyche of the software developer.

    People actually went and submitted their answers to the FizzBuzz quiz, in the comments on these blogs.
    The optimist in me looks at this and smiles. Hey, turns out there are enough people who know how to use a for loop, and some of these solutions are ingenious. Even better, here are people who like to take on mental challenges and solve problems for fun. There’s no better way to sharpen your brain.

    But then I wondered, is this a statement about the state of the software industry? Or at least how some people choose to develop software?

    For starters, the FizzBuzz challenge is about weeding out people who’s sole contribution to your company will be in collecting a paycheck at the end of each month. If you find yourself reading software development blogs, at work or in your spare time, rest assured you’re far ahead of the deadweight. You’re playing in a different league. Even the inexperienced amongst you don’t need to prove that you can solve FizzBuzz.

    We know that.

    Maybe it’s just a sign of personal insecurity, that causes people to go on the defense and prove themselves in a public forum? Or maybe it’s the inability to think about the larger context, and instead try to find some menial work to occupy yourself? “Hey, this meta discussion about the recruiting process and interview tools is hurting my brain, so I’m going to sit in the corner and solve this little puzzle for a while.”

    Ok, that was totally mean of me. But some people clearly missed the mark. One argued with the statistics that most job candidates can’t solve this simple problem. What evidence? The fact that co-workers — the ones who did get hired — can solve it.

    So maybe code is a form of escapism from having to deal with the rest of society?

    Now, I have to admit that I did not check every single answer, I browsed through most and paid special attention to a few that caught my eye. So perhaps I missed this and someone did post the ultimate FizzBuzz solution. But I didn’t see it, I’d appreciate a pointer though. I’m talking, of course, about the most efficient way to solve the FizzBuzz quiz, by virtue of requiring the least amount of time and energy.

    I’m talking about this.

    Click the link. Now come back. No, I didn’t not specifically mean Reginald’s solution. Any one of the solutions listed in the comments will do.

    By linking to that post, I provided a solution to the FizzBuzz quiz without writing a single line of code, in under 5 seconds, in several programming languages, including some I don’t even know!

    Now, obviously if FizzBuzz was a critical section in a loop serving a page on a high traffic Web site, I should be choosing more carefully the most efficient implementation for my particular platform. But it’s not. And if all the answers were downright horrible, I should worry about finding one that’s easy to maintain. But they’re not. They’re good enough.

    And if something is good enough, you should just go and use it. There’s no point in doing it again, that’s just a waste of time.

    The inclination to do something that’s been done before, and wasn’t a real problem to begin with — how do you explain that? I guess it’s the chance to put your stamp on the world, leave some legacy behind you.

    Or maybe it’s like people who talk, but never pay attention to others. They’re too in love with the sound of their own voice.

    Either way, coming up with a solution that is slightly better than the person before you, is proof of your technical abilities. But it also tells about your problem solving skills. That given the chance, you’ll prefer the feel good path over the efficient path. That you’ll easily let ego get between you and working code.

    This has nothing to do with solving programming quizzes as an exercise to sharpen your skills. That’s a way to be a better developer. But FizzBuzz is not a tough mental exercise, it’s the simplest of programming quizzes by design. It intends to find people who can’t even code.

    Now, if you ever find me using the FizzBuzz quiz for screening candidates, here’s a tip for you. Feel free to use it when the time comes.

    The second person I’ll call for a job interview, is the one that will impress me with a short, space and time efficient, solution that I can understand in a few seconds. The last part is important because it proves the code is easy to maintain.

    And the first person I’ll call for a job interview? The one who Googled the answer and e-mailed me a link to it. Because they proved they can find the shortest path from problem to solution, and they’re not afraid to use other people’s code.

    1. Mar 2nd, 2007

      Cheat Codes » Learning from FizzBuzz: the developer pysche and code reuse

      [...] post by Assaf and powered by Img [...]

    2. Mar 2nd, 2007

      Lyle Johnson

      A few years ago, I started asking an interview question along the lines of what you’re suggesting. I would pick some cryptic error message that I’d run across that morning, or the day before, and ask the interviewee how he or she would go about finding out what the error message meant (and, more importantly, how to fix the problem). I know that, in my experience, the quickest solution isn’t tracking down the documentation (if it exists), or going to the source code (if I have it) — it’s almost always just Googling for the error message text and seeing what pops up. If I’m running into this problem, there’s an almost 100 percent certainty that someone else has run into the same problem before me. And of course, it doesn’t have to be an error message — it can be any little bit of trivia, or (as in your suggestion) a bit of code, or an algorithm — whatever.

      The answers I get to this question tell me a lot about how much hand-holding this person’s going to need when they run up against the obscure kinds of problems we all run into when we’re coding.

    3. Mar 3rd, 2007

      Peter Cooper

      Just for kicks I’ll tell you why I answered it. I answered it because I saw a) wrong solutions and b) grotesque, overly long solutions.. and I figured I’d be the smug asshat who solves it in a single clean line of Ruby ;-) But, yeah, doing little puzzles is always fun.

    4. Mar 3rd, 2007

      Assaf

      From one smug asshat to another, here’s a secret: if someone did not already give a Ruby solution in one line of code, I would have posted one.

    5. Mar 3rd, 2007

      Joe Harrell

      I’m forever amazed at how many programmers I know don’t seem to be able to effectively use Google to solve problems, or at least point you in the right direction to look.

      Beats me why one should spend hours playing around with code trying to figure out how to do something when you can do a search on Google or one of the other search engines and come up with something you can work with. Then again, I guess haven’t met a lot of people who even know how to effectively use Google to do a search.

    6. Mar 5th, 2007

      raganwald

      Giles Bowkett has a related viewpoint:

      http://gilesbowkett.blogspot.com/2007/03/fizzbuzters.html

    7. Mar 7th, 2007

      FizzBuzz « danseagrave

      [...] Just a quick pointer over to more discussion of the FizzBuzz [...]

    8. Mar 7th, 2007

      E L Eversman

      Carpundit raised the same question about searching the net for a solution when he pointed out that the Chicago Police Dept. had actually posted a request on its official blog asking if anyone knew why thieves were stealing catalytic converters in Chicago. They figured it might have something to do with the metals used in the parts, hm, like platinum, palladium, and rhodium. Someone posted a couple of explanations from wikipedia enlightening the PD that these are valuable metals for which one can get money in exchange for scrap.

      I wonder just how much longer Google will be able to hang on to its trademark now that everyone uses the word google as a common verb.

    9. Mar 20th, 2007

      //engtech

      Best of Feeds - 47 links - programming, blogging, career, blog, interview, fizzbuzz…

      Tags: Attention, Development, Distribution, Fashion, Photography, Programming, advice, anti-virus, articles, attention, barcamp, blog, blogging, blogs, books, browser, bush, business, canada, career, cartoon, coding, coffee, comic, comics, computerscie…

    10. Apr 2nd, 2007

      Fizzbuzzing bad for server bandwidth at Lunar Ocean

      [...] Stop losing your time ! Here is what imnsho a good piece of advice. [...]

    11. May 5th, 2007

      Garry

      Yup, it’s rather hard to find good software developer. But it’s possible.

    Your comment, here ⇓

    Or using OpenID