Date: Tue, 2 Oct 2001 13:00:31 +0100 From: j mckitrick <jcm@FreeBSD-uk.eu.org> To: Brad Knowles <brad.knowles@skynet.be> Cc: freebsd-chat@freebsd.org Subject: Re: code density vs readability Message-ID: <20011002130030.C97629@dogma.freebsd-uk.eu.org> In-Reply-To: <p05100334b7d8e6544d17@[194.78.144.27]>; from brad.knowles@skynet.be on Thu, Sep 27, 2001 at 04:26:05PM %2B0200 References: <20010927141333.A44288@dogma.freebsd-uk.eu.org> <p05100334b7d8e6544d17@[194.78.144.27]>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011002130030.C97629>