re: Top 5 Bad Coding Practices — Avoid Them to All costs! VIEW POST


Good list! Personally documentation over commenting, because comments can get stale and functionality within a function can change rendering comments obsolete. The popular CS book Clean Code by Robert Martin goes into that.


Yes, sure. Thanks for sharing it too.


Having dealt with millions of lines of code.. I think comments are essential.. and the modern trend of saying it isn't is just a cop out of lazy programming.

Comments should be written and maintained.


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.

Code of Conduct Report abuse