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

Programmer Humor

32483 readers
358 users here now

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

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] xmunk@sh.itjust.works 6 points 1 month ago (1 children)

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.

[โ€“] darklamer@lemmy.dbzer0.com 3 points 1 month ago

Doesn't need any comment:

int getCount() { return count; }

Absolutely needs a very extensive comment:

double getBojangleFlux { return fubar * .42; }