Code layout and debugging time
Jonathon McKitrick
jcm at FreeBSD-uk.eu.org
Tue Apr 22 10:25:57 PDT 2003
On Tue, Apr 22, 2003 at 01:12:32PM -0400, Lowell Gilbert wrote:
: 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.
Well, it was given to me by a software manager here at work. But I have
been modeling my code largely after style(9). Frankly, I think my code is
far more readable as a result.
But in the process of surveying the source tree, as well as the rationale in
this MSFT press book, I thought it raised some interesting questions.
-----8<--------------
: > 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).
Sixteen percent would mean every 6 lines or so. That seems far too dense in
my opinion. Even when you look at hardware drivers in the kernel, there are
often only 1 or 2 lines together, separated from the rest by comments and
whitespace. I just don't get how debug time would 'increase dramatically.'
NOTE: Please CC me, as I am not currently subscribed. Thanks.
jm
--
My other computer is your windows box.
More information about the freebsd-chat
mailing list