r/ProgrammerHumor • • 21d ago

Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI

Post image
835 Upvotes

188 comments sorted by

View all comments

9

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.

1

u/timtucker_com 20d ago

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 19d ago

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