Vordimous@lemmy.ml to Programmer Humor@lemmy.ml · 2 months agoComenting codelemmy.mlimagemessage-square101fedilinkarrow-up11.19Karrow-down112
arrow-up11.18Karrow-down1imageComenting codelemmy.mlVordimous@lemmy.ml to Programmer Humor@lemmy.ml · 2 months agomessage-square101fedilink
minus-squarexmunklinkfedilinkarrow-up6·2 months 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-up3·2 months 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; }