DEV Community

Discussion on: To comment or not to comment?

Collapse
 
rendall profile image
rendall

Any hard rule about this will slip quickly from "helpful convention" to "torturous ideology".

Use comments to explain why a piece of code is doing what it's doing. Or to help organize thoughts. Or to document public methods for tooltips. And do it consistently, unless that doesn't fit, then do something else.

But heaven's sake, please do inject jokes and humor into your comments. I distrust teams that are against this.

Collapse
 
lankydandev profile image
Dan Newton

I misread the last paragraph the first time I read that which gave me a completely different impression of you 😄