@[email protected] to Programmer [email protected] • 10 hours agoComenting codelemmy.mlimagemessage-square47fedilinkarrow-up1628arrow-down16
arrow-up1622arrow-down1imageComenting codelemmy.ml@[email protected] to Programmer [email protected] • 10 hours agomessage-square47fedilink
minus-square@[email protected]linkfedilink4•8 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@[email protected]linkfedilink1•4 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; }