tabs do WHAT?

Brett g Porter BgPorter at NOacmSPAM.org
Mon Jan 31 10:54:27 EST 2000


"Thomas Wouters" <thomas at xs4all.net> wrote in message
news:20000131153329.B19725 at xs4all.nl...
> """
> Tabs are 8 characters, and thus indentations are also 8 characters.
> There are heretic movements that try to make indentations 4 (or even 2!)
> characters deep, and that is akin to trying to define the value of PI to
> be 3.
>
> Rationale: The whole idea behind indentation is to clearly define where
> a block of control starts and ends.  Especially when you've been looking
> at your screen for 20 straight hours, you'll find it a lot easier to see
> how the indentation works if you have large indentations.
>
...except that studies of actual human programmers say otherwise. From Steve
McConnell's "Code Complete" (pp 409-410):
"The same study ['Program Indention and Comprehensibility', Miaria, et al,
1983] found...[t]he lowest comprehension scores were achieved on programs
that were not indented at all. The second lowest were achieved on programs
that used six-space indentation. The study concluded that two to four space
indentation was optimal. Interestingly, many subjects in the experiment felt
that the six-space indentation was easier to use than the smaller
indentations, even though their scores were lower."

The original study was printed in the Nov 1983 Communications of the ACM.






More information about the Python-list mailing list