git blame
Comment on [deleted]
bigbluealien@kbin.social 7 months agoStage 2, "why does this code have nothing to do with the very detailed comments?"
NegativeLookBehind@kbin.social 7 months ago
Savaran@lemmy.world 7 months ago
If the comments don’t match the code then someone failed to properly review it.
MajorHavoc@lemmy.world 7 months ago
Lol. That’s why we comment with “why”, rather than “what”. The answer to “what the duck where we even thinking?” usually doesn’t need updated until the commented code goes away.
Suppoze@beehaw.org 7 months ago
Never understood this argument, it’s the person’s responsibility who change the code to update the comments if needed. Otherwise they just implicitly admit that they did not read it and understand the context, or just plain does not care.
sebsch@discuss.tchncs.de 7 months ago
It just never works. Its important documentation breaks if changes are made. The best docs are baked into unittests
Traister101@lemmy.today 7 months ago
Always comment the why, not the what