this post was submitted on 28 Sep 2024
600 points (99.5% liked)

Programmer Humor

32131 readers
1705 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
[–] Presi300@lemmy.world 2 points 5 hours ago

What I usually do is I explain what the function does and, if not self explanatory, explain why it does such thing. Like, with the clock example, I'd explain that it tells the time and then, if not immediately obvious, explain why the time needs to be known... Smth like that.

There is no "correct" way of commenting code. I personally think the more verbose, the better, but that's an unpopular opinion afaik. As long as the code can be understood, the comment is doing it's job.

PS, I'm also kinda new to programming, mostly doing JS and React stuff

spoilerI love putting memes in comments :P