DEV Community

Discussion on: Don’t comment your code

Collapse
 
kevinhickssw profile image
Kevin Hicks

I agree that this is a great article, but also agree with David about the title. Unfortunately most people don't actually fully read an article and they will miss the point in the beginning.

I've had many devs share articles like this with me for a reason to not write comments and didn't realize the first paragraph was saying that some comments are good anyways. They only read the subheadings really.

I saw in another comment that you might write another article about which comments to write and I would highly recommend doing that.

It could also be good to include that some times some of the comments you mentioned here as bad could be good. For example mandated comments are good for public packages, APIs, build and code style / generation tools, etc.

Thread Thread
 
ajxn profile image
Anders Jackson

I was also arguing that Java doc in public packages, like Java official documentation is Good and needed.
Even better if some example and useage is in the documentation.

In internal methods, classes only for internal use, not so much.