Bennett Garner
1 min readApr 21, 2020

--

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.

--

--

Bennett Garner
Bennett Garner

Written by Bennett Garner

DeveloperPurpose.com — Build a coding career with meaning and purpose 💻 Top writer in technology ✍️

No responses yet