Vordimous@lemmy.ml to Programmer Humor@lemmy.ml · 7 hours agoComenting codelemmy.mlimagemessage-square59fedilinkarrow-up1574arrow-down14
arrow-up1570arrow-down1imageComenting codelemmy.mlVordimous@lemmy.ml to Programmer Humor@lemmy.ml · 7 hours agomessage-square59fedilink
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up4·4 hours agoNot everything needs a comment - knowing when comments add value is the key… “what” vs “why” is usually a good indicator but some code just doesn’t need a comment.
minus-squaredarklamer@lemmy.dbzer0.comlinkfedilinkarrow-up1·29 minutes agoDoesn’t need any comment: int getCount() { return count; } Absolutely needs a very extensive comment: double getBojangleFlux { return fubar * .42; }
Not everything needs a comment - knowing when comments add value is the key… “what” vs “why” is usually a good indicator but some code just doesn’t need a comment.
Doesn’t need any comment:
int getCount() { return count; }
Absolutely needs a very extensive comment:
double getBojangleFlux { return fubar * .42; }