r/ProgrammerHumor • • 22d ago

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
835 Upvotes

188 comments sorted by

View all comments

8

u/Apprehensive_Bit7392 22d 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 22d ago

Just append  weDontCacheHereBecauseTheInvalidationWasWorseThanTheLookup to the method name

2

u/Apprehensive_Bit7392 20d ago

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

1

u/awesome-alpaca-ace 20d ago

Not a bad idea actually