integers to binary

M

Michael Wojcik

I'm sorry to report that I don't have a reference. It's something I
remember reading at some point, but that was before I started keeping
track of references to such things. It's unfortunate, because I think
the programming community would benefit from doing more studies on
these kinds of issues and accumulating references to them.

Derek M Jones' _The New C Standard_[1] has an extended discussion on
source code readability with considerable reference to studies of
human vision, reading, and so forth. See the commentary on sentence
766 (the beginning of 6.4 in the Standard), which is PDF page 682 in
the version I have (1.0b). He notes:

Unfortunately there are no studies, using experienced developers,
that compare the effects of different source code layout on reading
performance. Becoming an experienced developer can be said to involve
learning to read source that has been laid out in a number of
different ways. The visually based guidelines in this book do not
attempt to achieve an optimum layout, rather they attempt to steer
developers away from layouts that are likely to be have high error
rates. (688)

He later discusses opening brace position and claims that "[t]here
are several reasons for believing that [placing the opening brace on
the same line as other non-white-space characters] results in a
larger number of mistakes being made than [placing it on a line by
itself]", but goes on to note that "[g]iven the lack of experimental
measurements of reading performance for different layout schemes,
there is no empirical evidence to support any guideline
recommendation relating to the visual layout of blocks" (1387).

I have to say that I find Jones' argument rather more persuasive than
a casual description of something someone remembers reading once some
time ago. It may be a fact that some study at some time concluded
that closing brace position X produced a lower error rate among
readers than did closing brace position Y; but at this point it's no
more than an assertion, and even if it is a fact, we lack any basis
on which to judge the study's usefulness. (For example, Jones
provides significant evidence to support the theory that practice
in reading a particular style considerably dominates any effect
inherent in that style. A study that failed to account for that in
some fashion would be useless.)

All that said, even if Tim's example was perhaps infelicitous, I take
his overall point: there are matters of fact relevant to questions of
style.


1. http://www.knosof.co.uk/cbook/cbook.html
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top