The Poetry of Code

The uh is I agreed

Morse seem like a code of clicks 
    spaces crowded with the code
    Is it poetry? 
        Life link for more poetries?
HTTP, WWW don't think
    it is us to think 
    Out of the box
Code is a language 
    Some kind of code is on its back 
Is it poetry?
    On which plain existence ends,
        by the end of august, summers end 
With the tell of lines 
    poetry lop surpass a tagline 
Saying is, 
    this poetry, is apparantly my first
Piece of basic code 
    almost my first 
Machine program more than talks 
    why is it not poetry 
Hosking says 
    some is exceptional in stretched poetic meaning, 
poetry, it indeed is

I’m really bad at poetry. It’s not that I don’t feel able to write it, no it’s worse, I’m not able to understand it nor to see the beauty in it, not even in poetry written in my mother tongue. Poetry sucks, in my opinion! ‘People that don’t like flowers are unable to understand poetry’, is a worthwhile claim, to throw some researches at, I bet. If there aren’t already working scores of them on finding possible causes.

To help myself, to survive the actual Weekly Writing Challenge on Daily Press I made a simple script that steals three-word passages from my fellow wordpressians and cleans and rearranges those to a “poem”. Well, there was still some cleanup necessary. Some inserted words here, some deleted words there, some line rearrangement and voila my first poem. Here is the raw output for the interested. The seed phrase was “poetry of code”:

[ 'The uh is i agreed',
 'Morse seem like a of clicks',
 'Spaces crowd with the is poetry',
 'Life link for more poetries',
 'Http www don t think',
 'It as the to think',
 'Out the box code is a language',
 'Some kind isn on its back is poetry',
 'On on which plane existence',
 'Are they by the end august',
 'With the tell if lines',
 'Poetry lop surpass a tagline',
 'Saying is poetry apparantly my first',
 'Piece basic code almost my first',
 'Machine program more than talks',
 'About why is not poetry',
 'Hosking says some is except',
 'In stretched poetic meaning poetry' ]

And well, for those nerdy enough, to understand some CoffeeScript here is the code. There is the real beauty, at least for me …

To execute it yourself, you need Node.js installed and you have to add the following NPM packages: “coffee-script”, “request” and “cheerio”. I think you have to install CoffeeScript globally (npm install -g coffee-script), but I’m not sure. The rest can be installed locally. Safe the content of the gist into a new file (e.g. poem.coffee). Put it in the directory where you installed the packages from. Then issue:

coffee THE-FILE-YOU-SAVED-THE-CONTENT-OF-THE-GIST-TO TERM1 [TERM2] [TERM3]

Only one seed term is required. It will output something similar to the raw output above.

I apologize to all serious poetrists (is that the right term?). I guess your art is very valuable and rich and wonderful. I’m just some moron that doesn’t get it.

Advertisements

4 thoughts on “The Poetry of Code

  1. huge says:

    This is really clever and I enjoyed it – especially when you revealed how it was put together. Without doubt there is poetry within your code…

    I’m not good at poetry (writing it or reading it) or computer code! Like you I find poetry hard to understand but even when I don’t know what the hell they’re trying to say I do love the rhythm, flow and conservative use of words.

    1. Dirk Porsche says:

      I read most of the other contributions to this weeks challenge, and I would lie if I say: “that’s all crap.” I even almost pressed the like button on the one or the other.

      The flow and the sparsity of words, I like that, too. And well they are generally short and a quick read. That’s good also. I don’t like to read long posts, anything beyond 1200 words is unreadable for me.

      Thanks for the feedback.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s