Please Don't Comment Your Code

As beginner developers, we are taught how to use comments in our code. But are we taught how to not use them? Here is a critical look at code comments.

Letters from a game of Scrabble saying "Choose Your Words"
Photo by Brett Jordan / Unsplash

Code comments and hello world go nearly hand-in-hand in the software development world. Each of these examples embody the simplest constructs of a language. However, after we are taught how to use said comments in our respective languages, are we ever taught how to not use them?

Most likely not. Thus, I have been witness to and a perpetrator of far too many instances of poor programming practices. Yes, I count commenting as a programming practice. I’ve encountered clear cases where I’ve marveled at the well thought out structure of a project’s comments, and other cases where it was, at best, unnecessary.

It is high time we look at the parts of our code that never make it into production, but certainly can affect what comes before the release.