1217
Comenting code (lemmy.ml)
submitted 10 months ago by [email protected] to c/[email protected]
you are viewing a single comment's thread
view the rest of the comments
[-] [email protected] 6 points 10 months ago

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.

[-] [email protected] 3 points 10 months ago

Doesn't need any comment:

int getCount() { return count; }

Absolutely needs a very extensive comment:

double getBojangleFlux { return fubar * .42; }

this post was submitted on 28 Sep 2024
1217 points (99.1% liked)

Programmer Humor

37539 readers
101 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS