> I think this is a simple readability and/or standards issue. For 
> example, the APA publication manual specifically separates the label 
> from the bracket in reporting statistics and degrees of freedom, for 
> example for an analysis of variance it is "F (2, 24)" not "F(2, 24)".

I'm not so sure.  At first glance, I say it might involve four
different psychological issues:  learning, perceptual distinction
issues, esthetic and bias issues, and and task-related scanning
issues.

1.
Learning.  Spacing may affect learning by providing cues (CD: role
expressiveness) as to how to interpret the line.  As Derek M. Jones
says, "if(" may be confused with a function call, whereas if all
keywords are consistently separated by whitespace, then it may
prove less confusing.  Still, I think its a bit of a stretch.  A
second point related to learning is that standards should
make learning easier because of the consistency.

2.
Perception distinction issues.  Wayne Gary cited Rayner's article and,
although I know little about this body of literature, I could offer
up the following quotation.  Don Norman, in chapter 3 of "Things that
Make Us Smart", notes the following:

 "A: Which number is larger?
        284 912
  B: Which number is larger?
        284 312
  Much to many people's surprise, experimental psychologists
  discovered that people can answer problem A faster than they can
  B. The time differences are small, small enough that you can't notice
  it yourself, but large enough to be easily measured through the
  appropriate experiments. Even though we experience both comparisons
  as immediate and effortless, B takes more time and effort than
  A. Why is this? So far, the only answer that accounts for all the
  findings is that the Arabic numbers are translated into a perceptual
  image---an additive representation---before the comparison is
  performed.  The greater the perceptual difference, the easier the
  task."

>From this there's two things to note.  First, the difference may not be
noticeable even if small differences in perfromance are experimentally
measurable.  Who cares about such timing differences other than
notation designers with absolutely nothing else to worry about?  The
second is that even seemingly minor perceptual distinctions may be
important.  That could provide an armchair argument for adding a
space.

3.
Esthetic and bias issues.  Some people really hate different spacing.
That could affect the reader.  For instance, someone's promotion might
depend upon a manager perceiving that a developer's code is solid and
professional.  I know of absolutely no work on this sort of issue, and
since it is generally outside cognitive science's currently limited
scope, I suspect you'll only find related research in something like
JMIS (J. Manag Info Sys).

4.
Task-related scanning issues.  A fourth psychological issue is how
tasks and goals affect the use of the notation.  If one is reading
the code carefully in a code inspection, my gut feeling is that
no spacing variations matter except that some forms will offend the
esthetic tastes of the reader.  What about someone searching for a
specific comparison in a body of code (such as in an
if-else-else---then chain)?  Then spacing may hinder effective
perceptual search.  In particular, is may be that

  if ( foo == bar )

is easier to scan for comparisons than

  if(foo == bar)

or

  if (foo == bar)

Unlike in #2 above, that task-related issue may be important since,
although speed might not be an important issue, accuracy might very well
be.  For example, missing a case during search could be disasterous.
You MAY be able to twist this sort of argument into a case for why
you should always add space after a keyword.

> However, although intuitively it seems that spaces increase 
> readability, I believe that the research on reading suggests that 
> eliminating spaces betweenwordsasinthisline does not significantly 
> decrease speed. I am not quite sure where I picked up this 
> counterintuitive factoid, but it might have been cited in:
> [snip]

Ewww, that IS surprising if true.  Does some other distinguishing
feature need to be there as in MixedCaseIdentifiersAreOK? but
nonmixedcaseidentifierssuck?

Andrew

- Automatic footer for [EMAIL PROTECTED] ----------------------------------
To unsubscribe from this list, mail [EMAIL PROTECTED]  unsubscribe discuss
To join the announcements list, mail [EMAIL PROTECTED] subscribe announce
To receive a help file, mail [EMAIL PROTECTED]         help
This list is archived at http://www.mail-archive.com/discuss%40ppig.org/
If you have any problems or questions, please mail [EMAIL PROTECTED]

Reply via email to