FizzBuzz

As you probably already know, FizzBuzz is frequently used as a test to illustrate a minimum level of programming comprehension. The program was also Codecademy’s first challenge for Code Year, which seems odd given that I was able to complete the challenge –
but I’m not so sure it illustrates adequacy.

The Code


Code comments from Codecademy.

Thoughts

The challenge felt more more like a test of my ability to remember if statements than a test of programming comprehension. I did puzzle over adding the logic for the FizzBuzz condition, until I remembered that I could nest loops. However, my approach seems a bit lengthy and inefficient at 15 lines of code. It’s also kind of interesting to think that this simple problem is used to test programming job applicants.

Writing about FizzBuzz is probably the coding equivalent of beating a dead horse. Nevertheless, I feel like this is a program I should come back to in a few months to see if I’m able to write it in fewer lines. It may be interesting to compare this version to one I write 6 months from now & see how I approach it without Codecademy’s guidance.

Leave a Reply

Your email address will not be published. Required fields are marked *