I often hear that we need more and better comments in the code we write. In my experience at previous companies as well as at Qvault, we often need better comments, we rarely need more, and often we need less.

As we try to weigh the necessity of adding a comment to code, we need to take into account that it’s more likely that a comment is needed if it exists at an architectural boundary.

Comments and documents that explain why something is happening are quite important and don’t apply to any of the previous criticisms I’ve made of comments.

Hopefully, these rules of thumb help when you are trying to clean up your code and write better comments.

Related Articles