[Sussex] Code-writing methods
Nic James Ferrier
nferrier at tapsellferrier.co.uk
Thu Nov 16 23:29:34 UTC 2006
Steven Dobson <steve at dobson.org> writes:
>> Sherioushly, I believe this is the best advice. Comments are actually
>> harder to write than code.
>
> Not quite: Good comments are harder to write than code. Bad comments
> that tell you no more than the code are very easy to write
Yeah... sorry, that was my point.
>> I reiterate: code *is* communication.
>
> Agreed. But by itself it is incomplete. Code can never tell what a
> program is trying to do only how it is attempting to do it. I therefore
> believe that comments should be used to impart this vital piece of
> information to those that come after me (and me as one soon
> forgets!).
True. For me, variable and function names mostly perform that, errr...
function.
One of the areas where I do comment my code is where I have tried to
be clever. Cleverness is almost always a mistake and end up with the
"why did I do that? it's so clearly wrong" moments.
Gosling Emacs is famous for it's very clever display code and the
amusing comment that preceeds the code.
--
Nic Ferrier
http://www.tapsellferrier.co.uk for all your tapsell ferrier needs
More information about the Sussex
mailing list