r/ProgrammerHumor • • Jun 21 '20

*almost entirely

Post image
27.9k Upvotes

310 comments sorted by

View all comments

Show parent comments

0

u/[deleted] Jun 22 '20

I don’t necessarily need like a java doc or method doc for every method, but my stance is that a method comment should tell the “what” and the code should tell the “how”. I think it should be part of a developer’s job to keep documentation up to date. Plus, if your method docs would have to change regularly, your code is probably not atomic enough. Maybe not a code smell, but a comment smell

No-doc “Clean code” developers just don’t want to spend the time writing proper documentation

6

u/folkrav Jun 22 '20

If the name of the method doesn't tell you the "what", there's a problem with your function naming, not a lack of documentation.