From owner-freebsd-chat Sat Nov 23 22:54:28 2002 Delivered-To: freebsd-chat@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 69E7737B401; Sat, 23 Nov 2002 22:54:27 -0800 (PST) Received: from serenity.mcc.ac.uk (serenity.mcc.ac.uk [130.88.200.93]) by mx1.FreeBSD.org (Postfix) with ESMTP id 84C6B43E4A; Sat, 23 Nov 2002 22:54:26 -0800 (PST) (envelope-from jcm@FreeBSD-uk.eu.org) Received: from dogma.freebsd-uk.eu.org ([130.88.200.97]) by serenity.mcc.ac.uk with esmtp (Exim 4.10) id 18Fqev-0004XI-00; Sun, 24 Nov 2002 06:54:25 +0000 Received: from dogma.freebsd-uk.eu.org (localhost [127.0.0.1]) by dogma.freebsd-uk.eu.org (8.12.6/8.11.1) with ESMTP id gAO6sOPe049436; Sun, 24 Nov 2002 06:54:24 GMT (envelope-from jcm@dogma.freebsd-uk.eu.org) Received: (from jcm@localhost) by dogma.freebsd-uk.eu.org (8.12.6/8.12.6/Submit) id gAO6sO2i049435; Sun, 24 Nov 2002 06:54:24 GMT Date: Sun, 24 Nov 2002 06:54:24 +0000 From: Jonathon McKitrick To: Brad Knowles Cc: Terry Lambert , John Baldwin , freebsd-chat@FreeBSD.org Subject: Re: Style(9) question Message-ID: <20021124065423.GA48968@dogma.freebsd-uk.eu.org> References: <3DDF241B.FF30ACE2@mindspring.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4i X-Scanner: exiscan for exim4 (http://duncanthrax.net/exiscan/) *18Fqev-0004XI-00*LjXIkfYDDr.* Sender: owner-freebsd-chat@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org 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