This content originally appeared on Go Make Things and was authored by Go Make Things
Dr. Kate Compton shared this delightful little one-sentence gem about how to write good comments on Twitter last week…
Programming pro tip: In your comments, write what you did and why, record your level of petulance (REALLY) and the StackOverflow link that made you realize something
She also shared a sample comment, which I’ve converted to JSDoc style.
/**
* Copy into the local scope
* NOTE: this has issues with scope for eval'ing list comprehensions, which sucks
* {@link https://stackoverflow.com/questions/45194934/eval-fails-in-list-comprehension}
*/
I love it!
This content originally appeared on Go Make Things and was authored by Go Make Things

Go Make Things | Sciencx (2022-03-01T15:30:00+00:00) How to write good comments. Retrieved from https://www.scien.cx/2022/03/01/how-to-write-good-comments/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.