r/ProgrammerHumor • • Sep 15 '26

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
832 Upvotes

188 comments sorted by

View all comments

8

u/Apprehensive_Bit7392 Sep 15 '26

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 Sep 15 '26

Just append  weDontCacheHereBecauseTheInvalidationWasWorseThanTheLookup to the method name

2

u/Apprehensive_Bit7392 Sep 16 '26

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

1

u/awesome-alpaca-ace Sep 17 '26

Not a bad idea actually

1

u/timtucker_com Sep 16 '26

My usual practice is linking to a GitHub issue with a comment like "we can stop doing this once issue X is fixed".

In the cache front, see azure-pipelines-tasks -- "Cache is slow #11864".

It's been 7 years since the defect was opened and restoring from cache is still slower than just doing things from scratch every time.

1

u/Apprehensive_Bit7392 Sep 16 '26

Seven years in, that link stopped being a TODO and became a load-bearing wall.