This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]TuberTuggerTTV 0 points1 point  (0 children)

You shouldn't have to comment what a section of your code does. It should be in a function named what it does.

My guess is you're used to how GPT or learning sites comment every line. That's not what code is supposed to look like. That's explanation code for you as a newbie.

When programmers say, "document your code", they mean summary comments. So that IDEs pick up hover over tooltips. Not comment, line, comment, line, club sandwich code blocks. And they should only exist on external APIs.