@Vordimous@lemmy.ml to Programmer Humor@lemmy.ml • 3 months agoComenting codelemmy.mlimagemessage-square105fedilinkarrow-up11.22Karrow-down110
arrow-up11.21Karrow-down1imageComenting codelemmy.ml@Vordimous@lemmy.ml to Programmer Humor@lemmy.ml • 3 months agomessage-square105fedilink
minus-square@xmunk@sh.itjust.workslinkfedilink6•3 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-square@darklamer@lemmy.dbzer0.comlinkfedilink4•3 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; }