3 ms·
Jason Baker starts out by saying that writing good comments is under appreciated, and it seems that he is going to show us how to write good comments, but then
by NathanKP 17y ago
Jason Baker starts out by saying that writing good comments is under appreciated, and it seems that he is going to show us how to write good comments, but then he goes on to attack comments by listing "misconceptions" that seem to suggest that most comments are worthless.
In the end I'm not quite sure what points he was trying to get across, but I like to use comments to keep track of logic flow.
I tend to write my pseudocode as comments by listing the main steps that a function needs to accomplish as comments within the function body. Then I fill in the appropriate code under each comment. I personally use this method because not only does it make the code easy to read, but if I stop in the middle of the project to sleep or to eat something I can come back, reread the comments and get that whole mental framework rebuilt.