SOURCECODEPOETRY
Eight lines of rhyming & executable sourcecode
 
Peter Knobloch, 7. Oct. 2003
peter.knobloch@absus.at

(requires Flash 6)

The sourcecode below that controls the animation above ... can be read like this:
/* This is the story of Tom, Max and Sue
little */
Tom = 3; /* and */ Max = 2;
 
This is the story of Tom, Max and Sue,
little
Tom is three and Max equals two.
onEnterFrame = function() { _y = Max +_y
  _x += Tom /* soon he will be Pi */
 
On enterframe is function. Y's Max plus y
X plus is Tom (Soon he will be Pi).
  if ((_height > _y) || !(_y < Stage.height)) {
    /* then */ Max *= (7.0 - 8);
  }
 
   If height greater y or not y less Stageheight
then Max times is seven point zero minus eight.
  Sue = !(_x < Stage.width) || (_width > _x);
  Tom *= 1 - Sue * Math.abs(Max);

};
Sue's not x less Stagewidth or width greater x
Tom times is one minus Sue Math-abs Max.
________________________________________
  sourcecodepoetry.fla
(Macromedia Flash Document, 37 kB)

Description:
Sourcecodepoetry resides at the potential intersection of the lines of sourcecode and poetry. Probably the similarity of both exceeds just having the written word in common: the history of using a programming language to write poetry dates back to the 1970s. Some of these poems consist of actually executable lines of code, some don't. I was tempted from the beginning by the idea to write executable code that rhymes and since I could not find any existing example this might be the first. Sourcecodepoetry shows a colored disc moving inside the boundaries of an invisible rectangle. The computer or a programmer reads that eight lines of code as instructions to animate the disc but anyone else might start to read a little story about Tom, Max and Sue.

Sourcecode can not only be functional but beautiful. Since the understanding of non-programmers rarely goes beyond the analogy that sourcecode relates to an application like a score relates to music, the audience for this kind of beauty is very small. Last October I was invited to speak about the way I work at the Innovation Circle's Jour Fixe. The opportunity for a sourcecode-reading in front of 150 guests at the monthly event of this consulting company was the final impetus to write my eight lines of code. Since I tried to put emphasis on rhythm as well, maybe sourcecode can also be musical.

Articles about Sourcecode and Poetry:
Cramer, Florian: Program Code Poetry
Heiss, Janice J.: The Poetry of Programming
Hopkins, Sharon: Camels and Needles: Computer Poetry Meets the Perl Programming Language