Re:Systemd for Developers I (2011)
by Someone on Wednesday September 17, 2014 @02:17PM
(#8331478)
"How, what, why"
Use code for describing how your program does what it does, function-level comments for what it does in cases where you cannot put that in the name of a type or identifier (getFoo typically does not need a comment, but strtok does) and sprinkle in comments why your program does what it does in the way it does where that may not be clear to the expected reader of your code (as in the example of the AVL tree in a sister comment)
Use code for describing how your program does what it does, function-level comments for what it does in cases where you cannot put that in the name of a type or identifier (getFoo typically does not need a comment, but strtok does) and sprinkle in comments why your program does what it does in the way it does where that may not be clear to the expected reader of your code (as in the example of the AVL tree in a sister comment)