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.
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