Code layout and debugging time

Philip Paeps philip at paeps.cx
Tue Apr 22 16:10:31 PDT 2003


On 2003-04-22 21:01:01 (+0100), Colin Percival <colin.percival at wadham.ox.ac.uk> wrote:
> At 12:14 22/04/2003 -0700, Terry Lambert wrote:
> > If you ever find and Open Source that qualifies as "heavily commented",
> > let us know, and we can go take a look.
> 
> Well, not Open Source, but I have seen quite a few undergraduate programming
> assignments which have "pixie dust" comments.  Some people take their
> instructors' advice to "comment everything you write" a bit too seriously, I
> think.

Instructors often neglect to mention that if it can be said in code, there's
really no point in saying it again in a comment :-)

I occasionally even see things like this:

  /* this prints a line of text */
  fprintf(stdout, "a line of text\n");

Completely pointless.  The same people who will write that, however, will also
indulge in writing long blocks of extremely creative and 'dense' code, without
a comment anywhere in sight.  *sigh*

Someone should write a book about how to comment code.  Or a language which
ignores code and only compiles comments.  Like 'whitespace' which ignores
everything other than whitespace :-)

 - Philip

-- 
Philip Paeps                                          Please don't CC me, I am
philip at paeps.cx                                       subscribed to the list.

  You're ugly and your mother dresses you funny.


More information about the freebsd-chat mailing list