tags:

views:

2116

answers:

43

Anyone know any programming related poetry?

A: 
Begin "Poem"
    While (True)
      WriteLine("Dont bother me with poetry")
    Wend
End "Poem"
StingyJack
+11  A: 

I like the 404 Haikus

Alex B
These are awesome.
Christian Nunciato
Agreed, awesome. However, the page they are on mis-attributes them. See http://archive.salon.com/21st/chal/1998/02/10chal2.html
bmb
The Be Operating System was full of these Haiku error messages. The built-in web browser used them for 404 messages. There are more here: http://www.8325.org/haiku/
bta
+8  A: 

Waka Waka Bang Splat

<>!*''# 
^@`$$- 
!*'$_ 
%*<>#4 
&)../ 
|{~~SYSTEM HALTED 

Transliterated:

Waka waka bang splat tick tick hash, 
Caret at back-tick dollar dollar dash, 
Bang splat tick dollar under-score, 
Percent splat waka waka number four, 
Ampersand right-paren dot dot slash, 
Vertical-bar curly-bracket tilde tilde CRASH. 
Matt Kane
http://192.20.225.55/tts/speech/a47778ec399de65971f3b70f55edf831.wav
Chris Ballance
Oddly enough, the rhythm of that almost makes it sound like something cheerleaders would chant...
bta
A: 

There are some haikus in an earlier question "How would you write a program to generate Haiku?". And the famous "The Zen of Python" when you import this.

Zach Scrivena
+18  A: 

I like this one:

If a packet hits a pocket on a socket on a port,
and the bus is interrupted as a very last resort,
and the address of the memory
makes your floppy disk abort
then the socket packet pocket
has an error to report!

It's actually part of a longer poem.

Kyle Cronin
+1  A: 

Close sibling, mathemathical poetry by Stanislaw Lem:

Come, let us hasten to a higher plane
Where dyads tread the fairy fields of Venn,
Their indices bedecked from one to n
Commingled in an endless Markov chain!

Come, every frustum longs to be a cone
And every vector dreams of matrices.
Hark to the gentle gradient of the breeze:
It whispers of a more ergodic zone.

In Riemann, Hilbert or in Banach space
Let superscripts and subscripts go their ways.
Our asymptotes no longer out of phase,
We shall encounter, counting, face to face.

...

ttarchala
+7  A: 

Give a look to the Shakespeare Programming Language, you are able to write code, with poetic freedom... :-)

CMS
wow... this is the single most nerdish thing i've ever seen....
sharkin
+1  A: 

From Perl Haiku:

study(each %problem);
while($perl) { exists $worry{not}; } 
join($us) and write($perl);

Author: Jerry Gregoire

y? use Lisp? or C? ;
use less keystrokes, B::Concise;
bless Wall for our @perl

Author: Jasvir Nagra

Many more excellent ones on that page.

codelogic
It is worth pointing out that for those that don't know Perl, these actually compile.
jrockway
A: 

Here is a list of some Windows Haiku, some of which are quite good.

An example:

You step in the stream
But the water has moved on.
This page is not here.
JosephStyons
A: 

Whose bugs these are I think I know.
   His name is off my CVS server, though;
He will not see me hacking here,
   To watch his code hacks grow and grow.

My little fingers must think it queer,
   To stop without a release time near.
Between rev seven and now-broken eight
   The darkest evening of the year.

They give my knuckles a little shake,
   To ask if there is some mistake.
The only other sound's the beep,
   Of "error bind" and "error make".

My bed is lovely, dark, and deep,
   But I have promises to keep,
And lines of code before I sleep,
   And lines of code before I sleep.

I believe that's from the jargon file

annakata
A: 
Atop the outer-reach
In step, making a breach
To become one
At a moments notice
It is done

Written ever faster
Streaming from its master
It pours out
Without a doubt
The evil has been done

Quote

+5  A: 

I think Jason Fox put it best

I think that I shall never see,

A poem as lovely as a binary tree.

Dillie-O
+6  A: 

Back in the day, I used BeOS. It featured a tiny little Web browser called NetPositive that had haiku error messages:

Cables have been cut
Southwest of Northeast somewhere
We are not amused. 

Server's poor response
Not quick enough for browser.
Timed out, plum blossom. 
Overflown
There is a site hosting these haikus: http://8325.org/haiku/
mooware
+8  A: 

You might enjoy the Poetic License (http://en.wikipedia.org/wiki/Poetic_License) :)

(c)

This work ‘as-is’ we provide.
No warranty, express or implied. We’ve
done our best, to debug and test.
Liability for damages denied.

Permission is granted hereby,
to copy, share, and modify.
Use as is fit,
free or for profit.
On this notice these rights rely.

mrooney
Formatted it correctly. If you end a line in two spaces, it preserves the line break. In other words: End line in spaces/For poems on SO/Makes for good format.
Chris Lutz
A: 

There are two things I want to do

Before my life is done.

They're write 5 lines of APL

And make the buggers run.

cookre
A: 

http://haiku.bacontea.com/

some not so programming related

http://limerick.bacontea.com/

http://roger.bacontea.com/

John Boker
+3  A: 

A Proof of the Undecidability of the Halting Problem, in verse, by Geoffrey K. Pullum

Bonus: It's peer reviewed.

Craig Stuntz
A: 

#!/usr/pkg/bin/perl

require 5.8.8 and my $heart;

join $her and $love or die "alone\n";

(from perl poetry)

Aif
A: 

A poem that explores recursion is:

Children, if you dare to think
Of the greatness, rareness, muchness 
Fewness of this precious only 
Endless world in which you say 
You live, you think of things like this: 
Blocks of slate enclosing dappled 
Red and green, enclosing tawny 
Yellow nets, enclosing white 
And black acres of dominoes, 
Where a neat brown paper parcel 
Tempts you to untie the string. 
In the parcel a small island, 
On the island a large tree, 
On the tree a husky fruit. 
Strip the husk and pare the rind off: 
In the kernel you will see 
Blocks of slate enclosed by dappled 
Red and green, enclosed by tawny 
Yellow nets, enclosed by white 
And black acres of dominoes, 
Where the same brown paper parcel - 
Children, leave the string alone! 
For who dares undo the parcel 
Finds himself at once inside it, 
On the island, in the fruit, 
Blocks of slate about his head, 
Finds himself enclosed by dappled 
Green and red, enclosed by yellow 
Tawny nets, enclosed by black 
And white acres of dominoes, 
With the same brown paper parcel 
Still untied upon his knee. 
And, if he then should dare to think 
Of the fewness, muchness, rareness, 
Greatness of this endless only 
Precious world in which he says he lives
 - he then unties the string.

        Robert Graves

Also, the book Godel, Escher, Bach by Hofstedter has a couple of poems in it.

sheepsimulator
+4  A: 

I think my favorite is the infamous Black Perl: http://en.wikipedia.org/wiki/Black_Perl

Rob K
+8  A: 

A programmer started to cuss
Because getting to sleep was a fuss
As he lay there in bed
Looping 'round in his head
was: while(!asleep()) sheep++;

I've seen this one somewhere else on SO, but I can't find it now. Today, I found it here.

Scottie T
... 32766... 32767... -32768 ... -32767...
NullUserException
+10  A: 

I wrote this haiku a while back.

Object Reference
Not Set To An Instance Of
An Object. Well, Shit.

I've seen this error more times than I care to count.

Evan
+1  A: 

This one was written by a guy here as an ode to his former colleague's coding skills:

How do I hate thee
let me count the ways
Access Violation: stack overflow at line 3

Bob Moore
A: 

limerickdb - Brainchild of xkcd

nilamo
A: 

Not exactly 'programming', but still good:

Numbers' poetry

Joy

2 15 42
42 15
37 05 5
20 20 20!

7 14 100 0
2 00 13
37 08 5
20 20 20!


Sad

511 16
5 20 337
712 19
2000047
Evgeny
+2  A: 

The Query

Adapted by Rob Collins

Once upon a midnight dreary, fingers cramped and vision bleary,
Program manuals piled high, and wasted paper on the floor,
Longing for the warmth of bedsheets, still I sat there, doing spreadsheets
For the high and mighty deadbeats whom I do computing for --
For the overpaid executives who left at half past four --
Too important to ignore.

Under orders from the boss to make our profit beat our loss,
I drew old data out of DOS, lured it into Lotus 4--
Skipping sleep and suppertime, working well past eight and nine,
Though I earned no overtime, still I wrestled with the chore.
My career was on the line and a deadline loomed before,
Too important to ignore.

Ah, I know I did not smile as I struggled with the file
Till the data was compiled. Then I latched the A drive's door.
With a weary, quaking hand I invoked the Save command,
When there came a reprimand, implying damage was in store--
A cryptic reprimand with but three options to explore:
Abort, Retry, Ignore?

Complete poem here

Abort, Retry, Ignore?

-- by Marcus Bales*

Once upon a midnight dreary, fingers cramped and vision leery,
System manuals piled high and wasted paper on the floor,
Longing for the warmth of bed sheets, still I sat there doing spreadsheets.
Having reached the bottom line I took a floppy from the drawer
I then invoked the SAVE command and waited for the disk to store,
Only this and nothing more.

Deep into the monitor peering, long I sat there wond'ring, fearing.
Doubting, while the disk kept churning, turning yet to churn some more.
But the silence was unbroken, and the stillness gave no token.
"Save!" I cried, "You cursed mother! Save my data from before!"
One thing did the phosphors answer, only this and nothing more,
Just: "Abort, Retry, Ignore?"

Was this some occult illusion, some maniacal intrusion?
These were choices undesired, ones I'd never faced before.
Carefully I weighed the choices as the disk made impish noises.
The cursor flashed, insistent, waiting, baiting me to type some more.
Clearly I must press a key, choosing one and nothing more,
From this: "Abort, Retry, Ignore?"

Complete poem here

Evgeny
A: 
 If you can keep your head when all about you
 Are losing theirs and blaming it on you,
 If you can trust yourself when all men doubt you,
 But make allowance for their doubting too;

(etc.)

Morendil
This sure is programming related. :D
Vulcan Eager
A: 

Here's one I wrote in 2003 while toying around with retro adventure game coding:

Ode to WME Scripting

scripting is prone to errors and crashes

and through buggy code every programmer trashes

but suppose there existed an engine so grand

with scripting and toying around hand-in-hand


imagine interface elements, 'actors' and sprites

arranged in a versatile tool of delights

and every latest compile of its source code

available, free on a website for download


while unseasoned programmers flock to debate

dozens of upcoming features await

and scripting has never been neater than that

of ActObj.CanHandleEvent("LookAt")

Jens Roland
A: 

And another one - a song, really - that I wrote just before Christmas of 2005, while working on my bachelor's thesis project (a Java-subset compiler). It really made a lot more sense to my fellow students in that compiler class, but here it is:

Branchin' around the AST

aka "All I want for christmas is a fucking compiler and how sad is that, really?"

(Melody: Rockin' around the christmas tree)

Branchin' around the AST with a goto label pop
Tapping the Emacs function key makes the buffering suddenly crop
Branchin' around the AST let the API explain
Later we'll get some therapy and you'll soon forget the pain


You will get 'invalid declaration' if you try
public static test_o_matic()
{ /* Aske must be too pragmatic */ }


Playing around with AJC and an empty coffee cup
Sugar syntactic you can't see when the weeding phase is up
Playing around with AJC in recursive in's & out's
Always injecting merrily when a new exception shouts


You will get a gratifying feeling when you see
smileys dancing, tests advancing
time for optimize-enhancing


Loopin' along the syntax tree as we generate our code
Running the test repeatedly - see the spike in server load (that's us!)
Loopin' along the syntax tree while the phorum slowly fills
Funder is posting rapidly, showing off Mad Typing Skills(tm)


[chorus] You will get a gratifying feeling...


Branchin' around the AST like a seasoned Java pro
Running a test suite locally when the DAIMI server is slow
Branchin' around the AST showing 1337ness all the way
Patterns in complex OOP, using e-num or ar-raaaaaaaaay!!!!!


Merry Christmas everybody!

In case anyone cares, here's a quick explanation of the terms used in the poem:

AST = Abstract Syntax Tree - ie. parsed Java syntax in a tree representation)

Aske = the teaching assistant who had written the reference implementation for our Java subset

AJC = AspectJ compiler - we were using an awesome Java extension that allowed us to inject code into existing classes on runtime (it's black magic, I tell you)

Dancing smileys = our unit test result page would show dancing smileys whenever all tests passed

DAIMI = Comp.Sci. department at Aarhus University

Phorum = dedicated online forum for the compiler course

Jens Roland
+9  A: 

Quoted from No, We Need a Neural Network at The Daily WTF

The pig go. Go is to the fountain. The pig put foot. Grunt. Foot in what? ketchup. The dove fly. Fly is in sky. The dove drop something. The something on the pig. The pig disgusting. The pig rattle. Rattle with dove. The dove angry. The pig leave. The dove produce. Produce is chicken wing. With wing bark. No Quack.

Esko Luontola
A: 
A freshman programmer named Bart,
was studying the programming art.
He used integer division,
instead of double precision,
and lost the fractional part.
EvilTeach
A: 

While primarily networking-related, remember that even switches need love^W code ;-)

            Algorhyme

   I think that I shall never see
   a graph more lovely than a tree.
   A tree whose crucial property
   is loop-free connectivity.
   A tree that must be sure to span
   so packet can reach every LAN.
   First, the root must be selected.
   By ID, it is elected.
   Least-cost paths from root are traced.
   In the tree, these paths are placed.
   A mesh is made by folks like me,
   then bridges find a spanning tree.

                    Radia Perlman
Jonas Kölker
A: 

Zen of Python

Beautiful is better than ugly.
Explicit is better than implicit.
Simple is better than complex.
Complex is better than complicated.
Flat is better than nested.
Sparse is better than dense.
Readability counts.
Special cases aren't special enough to break the rules.
Although practicality beats purity.
Errors should never pass silently.
Unless explicitly silenced.
In the face of ambiguity, refuse the temptation to guess.
There should be one-- and preferably only one --obvious way to do it.
Although that way may not be obvious at first unless you're Dutch.
Now is better than never.
Although never is often better than right now.
If the implementation is hard to explain, it's a bad idea.
If the implementation is easy to explain, it may be a good idea.
Namespaces are one honking great idea -- let's do more of those!

Jas Panesar
A: 

The title of "Ultimate Code Poem" I think belongs to Black Perl. Very creepy and a fully valid Perl 3 script:

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;
AFTERWORDS: tell nobody.
    wait, wait until time;
    wait until next year, next decade;
        sleep, sleep, die yourself,
        die at last
# Larry Wall
jamieb
A: 

Haiku for web developers:

It is so easy
to make forms much friendlier
with the label tag

Kip
A: 

From http://limerickdb.com/?434

if(computer.fail==true){
background.setColor(blue);
user.frown();
sys.shutdown();
user.scream("OH, FUCK YOU");} 
RobM
I love the smiley just before EOF ;}
Time Machine
A: 

The documentation for the Google Annotations Gallery project has some Java poetry. Some of my favorites:

@BurmaShave
public void handleError() {

   if (jobIsDead()
      || connIsDropped()) {

   logAWarning();
   thread.stop();
   // Burma Shave.

   }
}

@DoubleDactyl
public void createNewTractor() {

   tractoryFactory
      .tractorConfigurer()
      .setTractorPaintjob(
          A_BRIGHT_SHINY_RED);

   saveTheNewTractor(
      AUTOTRANSACTIONALLY);
   driveTheNewTractorIn(
      new WorkerThread());
}
bta
A: 

(Shameless plug and bit of a repost - I talked about this before, over here)

This is not really a programming language, but I created a programming language called CherryBlossom that lets you program in Haikus :) It's actually a brainf*ck analog. It's available on GitHub also. There are still a few kinks I need to iron out, but it mostly works!

Here's Hello World:

beautiful jasmine
your lovely fragrance heals me
every morning

remembering you,
dreaming of your lovely smile,
when will you come here?

floating butterflies
sunshine and summer flowers
a lovely morning 

blossoming hillside
on a fragrant summer day
blooming, flowering.

I can remember
my happy dreams of summer
it was beautiful

flying doves, sunrays
beauty flying in sunshine
rain in the valley.

snow falls in moonlight,
returns to the mountainside.
lovely, beautiful.

view from mountaintop
is a beautiful painting,
in summer sunshine.

the fragrant flowers
and the pretty butterflies
spring by singing creek.

beautiful morning
butterflies by riverside
floating in sunshine.

such a lovely sight,
the valley waterfall is
in the spring sunshine.

sunrays and sunshine,
the butterflies and flowers
loving the new spring.

the pretty flowers
are dreaming of a summer
with the smiling sun.

music from heaven,
is melodious and sweet,
dreamy and happy.

the river is cold
and misty in the moonlight,
in the autumn chill.

winter riverside,
lonely, icy, and chilly
darkening evening

the lonely winter,
barren riverside ahead
a dreaming poet
Vivin Paliath
A: 

My favorite, from the 1990 International Obfuscated C Code Contest by someone named Brian Westley. For more info check out: http://ioccc.org/1990/westley.hint

char*lie;

    double time, me= !0XFACE,

    not; int rested,   get, out;

    main(ly, die) char ly, **die ;{

        signed char lotte,


dear; (char)lotte--;

    for(get= !me;; not){

    1 -  out & out ;lie;{

    char lotte, my= dear,

    **let= !!me *!not+ ++die;

        (char*)(lie=


"The gloves are OFF this time, I detest you, snot\n\0sed GEEK!");

    do {not= *lie++ & 0xF00L* !me;

    #define love (char*)lie -

    love 1s *!(not= atoi(let

    [get -me?

        (char)lotte-


(char)lotte: my- *love -

    'I'  -  *love -  'U' -

    'I'  -  (long)  - 4 - 'U' ])- !!

    (time  =out=  'a'));} while( my - dear

    && 'I'-1l  -get-  'a'); break;}}

        (char)*lie++;


(char)*lie++, (char)*lie++; hell:0, (char)*lie;

    get *out* (short)ly   -0-'R'-  get- 'a'^rested;

    do {auto*eroticism,

    that; puts(*( out

        - 'c'

-('P'-'S') +die+ -2 ));}while(!"you're at it");


for (*((char*)&lotte)^=

    (char)lotte; (love ly) [(char)++lotte+

    !!0xBABE];){ if ('I' -lie[ 2 +(char)lotte]){ 'I'-1l ***die; }

    else{ if ('I' * get *out* ('I'-1l **die[ 2 ])) *((char*)&lotte) -=

    '4' - ('I'-1l); not; for(get=!


get; !out; (char)*lie  &  0xD0- !not) return!!

    (char)lotte;}


(char)lotte;

    do{ not* putchar(lie [out

    *!not* !!me +(char)lotte]);

    not; for(;!'a';);}while(

        love (char*)lie);{


register this; switch( (char)lie

    [(char)lotte] -1s *!out) {

    char*les, get= 0xFF, my; case' ':

    *((char*)&lotte) += 15; !not +(char)*lie*'s';

    this +1s+ not; default: 0xF +(char*)lie;}}}

    get - !out;

    if (not--)

    goto hell;

        exit( (char)lotte);}
aepryus
A: 

There's the classic The Great Quux Poem Collection:

http://www.csd.uwo.ca/staff/magi/personal/humour/Computer_Audience/The%20Great%20Quux%20Poem%20Collection.html

rak5hasa