@Vordimous@lemmy.ml to Programmer Humor@lemmy.ml • 1 day agoComenting codelemmy.mlimagemessage-square90fedilinkarrow-up1994arrow-down18
arrow-up1986arrow-down1imageComenting codelemmy.ml@Vordimous@lemmy.ml to Programmer Humor@lemmy.ml • 1 day agomessage-square90fedilink
minus-square@xmunk@sh.itjust.workslinkfedilink6•22 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-square@darklamer@lemmy.dbzer0.comlinkfedilink2•18 hours 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; }