4 ms·
I wonder why I don't hear more people talking about how Copilot et al have just totally changed the dynamic around writing comments in one's documentation. When
by hiAndrewQuinn 3y ago
I wonder why I don't hear more people talking about how Copilot et al have just totally changed the dynamic around writing comments in one's documentation. When a 1 line English language comment generates 5-12 lines of code better than most undergrads can write, of course you'd expect people to start writing more of these kinds of comments.
- dbg31415 3y agoFor every function, it's great to have a plain language comment explaining What it does and Why it does it. You can also include How it works (if it's sufficiently complex), and When you expect it to get called if you want. If you care at all about your future self, or others who have to look at your code, the best way to help is to leave a verbose history.
- s4i 3y agoIn the context of this article, I think Copilot is a big contributor in useless comments. If you have already written a block of code, and then go back and start writing a comment for it, the suggestion is almost always a naive and useless repetition of what’s happening directly before, much like the ”# create a user” example given in the article. I wish the comment suggestions could be disabled completely in the VSCode extension but it’s currently not possible: https://github.com/orgs/community/discussions/8062 https://github.com/orgs/community/discussions/8062
- hiAndrewQuinn 3y agoThey're not useless to me. I like seeing what the author was thinking in plain English.