r/ProgrammerHumor • u/Substantial_Top5312 • Sep 15 '26
Meme iDontCommentMyCodeIfYouDontUnderstandItThatsOkayNeitherDoI
832
Upvotes
r/ProgrammerHumor • u/Substantial_Top5312 • Sep 15 '26
View all comments
Show parent comment
3
u/Just_Information334 Sep 15 '26
Yup. If you only ever touch new code you may not understand why it is necessary.
Go on some 10+ yo project which got a lot of scope changes over the years. Now you can see that yes, the code does something. But why? Is it still useful? Can you remove it? If you do, will some client come complaining 6 months from now when their very specific report is not generated because some flag is not set correctly so some cron running on a server no one knows about anymore did not find its data?
The documentation? Maybe in some .doc file rotting on an archive server. But if you can't find it you may have more luck finding the printed version which should be in room 6. If it was not binned during the last office move.
On the other hand, let's check postgres code by opening a random file: https://github.com/postgres/postgres/blob/master/src/backend/partitioning/partprune.c
If you praise tailwind for the locality of behavior it gives, then you should also want why-comments next to the related code.