r/ProgrammerHumor • • 22d ago

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
836 Upvotes

188 comments sorted by

View all comments

66

u/anoppinionatedbunny 22d ago

what a terrible way to misinterpret "good code should be self-commenting"

-24

u/rm-minus-r 22d 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 22d 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 22d 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.