Python is readable

Nathan Rice nathan.alexander.rice at
Fri Mar 30 20:15:20 CEST 2012

On Fri, Mar 30, 2012 at 12:20 PM, Chris Angelico <rosuav at> wrote:
> On Sat, Mar 31, 2012 at 12:46 AM, Nathan Rice
> <nathan.alexander.rice at> wrote:
>> I believe in the idea of "things should be as simple as possible, but
>> not simpler".  Programming as it currently exists is absolutely
>> convoluted.  I am called on to help people learn to program from time
>> to time, and I can tell you that we still have a LONG way to go before
>> programming approaches a global optimum in either the semantic or
>> syntactic space.
> Aside from messes of installing and setting up language
> interpreters/compilers, which are averted by simply having several
> pre-installed (I think my Linux boxes come with some Python 2 version,
> Perl, bash, and a few others), that isn't really the case. Starting a
> Python script is easy. Programming gets convoluted only when, and to
> the extent that, the task does.

It is true that program complexity is correlated with problem
complexity, language and environment complexity is undeniable.  If you
want to prove this to yourself, find someone who is intelligent and
has some basic level of computer literacy, sit them down at a computer
and ask them to solve simple problems using programs.  You could even
be nice by opening the editor first.  Don't help them, just watch them
crash and burn.  Then sit them in front of code that already works,
and ask them to modify it to do something slightly different, and
again just watch them crash and burn in all but the simplest of cases.
 It is painful - most of the time they just give up.  These same
people almost universally can describe the exact process of steps
verbally or in writing to do what is required without any trouble;
there might be some neglected edge cases, but if you describe the
failed result, often times they will realize their mistake and be able
to fix it quickly.

Jeff Atwood had an article about programming sheep and non programming
goats, and while he views it as a statement about people's failings, I
view it as a statement about the failings of programming.  Human
computer interaction is really important, and the whole prefab GUI
concept doesn't scale along any axis; people need to be able to
interact with their computers in a flexible manner.  In the beginning,
we had no choice but to bend our communication to the the machine, but
we're moving past that now.  The machine should respect the
communication of humans.  We shouldn't decry natural language because
of ambiguity; If we're ambiguous, the machine should let us know and
ask for clarification.  If we phrase things in a really awkward way,
the machine should tell us so, and suggest a more understandable
rendition (just like word processors do now).  If the machine does
something we didn't want based on our instructions, we should be able
to state additional requirements in a declarative manner.  Restricted
natural languages are an active area of current research, and they
clearly demonstrate that you can have an expressive formal language
that is also valid English.

Make no mistake about it, programming is a form of computer human
interaction (I figured that would be an accepted mantra here).  Think
of it as modeling knowledge and systems instead of pushing bits
around.  You are describing things to the computer.  To move from the
syntactic domain to my point about programming languages, imagine if
one person describes physics to a computer in French, and another
person describes chemistry to a computer in English.  The creators of
the computer made different languages act as disjoint knowledge
domains.  The computer is incapable of making any inferences in
physics which are informed by chemistry, and vice versa, unless
someone comes along and re-describes one of the disciplines in the
other language.  Worse still, if someone that only speaks Mandarin
comes along, the computer won't be able to tell him anything about
either domain.  Now imagine the creators of the computer decided that
an acceptable solution was to have people print out statements from
one domain in a given language, take it to another computer that scans
the printout, translates it to a different language, and prints out
the translated copy, then have that person take the translated copy
back to the original computer, and scan it again in order to ask a
cross cutting question. I hope from that perspective the paucity of
our current methods will be more apparent.

More information about the Python-list mailing list