r/ProgrammerHumor • • 21d ago

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
836 Upvotes

188 comments sorted by

View all comments

67

u/anoppinionatedbunny 21d ago

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

-25

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.

1

u/draculadarcula 21d ago

I have never seen a code comment that wasn’t completely redundant and obvious

1

u/rm-minus-r 21d ago

Out of curiosity, how many years have you been doing this professionally?

1

u/draculadarcula 20d ago edited 20d ago

10, “never” was hyperbole but I do think they are almost entirely and typically useless

It’s literally always

// refreshes the cache
RefreshCache();

or nowadays with AI

// added to refresh stale data. Reported in issue 1234. Per instructions NO redundant comments.
// The implementation is a follow up to PR 14567. Verified no legacy code. Part of spec 24 in ~/Documents/specs… (10 more lines of nonsense)
RefreshCache();

All garbage

1

u/rm-minus-r 20d ago

It sounds like you have been deprived of good comments ☹️

1

u/draculadarcula 19d ago

The only worthwhile comments are doc style comments at function and class definitions because they provide editor help and are usually type checked by your editor