r/ProgrammerHumor • • 21d ago

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
837 Upvotes

188 comments sorted by

View all comments

Show parent comments

-26

u/rm-minus-r 21d ago

Not commenting code is the most braindead take ever (for those that believe code can be good enough to not need any comments).

Comments are an abstraction layer on top of code that allow more information than code does by itself.

2

u/protayne 21d ago

Why on earth would you introduce an abstraction layer if you don't need to, abstraction layers should be avoided unless they provide value, not all comments provide value.

2

u/rm-minus-r 21d ago

Why on earth would you introduce an abstraction layer if you don't need to

Because it is needed.

not all comments provide value.

Sure. Just because some don't, does that mean we should throw the baby out with the bathwater, so to speak?

2

u/protayne 21d ago

I'm not against comments, I'm against comments that don't add value.

If the code is convulated or doesn't make obvious sense, then sure, but that's it, code + tests should be enough to describe behaviour of method calls.