How FizzBuzz Helped Me Be a Better Dev

David Bae
2 min readAug 19, 2019

--

I started my journey as a self-taught developer about a year ago. About 3 months into my journey, I fell into tutorial hell. I was going through freeCodeCamp, Code Academy, Udemy, and blog tutorials every week and felt like I was unable to progress.

I knew the general syntax, but was completely unable to piece code together on my own. I vented my frustration to a friend who worked in the industry and he told me bluntly:
“If you can solve this problem you’ll be fine. If you can’t I don’t know what to say.”

That problem was FizzBuz. For those who aren’t familiar with this “infamous” problem, you have to print “Fizz” if the number is divisible by 3, “Buzz” if the number is divisible by 5, and “FizzBuzz” if the number is divisible by 15.
Here was the solution I came up with after 3 hours:

I came up with nothing. I had no idea how to solve it, no idea where to even begin. Admitting defeat, I eventually called my friend and asked him to explain the problem to me. He explained it and I didn’t understand. I asked him to explain again, and I didn’t understand again. This continued until he typed the code out and sent it to me.

I stared at that code for about a week. I didn’t study it, I didn’t try to take it apart, I simply stared at it.

I would stare at this piece of code for hours at a time trying to understand what he did and being so ashamed that I was unable to understand what he typed so casually in 1 minute.

Then in a eureka moment I figured it out. I tell the computer to check if a number is evenly divisible by 15 then 3 then 5 and would perform an action if one of those were true.

This seems very elementary now and to most readers, but this moment was when everything clicked. Not just how to solve FizzBuzz, but how to begin to think like an engineer.

This revelation was my introduction the world of development. I realized that I truly enjoyed piecing together problems. I began an in-depth study of algorithms and data structures, reading and solving the problems.

FizzBuzz was the first and most memorable eureka moment I’ve had on my journey. Although the problem is simple, I have no doubt in my mind that it was the catalyst for my deep dive into computer science.

--

--

David Bae
David Bae

Written by David Bae

Java, JavaScript, Open Source enthusiast. Competitive programming, golf, and LoL hobbyist. Carleton College Alumni. www.linkedin.com/in/baedavid

No responses yet