Documenting source code
erik-poupaert.blogspot.com
erik-poupaert.blogspot.com
/** nTuple class */
class nTuple {
...
... or /** creates copy of nTuple */
static function copy($nTuple)
...
... or /** Creates a string representation of an n-tuple. */
static function toString($nTuple)
no wonder you will not be seeing the value of documenting. (Hint: just leave such trivial comments out. In case of "copy" function, you might want to tell us why would one need to create a copy, or why it's important. Or probably it's so obvious you should not bother at all!)Document what's surprising. Document "why" instead of "what". And don't just repeat yourself in comments.