this post was submitted on 05 Aug 2023
919 points (96.2% liked)

Programmer Humor

19494 readers
538 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 2 points 1 year ago (1 children)

I just get AI to write my comments lol. I'll paste the function or component and tell it to write comments in tsdocs format and it works great every time (I will also add to it sometimes of course).

Don't get me wrong, I also write clean code with good function and variable naming, but I find comments are also useful for a few reasons; they make the code even more quickly readable, they can explain why the code is the way that it is, and my favorite reason, they make it so when you hover over a reference to the commented item in an ide you get an explanation of exactly what the code does and what it expects without having to find and read the code itself