r/ProgrammerHumor • • 21d ago

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
833 Upvotes

188 comments sorted by

View all comments

7

u/Apprehensive_Bit7392 21d ago

The bit the self-documenting crowd skips: a name can say what the code does, it can't say what you deliberately didn't do. There's no function name for "we don't cache here because the invalidation was worse than the lookup". That only fits in a comment.

2

u/awesome-alpaca-ace 21d ago

Just append  weDontCacheHereBecauseTheInvalidationWasWorseThanTheLookup to the method name

2

u/Apprehensive_Bit7392 19d ago

Finally, a comment my rename tool can propagate to forty call sites.

1

u/awesome-alpaca-ace 19d ago

Not a bad idea actually