Dr. Dobb's Python-URL! - weekly Python news and links (Mar 26)

Geoff Gerrietts geoff at gerrietts.net
Wed Mar 27 13:42:59 EST 2002


Quoting Gonçalo Rodrigues (op73418 at mail.telepac.pt):
> On Tue, 26 Mar 2002 20:04:50 -0800, Geoff Gerrietts
> <geoff at gerrietts.net> wrote:
> 
> >Quoting Courageous (jkraska at san.rr.com):
> >> 
> >> >I'd say the skills required to write clear, readable
> >> >software and clear, readable novels are not entirely
> >> >disjoint!
> >> 
> >> Oh certainly not, you just haven't backed up to a big
> >> enough perspective of the cognitive domain. :)
> >
> >I think poetry and code are actually very similar. Some day I may
> >write a paper on that thesis, but I'm still living the experience
> >today....
> 
> Poetry and coding are similar in that they are both creative activities
> needing inteligence, imagination, etc. But there is also a world of
> difference between the two. A simple way to see this is how they relate
> to their heritage, their common dead.

I think the startling similarity that I see is that code is in many
ways an extremely strict form of poetry. If you look to things like
the Perl poetry contests, and even the innumerable obfuscated code
contests, these are artistic in a way that forms a sort of continuum.

Writing code is a lot like writing a poem, with a vocabulary that is
extremely restricted and formal requirements that are invariably
rigid. The sense of meaning one derives from a program is generally
more pragmatic than what one gets from a poem. But both are
appreciated as much for what they say as for how they say it. 

One notable difference between programming and poetry is that a
programming cliche is acceptable, a rote that people are encouraged to
re-use, whereas dropping someone else's clever turn of phrase into
your poem is likely to backfire.

I'm still a long way from a thesis, but I think the similarities are
pretty astounding.

And I don't think I can comment extensively on the "common dead",
given that poets tend to take about 25 or 50 years to rise to
prominence, and the widespread practice of programming in 3rd gen
languages is still somewhat younger than that. I can comment on the
"common living", though -- Silicon Valley and the Bay Area are both
full of people who went to school for English and fell into writing
HTML, Perl, PHP. I can't comment extensively on the quality of the
code these writers-cum-programmers generate, but I'll bet their
comments are at least a bit more intelligible -- and I'll bet their
code is more readable.

I've been programming for a long time -- most of my life at this
point, and professionally for a bit more than 6 years. But my
education was in poetry; I was trained as a poet, and somewhat
successful at it, winning a few awards and being published in some out
of the way places.

I returned to programming when I realized that I was pretty good at
writing, but I couldn't bring myself to do it in my spare time -- I
was instead spending that spare time learning new programming
languages, or learning Linux system administration. I didn't enjoy
reading poetry all that much, but I could sit down and read a book on
OO design or advanced programming techniques without hesitation.

So I respect the differences; there are many, and I've chosen my road
because of them. But the principal values of poetry: no wasted words,
clear expression, clever expression, best use of language -- these
values translate directly into writing code.

Maybe that thesis isn't so many years off, after all....

--G.

-- 
Geoff Gerrietts <geoff @ gerrietts.net> "Many a man's reputation would not 
                                         know his character if they met on 
http://www.gerrietts.net/                the street." --Elbert Hubbard




More information about the Python-list mailing list