odama626@lemmy.world to Programmer Humor@programming.dev · 2 years agomemelemmy.worldimagemessage-square16linkfedilinkarrow-up1129arrow-down12
arrow-up1127arrow-down1imagememelemmy.worldodama626@lemmy.world to Programmer Humor@programming.dev · 2 years agomessage-square16linkfedilink
minus-squarebloubz@lemmygrad.mllinkfedilinkarrow-up7·2 years agoComments should almost always be reserved to “why” and not “what” or “how”. Give extra context that can not be brought in another way. The rest should be clear from the code
minus-squaresimple@lemmy.mywire.orglinkfedilinkarrow-up6·2 years agoMy “why” comments: // This is here because if I remove it, the whole server panics, no idea why. So don't delete it.
minus-squareDeebster@lemmyrs.orglinkfedilinkEnglisharrow-up0·2 years agoI upvoted this, but actually I hardly ever see this style of commenting. Maybe it’s because I never got very far into corporate coding.
Comments should almost always be reserved to “why” and not “what” or “how”. Give extra context that can not be brought in another way. The rest should be clear from the code
My “why” comments:
// This is here because if I remove it, the whole server panics, no idea why. So don't delete it.
I upvoted this, but actually I hardly ever see this style of commenting. Maybe it’s because I never got very far into corporate coding.
deleted by creator