top | item 10478248

Is Programming Poetry?

55 points| andyraskin | 10 years ago |medium.com | reply

51 comments

order
[+] dang|10 years ago|reply
Much of this thread is a dismaying example of responding only to the title. Titles are the bikesheds of HN.

This is an article about learning programming from Alan Perlis in 1983—a rich topic. "Is programming poetry?" was obviously not meant to be taken literally: the subtitle is "yes and no" and the text makes clear that Perlis was being provocative. The article deserves deeper attention than this. It's about learning programming from a master who used unconventional methods, and a first-hand report on what Perlis himself wrote about in http://www.jsoftware.com/papers/perlis77.htm.

[+] andyraskin|10 years ago|reply
Wow, thank you for that link. Never saw it before. Perlis really did deliver on his intention to give us a "pou sto to last the student for 40 years, not a handbook for tomorrow’s employment." Every time I've encountered a new language or framework (Java, Ruby, Rails, whatever), I've been grateful to him. He also delivered on his intention to keep us "on the computer early and often." I didn't get much sleep that semester -- now I see that was by design :)
[+] logicallee|10 years ago|reply
so why not change the title? The title is a very clear question.
[+] pachydermic|10 years ago|reply

  BEFOREHAND: close door, each window & exit; wait until time.
      open spellbook, study, read (scan, select, tell us);
  write it, print the hex while each watches,
      reverse its length, write again;
      kill spiders, pop them, chop, split, kill them.
          unlink arms, shift, wait & listen (listening, wait),
  sort the flock (then, warn the "goats" & kill the "sheep");
      kill them, dump qualms, shift moralities,
      values aside, each one;
          die sheep! die to reverse the system
          you accept (reject, respect);
  next step,
      kill the next sacrifice, each sacrifice,
      wait, redo ritual until "all the spirits are pleased";
      do it ("as they say").
  do it(*everyone***must***participate***in***forbidden**s*e*x*).
  return last victim; package body;
      exit crypt (time, times & "half a time") & close it,
      select (quickly) & warn your next victim;
  AFTERWARDS: tell nobody.
      wait, wait until time;
      wait until next year, next decade;
          sleep, sleep, die yourself,
          die at last
  # Larry Wall
https://en.wikipedia.org/wiki/Black_Perl
[+] manlio|10 years ago|reply
Fell in love with this one years ago, and still love it...

  #!/usr/bin/perl
  
  APPEAL:
  
  listen (please, please);
  
  open yourself, wide;
      join (you, me),
  connect (us,together),
  
  tell me.
  
  do something if distressed;
  
      @dawn, dance;
      @evening, sing;
      read (books,$poems,stories) until peaceful;
      study if able;
  
      write me if-you-please;
  
  sort your feelings, reset goals, seek (friends, family, anyone);
  
          do*not*die (like this)
          if sin abounds;
  
  keys (hidden), open (locks, doors), tell secrets;
  do not, I-beg-you, close them, yet.
  
                              accept (yourself, changes),
                              bind (grief, despair);
  
  require truth, goodness if-you-will, each moment;
  
  select (always), length(of-days)
  
  # listen (a perl poem)
  # Sharon Hopkins
  # rev. June 19, 1995
[+] shropkins|10 years ago|reply
Thanks for the shoutout, manlio. --Sharon Hopkins
[+] veddox|10 years ago|reply
Being both a hobby programmer and a hobby poet, I concur with the author: yes and no.

There are some aspects to programming that have an aesthetic very similar to that of poetry. It is not in vain that we talk of "elegant" solutions to a problem, or say that [your favourite language] is "beautiful". So in that sense, yes, code can be a poem.

However, there are other areas where the two are worlds apart. First and foremost their purpose: code is meant to cause action (on the part of a computer). Any beauty is a side effect. Poetry is meant to be beautiful, to evoke feelings. If the reading of a poem causes an action in a reader, that is usually a side effect. So in that sense, no, code is definitely not poetry :D

[+] theoh|10 years ago|reply
http://writing.upenn.edu/~afilreis/88/wcw-machine.html

William Carlos Williams

On poems as machines made out of words

"To make two bold statements: There's nothing sentimental about a machine, and: A poem is a small (or large) machine made out of words. When I say there's nothing sentimental about a poem, I mean that there can be no part that is redundant.

Prose may carry a load of ill-defined matter like a ship. But poetry is a machine which drives it, pruned to a perfect economy. As in all machines, its movement is intrinsic, undulant, a physical more than a literary character."

[+] dang|10 years ago|reply
That is brilliant.
[+] calebm|10 years ago|reply
No (I don't agree with the poetry definition put forth), but programming is LIKE poetry is some ways. Here's one way: analogies in poetry are like libraries in programming; an analogy (like a library function call) can convey a mountain of meaning.
[+] strickjb9|10 years ago|reply
The author knew he was being provocative and later revokes his theory due to code not being able to evoke emotion. But I disagree, I've felt rage many of times while code reviewing.
[+] andreasvc|10 years ago|reply
Why don't you agree with the poetry definition put forth? Do you have a counterexample or alternative definition?
[+] eamsen|10 years ago|reply
Code isn't poetry, but the craft of code writing resembles writing poetry in terms of rhythm and aesthetics in a highly abstracted form.
[+] AUmrysh|10 years ago|reply
Poetry is about painting images with words. Often poetry will do this by not saying what is actually happening or the thought it intends to create in the reader.

A program is written to perform math, and it is generally considered bad to waste space with needless things. It doesn't aid the reader or the compiler or the execution to add unused variables. It's really bad in a program to do things in an unclear way.

Poetry can have ambiguities, good software can't.

They do both share some amount of necessity of context. Both often have abstraction. I would say poetry is kind of a playful use of language, whereas programming is really more of a clever use of math.

[+] blt|10 years ago|reply
> Think about the greatest, most beautiful cathedrals in Europe. Some of them took more than 500 years to build. Can you imagine the grandeur and scope of the computer programs we will build over the next 500 years?

Now that is inspirational.

I've managed to spend my software development career mostly writing programs that I feel are meaningful and useful, and I'm very thankful for that. But nothing I've written is going to last more than 10 or 20 years. I would love to produce an artifact that lasts centuries some day.

So far, discounting stuff that only lives because of some legacy hardware system, we've got maybe LINPACK and... what else?

[+] veddox|10 years ago|reply
Inspirational, but to be honest, I highly doubt it. Software has an extremely short life cycle compared to stone... The only softwarily architected object I can think of that might come close to the endurance and grandeur of a medieval cathedral is the Internet - but even that is not half a century old yet.
[+] andyraskin|10 years ago|reply
In my opinion, it's fair to consider API-connected services — and maybe even the Web itself (which did not exist when Perlis first said this) — as "computer programs." In that sense, we're all building this cathedral together.
[+] iamcurious|10 years ago|reply
vim and emacs. they will live forever in infinite different reincarnations.
[+] code_sterling|10 years ago|reply
If programming is poetry, then I write limericks for a living.
[+] mabbo|10 years ago|reply
> Poetry is an art form that conveys not just meaning, but also emotion. You can’t express emotion through code.

Oh, code doesn't just express emotion- it instigates it. Usually pure, infernos of anger at the damned bastard who wrote it.

[+] masswerk|10 years ago|reply
For an example of some great code that is both to the point and expressive, see the original code version for the "Expensive Planetarium" by Peter Samson (PDP-1 Macro-assembler, 1962). – The Expensive Planetarium is a piece of autonomous code inside Spacewar!, the first digital video game, displaying a slowly moving realistic background starfield.

[1] http://www.masswerk.at/spacewar/inside/insidespacewar-pt1-ep...

[+] jlg23|10 years ago|reply
No, but a well written program has the qualities of a good poem: You want to read it and it you can follow it easily. And every word is exactly where it belongs.

I still remember with how much pleasure I read Edi Weitz' cl-ppcre - as a print-out, in bed.

More than once I did minor changes to programs that I attributed to my OCD just to get positive feedback from peers that I made the program more readable (say, changing (let ((x ..)) (when x ....)) to (when-let ((x ...)) ....)).

[+] veddox|10 years ago|reply
> a well written program has the qualities of a good poem: You want to read it and it you can follow it easily.

Have you ever read a poem by T.S. Eliot? A brilliant poet with an incredible gift for language, but I've been reading his "The Four Quartets" repeatedly for over a year and still don't understand much of it...

Good poetry is not necessarily readily understandable (and coming to think of it, neither is a good program). But once you have understood it you see that yes, "every word is exactly where it belongs".

[+] joepvd|10 years ago|reply
Observing that the two (wonderful!) recitations as of yet are affiliated with perl, I am wondering what's up with the rest...
[+] ClayFerguson|10 years ago|reply
As a developer of 25 years in all my experience code that looked sloppy was indeed crappy at other layers other than appearance as well. A great developer takes as much pride in every letter of his code as any poet ever does. Moreso. If we get it wrong, it doesn't work. If we do, however it ALWAYS does work right. Beautiful in that way.
[+] dschiptsov|10 years ago|reply
It has very similar recursive process of clarification, refinement and simplification with the base case on what author thinks is 'perfection' (local optimum).

map or filter procedures in Scheme or Haskell (written in terms of fold) are worth to be framed and posted on a wall.)

[+] branchless|10 years ago|reply
Vogon poetry in most code bases.
[+] Scarblac|10 years ago|reply
ctrl-F Vogon, check.

I guess it's _possible_ to write poetry in programming language, but the only times I've seen someone try the result was forgettable (it looked like a non syntactical mix of a number of languages and sucked as poetry).

Real code is only poetry in the Vogon sense.

[+] mark_lee|10 years ago|reply
Really hard to answer because of the concept of poetry.Poessy?