From owner-freebsd-chat Tue Oct 2 5: 0:46 2001 Delivered-To: freebsd-chat@freebsd.org Received: from serenity.mcc.ac.uk (serenity.mcc.ac.uk [130.88.200.93]) by hub.freebsd.org (Postfix) with ESMTP id 9D3D037B403 for ; Tue, 2 Oct 2001 05:00:33 -0700 (PDT) Received: from dogma.freebsd-uk.eu.org ([130.88.200.97] helo=dogma) by serenity.mcc.ac.uk with esmtp (Exim 2.05 #6) id 15oODw-0004CK-00; Tue, 2 Oct 2001 13:00:32 +0100 Received: (from jcm@localhost) by dogma (8.11.4/8.11.1) id f92C0Vx97839; Tue, 2 Oct 2001 13:00:31 +0100 (BST) (envelope-from jcm) Date: Tue, 2 Oct 2001 13:00:31 +0100 From: j mckitrick To: Brad Knowles Cc: freebsd-chat@freebsd.org Subject: Re: code density vs readability Message-ID: <20011002130030.C97629@dogma.freebsd-uk.eu.org> References: <20010927141333.A44288@dogma.freebsd-uk.eu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0.1i In-Reply-To: ; from brad.knowles@skynet.be on Thu, Sep 27, 2001 at 04:26:05PM +0200 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 Thu, Sep 27, 2001 at 04:26:05PM +0200, Brad Knowles wrote: | At 2:13 PM +0100 9/27/01, j mckitrick wrote: | | > what guidelines do you personally follow to balance readability vs | > efficiency of source code? | | Whatever feels right. ;-) It seems that changes every time I look at my code after working on something else for a while. :-) | > Can lack of blank lines and other whitespace easily become an impediment to | > readability? When (IYO) is there TOO much? | | Yup, this can be a problem. | | Myself, I see it like writing prose. I don't put a blank line | between every sentence, only between paragraphs. However, as verbose | as I am, sometimes even just a single sentence is several lines long, | and becomes a paragraph in and of itself. In C, I also like to put | opening and closing braces on a line by themselves, in a more | Pascal-like style as opposed to classic K&R style. I agree. I have emacs set for bsd-style indenting. Try reading some of the hardware driver code, or filesystem code. Especially the older stuff from Tahoe (IIUC). Those guys just all grokked what they were writing and could assume others did as well. It's a trial by fire for newbies reading it the first time. (See 'You are not expected to understand this' references ;-) 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