Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Nov 2002 06:54:24 +0000
From:      Jonathon McKitrick <jcm@FreeBSD-uk.eu.org>
To:        Brad Knowles <brad.knowles@skynet.be>
Cc:        Terry Lambert <tlambert2@mindspring.com>, John Baldwin <jhb@FreeBSD.org>, freebsd-chat@FreeBSD.org
Subject:   Re: Style(9) question
Message-ID:  <20021124065423.GA48968@dogma.freebsd-uk.eu.org>
In-Reply-To: <a05200f22ba05d9465f9a@[192.168.0.3]>
References:  <XFMail.20021122160808.jhb@FreeBSD.org> <a05200f1eba04a864625b@[192.168.0.3]> <3DDF241B.FF30ACE2@mindspring.com> <a05200f22ba05d9465f9a@[192.168.0.3]>

next in thread | previous in thread | raw e-mail | index | archive | help

On Sun, Nov 24, 2002 at 02:23:53AM +0100, Brad Knowles wrote:
| 	I submit that in coding, less dense spaces caused by things like 
| braces can help improve the overall readability of the program, and 
| thus the probability of being able to more correctly maintain it.

This is exactly the argument put forth by 'Code Complete.'  The idea is to
use whitespace (blank lines, specifically) to break code into meaningful
paragraphs.  One interesting statistic was that the ideal ratio of blank
lines to code was 8%-16%, or one blank line every 6.25-12.5 lines.  Any more
blank lines than that, and the study showed that debugging time increased
dramatically.  I'd be curious to know why.

This same book advocates using braces for single-line conditionals as well.
The team I'm on tends toward the verbose, while I tend to be more terse.
However, blank lines seems to be my exception.  Visually, it makes more
sense to help the mind absorb information in meaningful patterns than simply
trying to fit as much as possible.


jm
-- 
My other computer is your Windows box.

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-chat" in the body of the message




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