home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.software-eng
- Path: sparky!uunet!usc!rpi!zaphod.mps.ohio-state.edu!sdd.hp.com!spool.mu.edu!yale.edu!ira.uka.de!slsvaat!josef!kanze
- From: kanze@us-es.sel.de (James Kanze)
- Subject: Re: C code Layout
- In-Reply-To: lfd@cbnewsm.cb.att.com's message of Mon, 14 Dec 1992 23:55:21 GMT
- Message-ID: <KANZE.92Dec15171105@slsvdnt.us-es.sel.de>
- Sender: news@us-es.sel.de
- Organization: SEL
- References: <1992Dec14.074411@eklektix.com> <1992Dec14.175533.8400@fcom.cc.utah.edu>
- <1992Dec14.235521.1557@cbnewsm.cb.att.com>
- Date: 15 Dec 92 17:11:05
- Lines: 30
-
- In article <1992Dec14.235521.1557@cbnewsm.cb.att.com>
- lfd@cbnewsm.cb.att.com (Lee Derbenwick) writes:
-
- |> One reason that I personally dislike very large comments embedded in
- |> the code is that they greatly reduce the amount of code within my
- |> visual field (whether on a screen or on paper): they increase the
- |> number of fingers I need to read the code. [An interesting
- |> "difficulty" metric that I've seen attributed to Tom DeMarco.]
-
- I was surprised that this argument wasn't mentioned earlier in this
- thread, as it seems quite popular, at least amongst Cambridge
- graduates, where it seems to be called the band width theory. (A
- screen or a sheet of paper has a certain "band width", determined by
- the number of characters it can contain, and the goal is to use this
- band width in an optimal fashion.)
-
- Of course, this means that you also put several short statements on
- the same line, code on the same line as the opening brace, etc. And
- of course, you never, never leave a line blank.
-
- This also argues for short variable names. (They increase the chances
- of getting more than one statement on a line.)
-
- In case it's not obvious from the tone of my comments, I am in total
- disagreement with this style.
- --
- James Kanze email: kanze@us-es.sel.de
- GABI Software, Sarl., 8 rue du Faisan, F-67000 Strasbourg, France
- Conseils en informatique industrielle --
- -- Beratung in industrieller Datenverarbeitung
-