Can you write FizzBuzz?

November 24, 2023 (1y ago)

79 views

I was incredulous, when I read this post by Jeff Atwood. The post is about how Jeff was incredulous, when he read an observation from Reginald Braithwarte. Okay let's not start calling the post recursively. The post was about the frustration expressed by interviewers who encounter candidates, including those with advanced degrees, unable to perform basic programming tasks.

It's a fairly old post(old by around 16 years). I stumbled upon it today while surfing over the internet and was incredulous by this.

After a fair bit of trial and error I've discovered that people who struggle to code don't just struggle on big problems, or even smallish problems (i.e. write a implementation of a linked list). They struggle with tiny problems.

So I set out to develop questions that can identify this kind of developer and came up with a class of questions I call "FizzBuzz Questions" named after a game children often play (or are made to play) in schools in the UK. An example of a Fizz-Buzz question is the following:

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".

Most good programmers should be able to write out on paper a program which does this in a under a couple of minutes. Want to know something scary? The majority of comp sci graduates can't. I've also seen self-proclaimed senior programmers take more than 10-15 minutes to write a solution.

So after googling the meaning of word incredulous(Yeah, I am definitely adding it to my vocabulary), I thought, no, this can't be possible. I mean who in their right mind would take more than 10-15 minutes to write such a simple program, especially when they proclaim themselves to be "senior" programmers? Heck even bad programmers should be able to come up with a solution fairly quickly.

Apparently only 40% candidates passed the FizzBuzz test when all the candidates had some kind of college - or university level programming education, many had other certifications or degrees. Each candidate could point to a sizeable, completed project on which they worked.

Now, don't start solving the fizzbuzz problem if you are confident that you can, and could come up with a solution in your mind. It was presented as the lowest level of comprehension required to illustrate basic adequacy. There's no glory in being able to come up with a solution.

Between reading all these I wondered what might be the reasons people failed FizzBuzz. I have some guesses from noticing my experiences during my diploma and graduation programs(As of today, I am a sophomore year CS student):

“Copy and paste, adjust to taste”-style programming: Also known as “Coding by Googling”,  this is when a developer writes applications by searching for code that’s similar to the problem that s/he’s trying to solve, copy-and-pastes it, and then tweaks it as needed.

Moving away from programming: Some of them may have started as developers only to realize they were meant more for the managerial roles, or jobs that require something to do with applications but most of their job involved something outside the realm of writing code.


This essay is heavily inspired, and to some most extent copied from, Jeff Atwood's post about why can't programmers program. Thank you Jeff Atwood for all the amazing codinghorror blogposts. Jeff has been writing since the year I was born, and I do not intend to pass around his work claiming being mine. I have been an avid reader of his posts, and I just wanted to share my experience and thoughts about the said why can't programmers program post when I read it.

References


Rick SanchezFavicon by Icons8

Design Template by Lee Robinson