Need to learn C, best books?

Nic Gibson nicg at
Fri Oct 26 14:30:33 BST 2007

On 10/26/07, Aaron Crane <perl at> wrote:
> Nic Gibson writes:
> > On 10/26/07, Dirk Koopman <djk at> wrote:
> > > K&R formatting good, anything else bad (and literally a waste of
> > > space).
> >
> > But then I waste space because space is cheap.
> I'm not so sure it is, in this context.  It seems pretty clear to me
> that the more code you can see on screen at once, the easier it is to
> understand.  With that in mind, note that (unlike, say, CPU transistor
> counts) screen lines are a non-renewable resource.

I was being a bit facetious.
Actually I find

sub mysub {


hard to read so I tend to write

sub mysub


and then perltidy it (or appropriate other language tool) for other
people. I just find lined up braces easier to read. I realise that I'm
in a minority and just reformat for the rest of the world.

> The limiting factor in how many lines can be displayed simultaneously
> is actually the way human vision works.  Increasing pixel counts
> doesn't help beyond a certain point: if the screen gets bigger, you
> have to put it further away to ensure you can see all of it, and if
> the pixels get smaller, you have to use more of them for each line of
> text you want to be legible.  (Subpixel text decimation counts as a
> cunning variant of "smaller pixels" for these purposes.)

I've found 2x20" display at 1600x1200 perfect.
Sadly, I now only have one of them.
> K&R differs from other brace styles in not spending precious screen
> lines on opening curlies whose presence a human can infer from the
> shape of the code.  That's a strong argument to make when choosing an
> indentation style for a fresh project.

Given what I just said, I actually agree with you. My brain just
doesn't work that way :)
I *do* write what was once describe as 'neurotically tidy code' tho
(only thing in my life that is tidy).

Nic Gibson
Director, Corbas Consulting
Editorial and Technical Consultancy

More information about the mailing list