All,

I'm new to this list.  My background is compilers (computer language
translators) and for the last eight years software applications testing
(looking for faults, portability issues, etc).  Until a year ago I had
read nothing more than some popular/introductory books on psychology
and the mind.

For the last year I have been writing a detailed book on the new C
standard (C is widely used in embedded systems, ie cameras, coffee
machines, airplanes, cars, medical equipment; the latest International
Standard was published last year).

A number of organisations have produced coding guidelines for C usage
(www.misra.org.uk publish one of the better ones, for use in the
automotive industry).  These guidelines say things like "Don't use this
construct", "Do things this way".  Guidelines are usually created by
people sitting in a room, coming up with lists of common mistakes they
have seen in software and then creating a rule that says don't do such
and such (yes this does result in some useless guidelines, but the ones
worth having out weigh the rubbish).

As part of my detailed analysis of C I am including a subsection on coding
guidelines for each construct.  It struck me that many guidelines were
the result of human failings and that cognitive psychology might have
something to say about the issue.

Researching back through the published work, first in the computer
journals and eventually the psychology ones, uncovered some interesting
looking research.  But the more I learnt the more unhappy I became.
Beneath the surface these papers had a distinctly unscientific feel
to them.  Knowing nothing about psychology I did not feel confident
to challenge them.  Then I discovered "The psychological study of
programming" by B.A.  Sheil, Computing Surveys Vol 13, No 1, March 1981.
I agreed with everything he said.  A lot of the research up until 1981
was not scientific at all and the result bogus.

So where are we today, 20 years later?

I cannot find any research that suggests leaps in understanding of the
practicalities of programming.  Have people given up on this kind of
research because it is to hard and expensive to do?

Are coding guidelines doomed to be continued to be created by old farts
sitting in meetings telling everybody what they used to do in the old days
and that todays programmers don't know how to write software?  Is there
no scientific basis for how programmers should write their software?

It is generally agreed that coding guidelines do need to be free from
interpretation.  So a rule that says "Use meaningful identifiers"
is good advice, but completely unenforcable without a definition of
meaningful (the practice these days is to prefer rules that can be
enforced automatically with tools that process the source).

For example I would love to use the results from "Program indentation
and comprehensibility" by Miara et al, in CACM Nov 1982, Vol 26 No 11.
But having seen a lot of other, earlier, work, using similar subjects and
techniques shot down by Sheil I am uncertain.  Where are the follow up
studies by other people?  Do I take a brand name approach, Schneiderman
is widely referenced and his name is on this paper.  Do use it because
the results happen to agree with my own experience?

Should I ignore cognitive psychology and go back to impressing people
with my experience and looking impressive as I tell them that I know
what I am doing?

derek

--
Derek M Jones                                                  tel: +44 (0) 
1252 520 667
Knowledge Software 
Ltd                                     mailto:[EMAIL PROTECTED]
Applications Standards Conformance Testing       http://www.knosof.co.uk

Reply via email to