DEV Community

Discussion on: "Do not comment on your code, it should be self-documented". Well... I don't agree.

Collapse
 
gosukiwi profile image
Federico Ramirez

I think people is just taking things literally. The people who told you comments = bad were just parroting what they read online and didn't fully understand.

There is a place and time for comments. IMO, they should be the exception and not the rule though, or at least the coding standards should aim for that.

It's much better to have a small, self-documenting method, but it's also very damn important to have a good, descriptive, multiline comment in a chunk of complex, messy code.

Just use your brain people, there is no silver bullet.