
Is Programming Poetry? - andyraskin
https://medium.com/unpublishable-elsewhere/is-programming-poetry-aa137a2ac3ca#.rppg59c00
======
dang
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](http://www.jsoftware.com/papers/perlis77.htm).

~~~
andyraskin
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
:)

~~~
dang
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.

~~~
andyraskin
Full disclosure: I had to look up _pou sto_ also. I guess there are still some
downsides to not majoring in the classics.

------
pachydermic

      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](https://en.wikipedia.org/wiki/Black_Perl)

------
manlio
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
Thanks for the shoutout, manlio. --Sharon Hopkins

~~~
0x4a42
Love your coding style. ;)

------
veddox
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
[http://writing.upenn.edu/~afilreis/88/wcw-
machine.html](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
That is brilliant.

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

------
eamsen
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
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
> _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
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.

------
code_sterling
If programming is poetry, then I write limericks for a living.

------
mabbo
> 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
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...](http://www.masswerk.at/spacewar/inside/insidespacewar-
pt1-ep.html#spacewar2b)

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

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

------
loser777
Reminded me of this fantastic talk about demoscene programming called "Poems
for Bugs"...
[https://www.youtube.com/watch?v=9ZNjB5jmHdE](https://www.youtube.com/watch?v=9ZNjB5jmHdE)

------
branchless
Vogon poetry in most code bases.

~~~
Scarblac
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
Really hard to answer because of the concept of poetry.Poessy?

------
BFay
Linux Poetry is relevant: [http://linuxpoetry.com/](http://linuxpoetry.com/)

------
efferifick
Didn't read the article but I wanted to share this quote I read once:

"Mathematics is a language where truth rhymes".

------
rch
E.E. Cummings might been writing code, with syntactically significant
whitespace no less.

~~~
pmalynin
e e cummings actually please use the right

capitalization and punctuation lol

~~~
boken
"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](http://faculty.gvsu.edu/websterm/cummings/caps.htm)

------
jlhim
before it was called programming it was called poetical science.

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

~~~
nilved
What is a poet?

------
GlennS
Immediately made me think of: [http://steve-
yegge.blogspot.co.uk/2006/03/execution-in-kingd...](http://steve-
yegge.blogspot.co.uk/2006/03/execution-in-kingdom-of-nouns.html)

    
    
      For the lack of a nail,
          throw new HorseshoeNailNotFoundException("no nails!");
      
      For the lack of a horseshoe,
          EquestrianDoctor.getLocalInstance().getHorseDispatcher().shoot();
      
      For the lack of a horse,
          RidersGuild.getRiderNotificationSubscriberList().getBroadcaster().run(
            new BroadcastMessage(StableFactory.getNullHorseInstance()));
      
      For the lack of a rider,
          MessageDeliverySubsystem.getLogger().logDeliveryFailure(
            MessageFactory.getAbstractMessageInstance(
              new MessageMedium(MessageType.VERBAL),
              new MessageTransport(MessageTransportType.MOUNTED_RIDER),
              new MessageSessionDestination(BattleManager.getRoutingInfo(
                                              BattleLocation.NEAREST))),
            MessageFailureReasonCode.UNKNOWN_RIDER_FAILURE);
      
      For the lack of a message,
          ((BattleNotificationSender)
            BattleResourceMediator.getMediatorInstance().getResource(
              BattleParticipant.PROXY_PARTICIPANT,
              BattleResource.BATTLE_NOTIFICATION_SENDER)).sendNotification(
                ((BattleNotificationBuilder)
                  (BattleResourceMediator.getMediatorInstance().getResource(
                  BattleOrganizer.getBattleParticipant(Battle.Participant.GOOD_GUYS),
                  BattleResource.BATTLE_NOTIFICATION_BUILDER))).buildNotification(
                    BattleOrganizer.getBattleState(BattleResult.BATTLE_LOST),
                    BattleManager.getChainOfCommand().getCommandChainNotifier()));
      
      For the lack of a battle,
          try {
              synchronized(BattleInformationRouterLock.getLockInstance()) {
                BattleInformationRouterLock.getLockInstance().wait();
              }
          } catch (InterruptedException ix) {
            if (BattleSessionManager.getBattleStatus(
                 BattleResource.getLocalizedBattleResource(Locale.getDefault()),
                 BattleContext.createContext(
                   Kingdom.getMasterBattleCoordinatorInstance(
                     new TweedleBeetlePuddlePaddleBattle()).populate(
                       RegionManager.getArmpitProvince(Armpit.LEFTMOST)))) ==
                BattleStatus.LOST) {
              if (LOGGER.isLoggable(Level.TOTALLY_SCREWED)) {
                LOGGER.logScrewage(BattleLogger.createBattleLogMessage(
                  BattleStatusFormatter.format(BattleStatus.LOST_WAR,
                                               Locale.getDefault())));
              }
            }
          }
      
      For the lack of a war,
          new ServiceExecutionJoinPoint(
            DistributedQueryAnalyzer.forwardQueryResult(
              NotificationSchemaManager.getAbstractSchemaMapper(
                new PublishSubscribeNotificationSchema()).getSchemaProxy().
                  executePublishSubscribeQueryPlan(
                    NotificationSchema.ALERT,
                    new NotificationSchemaPriority(SchemaPriority.MAX_PRIORITY),
                    new PublisherMessage(MessageFactory.getAbstractMessage(
                      MessageType.WRITTEN,
                      new MessageTransport(MessageTransportType.WOUNDED_SURVIVOR),
                      new MessageSessionDestination(
                        DestinationManager.getNullDestinationForQueryPlan()))),
                    DistributedWarMachine.getPartyRoleManager().getRegisteredParties(
                      PartyRoleManager.PARTY_KING ||
                      PartyRoleManager.PARTY_GENERAL ||
                      PartyRoleManager.PARTY_AMBASSADOR)).getQueryResult(),
              PriorityMessageDispatcher.getPriorityDispatchInstance())).
            waitForService();
      
      All for the lack of a horseshoe nail.

------
agumonkey
I thought it was painting.

ps: among the APL examples from the article, I'd add most of the IOCCC
submissions.

~~~
dang
> _among the APL examples from the article, I 'd add most of the IOCCC
> submissions_

That can only be because you don't understand APL or its principle of
condensed simplicity. This is one of those cases where the reflexive judgment
is completely wrong. We're so used to code being sprawlingly complex that APL
and its derivatives seem obviously perverse, when in fact they are lyrical,
and the problem is with us and our 'obvious' preconceptions.

If APL were a matter of intentional obfuscation you would never hear a student
speak like this 30 years later:
[https://news.ycombinator.com/item?id=10481967](https://news.ycombinator.com/item?id=10481967).

~~~
agumonkey
Hold on, I think you think I meant APL was obfuscated in a negative way. I
love APL, I love reading IOCCC. It's not enterprise or team-project compatible
but there's so much beauty in there. We're in agreetion, aren't we ?

~~~
dang
Indeed we are! Apologies for misreading you.

------
throwawayaway
is up down?

------
clock_tower
[https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headline...](https://en.wikipedia.org/wiki/Betteridge%27s_law_of_headlines)

~~~
andyraskin
A nice recent counterexample (even though the question mark is in the
subhead): [http://www.newyorker.com/magazine/2015/09/28/the-
avenger](http://www.newyorker.com/magazine/2015/09/28/the-avenger)

