Vordimous to Programmer Humor · 1 month agoComenting codeimagemessage-square105fedilinkarrow-up11.27Karrow-down111
arrow-up11.26Karrow-down1imageComenting codeVordimous to Programmer Humor · 1 month agomessage-square105fedilink
minus-squarexmunk@sh.itjust.workslinkfedilinkarrow-up6·1 month 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·1 month 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; }