[Python-Dev] pep8 reasoning
Robert Kern
robert.kern at gmail.com
Thu Apr 24 17:02:06 CEST 2014
On 2014-04-24 14:59, Barry Warsaw wrote:
> I will say this: the original preference for underscore_names in PEP 8 was
> spurred by user studies some of our early non-native English speaking users
> conducted many years ago. We learned that it was more difficult for many of
> them to parse mixedCase names than underscore_names. I'm afraid I probably no
> longer have references to those studies, but the difference was pronounced,
> IIRC, and I think it's easy to see why. Underscores can be scanned by the eye
> as spaces, while I'd hypothesize that the brain has to do more work to read
> mixedCase names.
A more recent set of studies show some mixedResults (ha ha). On a low-level
reading task, the studies agree with yours in that mixedCase takes more time and
effort; however, it appears to improve accuracy as well. On a higher-level
comprehension task, mixedCase took less or the same time and still improved
accuracy. Experienced programmers don't see too much of a difference either way,
but inexperienced programmers see a more marked benefit to mixedCase.
http://www.cs.loyola.edu/~binkley/papers/tr-loy110720.pdf
That said, I can't vouch for the experiments or the analysis, and it isn't
really germane to Chris' historical question. I mention it only because I had
just run across this paper last night, so it was fresh in my mind when you
mentioned studies on the subject.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
More information about the Python-Dev
mailing list