Thanks for your thoughtful response, Chris! I’m sorry I’m only seeing it now!

You’re right. It’s all relative, and whether or not to comment is often a judgment call.

In those judgment call situations, I think most people would say, “When in doubt, comment it.”

My point is that the default behavior should be to not comment. My saying would be, “When in doubt, make your function/class/variable names clearer and write good docstrings — then you won’t need to comment.”

In my experience, code that needs a lot of comments is often poorly written code. Make it cleaner, and you don’t need the comments. Moreover, future developers will thank you even more for keeping things clean and readable.

Top writer in Technology | Backend Web Developer |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store