About the stylistic note, Code Complete chapter 18.2 cites
a study
Program Indentation and Comprehensibility
from 1983 which found that a 6 space indent resulted in
lower comprehension than a 2 or 4 space indent did. But
the same study reported that many of the people in the
study self-evaluated the 6 space indent as being the easiest
to read, even as they scored worse on it! (The same study
found that an indent in the range 2-4 spaces was optimal.
Which one you use doesn't matter, that you use one does.)
Your pair of 3-space indents amounts to a 6-space indent.
Exactly the combination that had people's self-reporting
about usability conflicting with their actual performance.
In my books aesthetic judgements lose to performance every
time!
Therefore I would suggest that you either change your
overall layout style, or change from 3 characters at each
step to 2.
Steve McConnell goes on in 18.4 to say why
he thinks that a double-indentation style is a bad idea
due to the fact that the resulting code winds up looking
far more complex than it is. However the actual research
he found didn't really show whether or not there was a large
real difference. Therefore while I agree with him that you
are making the mind process a large amount of irrelevant
structure at a glance, I wouldn't say that item is nearly
as important as making your overall indentation smaller.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.