Re: tab characters in news

From: Michael Wojcik (mwojcik_at_newsguy.com)
Date: 05/12/04


Date: 12 May 2004 16:04:27 GMT


In article <%xymc.47672$Xj6.807049@bgtnsc04-news.ops.worldnet.att.net>, Nick Landsberg <hukolau@NOSPAM.att.net> writes:
>
> P.S. - I wonder how much "coding" style vs. "formatting"
> style is influenced by useful screen size? Way back when,
> in the days of only "24x80" monitors, I had a kind of
> "rule of thumb" about that ...
>
> For example, if I was working in a big "switch" statement,
> and the logic within a branch of the switch exceeded
> about two screen's worth, it made me (probably subliminally)
> decide to make that into a function call. My rationale
> was that I wanted to clearly see the "flow of control"
> (i.e. the "switch") without getting bogged down in the
> details of what went on within each branch. The same
> went for if-else if-else constructs.

I worked with some folks at IBM who in a previous assignment had
been given a "picture-on-a-page" style rule: if a function didn't
fit on a single *** of paper, it was too long and had to be
decomposed into smaller functions.

I certainly started using more vertical whitespace once I started
working in environments where I could display a lot of lines of
text (xterms on Unix, and vim in a tall "command prompt" window on
Windows). These days, for example, if a C function call doesn't fit
on a single line (no more than 79 characters, including indent),
I generally format it as:

   result = function
   (
      p1
    , p2
    , p3
   );

in parallel with my current preferred block style of:

   if (cond)
   {
      s1;
      s2;
   }

I'm not entirely happy with these, but I do find them readable and
maintainable. Back when I was limited to 25 lines on screen, I would
have avoided line breaks where possible, so I could keep more context
in view. (An exception was when working on the AS/400 using 5250
terminals, because the editor, the otherwise-awful SEU, had an XEDIT/
ISPF-style "exclude" feature that let you temporarily hide blocks of
lines. In many cases that let me view just the important bits of
longer blocks.)

-- 
Michael Wojcik                  michael.wojcik@microfocus.com
Art is our chief means of breaking bread with the dead ... but the social
and political history of Europe would be exactly the same if Dante and
Shakespeare and Mozart had never lived.  -- W. H. Auden

Quantcast