1195
Comenting code (lemmy.ml)
(page 3) 8 comments
sorted by: hot top controversial new old
[-] russ@cupoftea.social 1 points 1 week ago

@Vordimous @linuxgal when I see this sort of thing when reviewing PRs, I write words to the effect of "tell me WHY it's doing that, not WHAT it's doing". The "what" is usually obvious from the code and thus not worthy of comment. The "why" will enlighten your colleagues (and future you).

[-] sjh@sh.itjust.works 0 points 2 weeks ago

Commenting code is a super important habit to get into—it not only helps others understand your thought process but also makes it easier for you to pick up where you left off if you revisit the code later. Plus, well-commented code can significantly reduce the onboarding time for new developers on a project. Remember, comments should explain the "why" behind the code, not just the "what." For instance, stating why you chose a particular algorithm or data structure can be far more helpful than just labeling it. According to a study by SmartBear, 44% of developers regard poorly documented code as a top cause of project delays, so it’s definitely worth the extra effort!

load more comments (3 replies)
[-] JokeDeity@lemm.ee 0 points 2 weeks ago

Is this clock wrong half the time or am I just dumb?

load more comments (4 replies)
load more comments
view more: ‹ prev next ›
this post was submitted on 28 Sep 2024
1195 points (99.1% liked)

Programmer Humor

32251 readers
195 users here now

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

Rules:

founded 5 years ago
MODERATORS