tough-to-explain Python

Hendrik van Rooyen mail at
Sat Jul 11 17:10:04 CEST 2009

 John O'Hagan  wrote:

>The drawings produced by an architect, the script of a play, the score of a
piece of music, and the draft of a piece of >legislation are all examples of
other things which are "useless" until they are interpreted in some way.


>There are countless human activities which require a program, i.e. a conscious
plan or strategy, formed at least partly >by a creative process, and a computer
program is just a special case of this.

The difference is that for a piece of music, or a recipe for
"bobotie", there is room for artistry also in the performance
or preparation.

If the piece of music is reduced to a scroll with holes in it
and played on a pianola, then nobody in his right mind
would call the mechanically produced sounds
"a great performance".

And this is the essential difference that sets programming apart from
cookbook writing or drawing architectural plans - the one thing that
makes the real difference is the mindlessness of the performer.

(maybe I should conceed that writing legislation is a form of
programming, as the constabulary does not have a reputation
for anything other than a plodding consistency)

>I use Python as a tool for writing music, but I find I need both logical
reasoning and creativity to do either. In fact, I >find programming very similar
to writing music in a rigorous contrapuntal style, where each set of choices
constrains >each other, and there is a deep aesthetic satisfaction in getting it

Getting it right has to do with the design, not the programming -

Have you ever struggled to get something right, and then one day
you take a different tack, and suddenly it is as if you cannot do
anything wrong - everything just falls into place? - That is the time
that you get the good feeling.

The difference between the one and the other is the difference
between bad or indifferent design and good design.  When you
have a good design, the rest follows.  If your design is crud, no
matter what you do, you struggle and nothing comes out just
right, despite heroic effort.

Now this stuff is easy to talk about, and immensely difficult to
do - it takes experience, some skill, some cunning, and a
willingness to experiment in an egoless fashion, amongst other

And then the stupid compiler completely screws up your intent...

- Hendrik

More information about the Python-list mailing list