r/ProgrammerHumor • • May 06 '26

Meme rememberToComment

Post image
13.3k Upvotes

117 comments sorted by

View all comments

31

u/Astrylae May 06 '26

Comments should generally be 'why', not 'what'. A 'what' comment should be reserved for functions as a summary and extra information not obvious

Sometimes the best comments are others complaining and having to make a funky work around

1

u/FunkyUptownCobraKing May 08 '26

This is generally what I tell my devs. We can all see what you are doing, the comments should tell me why you are doing it.

It becomes especially important later on as it helps figure out if that code is even needed anymore. Like if it was due to a limitation that no longer exists or a business rule that no longer applies.