Lesedi Ramahobo     About     Tags     Apps     Feed

Software interview - The FizzBuzz Quiz

I was baffled when I read this blog by Reginald Braithwaite:

Like me, the author is having trouble with the fact that 199 out of 200 applicants for every programming job can't write code at all. I repeat: they can't write any code whatsoever.

Its shocking how many companies receive job applications from degree holders in computer science yet they cant code themselves out of a bag. They struggle with tiny problems.

Luckily its easy to detect the stragglers. The vast divide between those who can program and those who cannot program is well known. Below I'm going to demonstrate a simple program. Its an exercise that employers shouldn't underestimate when screening during interview sessions.

FizzBuzz Quesitons

Named after a game often played by children in schools. 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 programmers should be able to write this program on paper in less than 2 minutes. 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.

FizzBuzz: Code demo

Below I've written a JavaScript implementation of this game.

JS Bin on jsbin.com

Any software engineer should be able to write loops and do basic arithmetic operations. But I sympathize with those who struggle. Software is hard and its no joke.

If you liked this post, you can share it with your followers or follow me on Twitter!