mertz at gnosis.cx
Sat Feb 22 03:24:07 CET 2003
|Alex Martelli wrote:
|> Case sensitivity, while still small, is worse, because it
|> recurs EVERY time you use a large module for which you have
|> not fully memorized every case choice -- it keeps hurting your
|> productivity because you DO have to memorize, or check, every
|> such detail, forever.
Erik Max Francis <max at alcyone.com> wrote previously:
|Is the overhead between 1. remembering the thing's name and 2.
|remembering the way it's spelled taking into account conventions and
|case _all_ that significant?
I'm totally with Alex on this. The way I remember names is
semi-auditory; maybe because I spoke and heard before I wrote and
read.... or maybe because my distant ancestors did so (in an evolutioary
sense)... or maybe just because I'm the type of person who is like that.
I think that Alex' remarks over time indicate that he is the same sort
of person; we might not be the majority, but our type is certainly not
rare (i.e. verbal more than visual).
So when I want to use a module/class/function like... oh, say cStringIO,
I hear a little inner voice that says the name: "see-string-ay-oh".
Try reading some code over the telephone to someone, that's similar to
the how I imagine code. In fact, that very type of communication is
something I do a fair amount (or over a table, etc).
Actually, even before that, I probably think about the composite
meanings in the name: (1) I want to do input/output, and I know that
the abbreviation I/O, or i/o, or IO, is frequently used to refer to that
idea. And since a slash can't occur in a module name, it's probably
"IO" (or maybe "Io" if consistent CamelCase is used). (2) I know I want
to use string-like storage, as opposed to file-like storage.
Hmmm... would it be "string" or "String"? I have no real intuition to
guide me here... my hunch would be it would be lower case, like the
'string' module (which is wrong, of course). (3) I also know I want to
use the version that was coded in C rather than in pure-python. Hmmm...
would that be a "C" at the start? Well, no, it's a "c"... doesn't make
as much sense, but that's how it is (the pattern is also there in
cPickle, so maybe I remember that).
The truth is, I finally DO remember the right spelling for cStringIO
now... after having made errors in the spelling dozens of times (each
corrected relatively quickly by the Python compiler, plus a quick lookup
in the docs). But almost EVERY time I start playing with a new,
unfamiliar module/class/function I go through this very same process all
over again... and each time I come back to something I haven't used for
a while. Remembering the cases isn't the ONLY issue, by far. Lots of
different words, and combinations of words, might be used to describe a
given object. But most of the time in Python, some fairly
straightforward English words are used in the names of modules/classes/
functions; guessing the right term succeeds a fairly high percentage of
I'm not a beginner. I've programmed for more than two decades. I write
books and articles about programming. I've worked in a score of
different programming languages. But it is still a DAILY occurrences
that I trip up on casing issues when writing Python code. I expect that
it will continue to be a daily thing until I die, or stop using Python.
These little trip-ups hardly make Python bad, or really -difficult- to
use... but they certainly make it just a little bit less easy than it
would be with case-insensitivity.
_/_/_/ THIS MESSAGE WAS BROUGHT TO YOU BY: Postmodern Enterprises _/_/_/
_/_/ ~~~~~~~~~~~~~~~~~~~~[mertz at gnosis.cx]~~~~~~~~~~~~~~~~~~~~~ _/_/
_/_/ The opinions expressed here must be those of my employer... _/_/
_/_/_/_/_/_/_/_/_/_/ Surely you don't think that *I* believe them! _/_/
More information about the Python-list