DEV Community

Discussion on: Code Smell 05 - Comment Abusers

Collapse
 
mt3o_23 profile image
Teodor Kulej

You are going way over the edge with most of the "code smells". Also, you seem to lack experience with other languages. I've seen few of your "code smells" and they seem to be either things that are easy to abuse, misconceptions, wrong tools in the wrong place, etc.
The "comment abuse" comes from stakeholders (and software) demanding stuff to be commented, even if its obvious. For example, the linter might require each function and field to be commented, so you can't just skip it. So you put obvious comments, like you shown in the post.

On the other hand, there are many places where LONG comments are acceptable. Language that promotes such approach is python - with documentation being generated from comments, and having "doctests" being tests directly embedded in the comments. This way, they come into the documentation, and are validated as regular unit test.

Your conclusion - is very opinionated and short sighted.