Subject: Re: 8-space indents considered harmful
To: Ian Dall <email@example.com>
From: Jonathan Stone <jonathan@DSG.Stanford.EDU>
Date: 01/24/2000 06:04:26
>Be realistic. Every experiment is done to prove or disprove a
Acutally, that's not true. Since Hume, it's been widely known Hume
that experiments don't prove hypotheses, anymore than we can prove
testing that programs dont have bugs. A small point, but hte kind of
thing that gets careful scientists or good programmers unhappy.
> In this case it seems there hypothesis is not really about
>code at all but about how human perception works. I can't imagine a
>bunch of psychologists would have a vested interest in a particular
True. But an experiment well designed to measure perception
measures perception, not coding style. There are very good
reasons to susect that what holds true for one language and
formatting style my not hold true for another.
I vaguely recall seeing this paper in the mid-80s. There was
some interest, where I was at the time: should the style used
in introductory programing classes change to match?
The suspicion at the time was that the style used in the study
was textbook PASCAL: each BEGIN and END on a separate line,
indented two spaces. The bodies of most blocks end up being intented
four spaces from the surrounding block or IF, WHILE, REPEAT.
If that's what they did, the conclusions for OTB are obvious. It
could also easily be that the aspect ratio or even absolute size
(technically, the angle subtended by a character) matter, since in
non-CS, normal text studies, a lot of this comes down to eye movement;
how much is in the area of immediate focus, and how far, and how
often, you have to move your eyes between chunks the eye can take in
[qI'm typing this on a 60x80 xterm which has about half the area of an
A4 page. I find two spaces far too little: it just doesn't stand out
enough. That could be entirely consistent with the human-perception
results of an early-80s study done using hardcopy printout.
>> - It was done for a very different language (Pascal).
>But human perception no doubt hasn't changed. It would be interesting
>to see the experiment duplicated for C and other languages but in the
>absence of those results, using the results one does have instead of
>blind prejudice seems reasonable.
A real study on C code indented using OTB would be wonderful. Absent
that, informed extrapolation which takes into account differences
between C and Pascal, and display technology in the meantime (from
paper to LCD, with changes in both size and aspect ratio), seems better
than simly taking the conclusions of a study which we know measured
slighty different characteristics, along two different dimensions.
On the rest, I agree with Ian -- about both some of the criticims
levelled at the cited study and of Mike Cheponis's chances at getting
it through. On the laziness fron, I'm not sure: OTB always looked
good in published, printed books like K&R1.