Yet another FizzBuzz post

A couple of weeks ago, CodingHorror (an awesome and wildly popular blog) wrote about the fact that programmers can't program. Like I mentioned in my previous post, this can't be any more true. But in reality, I think this is more of an issue with people over-analyzing the problem at hand.

In today's world, things tend to get really complicated. Programming is no different. In my current project, I'm already reached a point where I would like to tell my boss "No more code - Fix this junk and forget about the users until it's fixed." Admittedly, most of that junk has been done by me. But I've been campaigning to stop development for a while and fix the current problems without adding any new features.

But this isn't the story I wanted to give today. As far as the "FizzBuzz" phenomena goes, I think most of those people who couldn't solve that problem were most likely over-analyzing the problem. Of course, there had to be people who honestly didn't have any earthly idea on how to code the solution. But for the rest, maybe thinking of a solution that was too flashy could've been the problem.

Like many others, as specified in a follow-up post, I immediately fired up the text editor, and coded the solution in Ruby (which I was studying at the time I read the original post) in about 10 lines of code, thinking "Wow, that was easy." And seriously, it is, if you take the KISS route (that's "Keep It Simple, Stupid", for those who don't know) as I did. Just a simple if-else condition, along with the trusty mod operator, it was easy.

I can only imagine many thinking about putting the FizzBuzz code in a separate class, complete with iterators, inside neat and well-designed blocks of code, ready for Object-Oriented goodness. Why? This is simply overkill. Unfortunately, many developers think that way. It's possibly our nature, just as it was in our nature to try to solve the FizzBuzz problem.

Sometimes, keeping things simple is just what we need in a crazy world like this.

Written by

Dennis Martinez

Show Comments