1178
Comenting code (lemmy.ml)
you are viewing a single comment's thread
view the rest of the comments
[-] jbrains@sh.itjust.works 11 points 1 week ago

Write comments that explain why the code isn't obvious just by reading it. Why did you do things the long way? What did you need to work around? Why didn't you do the thing that anyone reading the code would expect you to do?

Also write comments that explain the purpose of the functions you use, in case the names of those functions don't make it clear on their own.

this post was submitted on 28 Sep 2024
1178 points (99.2% liked)

Programmer Humor

32197 readers
599 users here now

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

Rules:

founded 5 years ago
MODERATORS