Skip site navigation (1)Skip section navigation (2)
Date:      22 Apr 2003 13:12:32 -0400
From:      Lowell Gilbert <freebsd-chat-local@be-well.no-ip.com>
To:        freebsd-chat@freebsd.org, Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
Subject:   Re: Code layout and debugging time
Message-ID:  <444r4qmp6n.fsf@be-well.ilk.org>
In-Reply-To: <20030422132906.GB64101@dogma.freebsd-uk.eu.org>
References:  <20030422132906.GB64101@dogma.freebsd-uk.eu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Jonathon McKitrick <jcm@FreeBSD-uk.eu.org> writes:

> I was just reading an interesting statement in Code Complete:

Ah.  You are trying to indoctrinate yourself into Microsoft's ideas of
good practices.  Thanks for warning us.

> "Although this particular statistic may be hard to put to work, a study by
> Gorla, Benander, and Benander found that the optimal number of blank lines
> in a program is about 8 to 16 percent.  Above 16 percent, debug time
> increases dramatically (1990)."
> 
> Doesn't this seem to contradict the idea that clear, well-formatted code
> with lots of blank lines is easier to read and understand?  How could
> debugging be any different?

No contradiction at all.  It just shows that the definition of "lots
of blank lines" is somewhere below 16%.  Assuming we can trust the
study (but it sounds about right to me).

> As a side note, perhaps it is simply legacy code, but it seems that the
> older the source in the BSD tree, the denser it is.  Probably to save
> punched cards, eh?  ;-)

More or less.  That 'definition of "lots of blank lines"' is probably
affected by the total amount of screen space available.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?444r4qmp6n.fsf>