Code layout and debugging time
Lowell Gilbert
freebsd-chat-local at be-well.no-ip.com
Tue Apr 22 10:12:38 PDT 2003
Jonathon McKitrick <jcm at 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.
More information about the freebsd-chat
mailing list