53 comments

[ 1.7 ms ] story [ 120 ms ] thread

  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
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.
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.
Why don't you agree with the poetry definition put forth? Do you have a counterexample or alternative definition?
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...

before it was called programming it was called poetical science.
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
Thanks for the shoutout, manlio. --Sharon Hopkins
Love your coding style. ;)
E.E. Cummings might been writing code, with syntactically significant whitespace no less.
e e cummings actually please use the right

capitalization and punctuation lol

"E.E. Cummings" is fine. It's what he used.[0]

On the top of Cummings, I have occasionally felt like I was faced with an incomplete set of instructions when reading certain of his poems. Of course, there's no particular reason to liken them to computer instructions; I've never seen anything in the poems to suggest a connection. Anything to link one art with another is a stretch—if we even accept that coding is an art.

(I think code can be, though it isn't as a rule. In the same way, writing can be artful but is typically workaday and unremarkable. This post, for an example.)

0: http://faculty.gvsu.edu/websterm/cummings/caps.htm

Vogon poetry in most code bases.
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.

(comment deleted)
If programming is poetry, then I write limericks for a living.
Code isn't poetry, but the craft of code writing resembles writing poetry in terms of rhythm and aesthetics in a highly abstracted form.
Didn't read the article but I wanted to share this quote I read once:

"Mathematics is a language where truth rhymes".

No, it isn't.

Poetry is an entirely separate discipline with a long list of associated skills, some of which overlap with those possessed by a good programmer. You're not a poet unless you're a poet, so just call yourself a good coder for fuck's sake. It's not like it's less prestigious.

source: published poet who works as a software engineer.

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

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 ...)) ....)).

> 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".

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.

Observing that the two (wonderful!) recitations as of yet are affiliated with perl, I am wondering what's up with the rest...
> 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.

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.

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 :)
That's wonderful to hear. Thanks for the update.

Edit: I had to look up pou sto. Turns out it's Archimedes' "place to stand" from which he could move the earth. In other words, the best possible foundation. A high aspiration for a programming language course.

Full disclosure: I had to look up pou sto also. I guess there are still some downsides to not majoring in the classics.
so why not change the title? The title is a very clear question.
I was too smitten with the notion that titles are the bikesheds of HN to think about changing it.
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.)

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."

That is brilliant.