Discussion on: Top 5 Bad Coding Practices — Avoid Them to All costs!

darkes profile image
Victor Darkes

Definitely not a modern trend. People who forgo commenting are not lazy. It forces you to write clear and concise methods. Tests and documentation are far more important. If comments are essential for everything then the code isn't clear. When someone writes comments and leaves the company there's no way to understand their intention if their comment doesn't make sense. The code is the only source of truth. I work with large codebases and I'd say a good portion of comments aren't applicable to the codebase by the time I'm looking at it. Things have changed and the code represents the change and not the comments. I'm not against commenting, I definitely do it if there's a "gotcha" with the business requirements, but it's a personal preference rather than a sign of a lazy programmer.