3 ms·
Automated > Manual Proof > Tests == Documentation > Correct Comments > Nothing > Incorrect Comments None of these things are mutually exclusive, and all non-t
by AnIrishDuck 14y ago
Automated > Manual
Proof > Tests == Documentation > Correct Comments > Nothing > Incorrect Comments
None of these things are mutually exclusive, and all non-trivial code should ship with a combination (obviously excluding "incorrect comments"). I think inline comments should be relatively unneeded, and should only describe why you did something in an unusual or non-intuitive way. Otherwise, your code should require few comments, because what it does should be obvious.
Regardless, you sure as hell better document and/or test your interfaces. The nice thing about tests is that they can automatically be verified for correctness; documentation and comments cannot.