It sounds like a generic soda loaded with entirely too much caffeine.
It sounds like a description, given in jest, to a singularly nightmarish hair cut.
It could even be a new word to describe that tickling sensation that originates in your nose, but brings tears to your eyes when you drink soda to quickly.
What comes to mind when you hear that word?
Whatever your imagination conjured up (unless you have computer programming experience) I’m certain you did not equate FizzBuzz to gainful employment as a software developer. Confused? Read on.
Last week, I was reading a blog when I encountered FizzBuzz for the first time. In this post, the author was lamenting the multitude of so-called “programmers” who can not, in fact write a program to save their lives!
FizzBuzz is a simple test that the author of the blog post proposed to help separate the “wheat from the chaff” when it comes to finding astute programmers during job interviews.
The test goes like this:
1) Choose the programming language of your choice.
2) Get the computer to print out the numbers 1 – 100 on the screen.
3) If the number is a multiple of 3 print out Fizz instead of that number.
4) If the number is a multiple of 5 print out Buzz instead of that number.
5) If the number is a multiple of both 3 and 5 print out FizzBuzz instead of that number.
According to the author of the blog post, people with degrees in computer science have failed this challenge in job interviews!
The problem was stated a little differently on codecademy:
2) Get the computer to print out the numbers 1 – 20 on the screen.
3) If the number is divisible by 3 print out Fizz instead of that number.
4) If the number is divisible by 5 print out Buzz instead of that number.
5) If the number is divisible by 3 and 5 print out FizzBuzz instead of that number.
I couldn’t believe it! I just read about FizzBuzz and here it was! Here is the solution that I wrote. There are many possible solutions, mine is elementary but it works.
I have to admit, I felt pretty good about myself when I got it to work.
Programming computers is a daunting endeavor. I spend half of my time utterly confused and sometimes depressed when I can’t figure out a challenge. The other half of my time is spent looking things up on google and StackOverflow.
However when the mist clears and the obfuscating dust settles, a bit of understanding peeks through.
Those are the moments I program for. I hope that they become more frequent as I continue to learn.