Throwaway to [email protected] • 2 years agoWhat things really helped you toget better at programming?message-square107fedilinkarrow-up1120
arrow-up1120message-squareWhat things really helped you toget better at programming?Throwaway to [email protected] • 2 years agomessage-square107fedilink
minus-squarebigbluealienlinkfedilink16•2 years agoStage 2, “why does this code have nothing to do with the very detailed comments?”
minus-squareTraister101linkfedilink15•edit-22 years agoAlways comment the why, not the what/how. Bonus of doing this is you only need to update the comments when the why changes
minus-squareSavarancakelinkfedilink4•2 years agoIf the comments don’t match the code then someone failed to properly review it.
minus-square@[email protected]linkfedilink1•2 years agoLol. 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.
Stage 2, “why does this code have nothing to do with the very detailed comments?”
git blame
Always comment the why, not the what/how. Bonus of doing this is you only need to update the comments when the why changes
If the comments don’t match the code then someone failed to properly review it.
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.