Tuesday, February 14, 2006


This is in reference to the post on eclair-turing. I was going to write a comment on Naresh's post, but it grew too long.

Now, the gist of the post is as follows
- good programming is about succintness (maximum bang for the buck)
- good poetry is about succintness
- Good metaphors make for more expressive writing
- Good programming paradigms (metaphors for computers :) ) make for more expressive coding.
- Therefore poetry==programming.

It is very well written and backed up with sources. I really enjoyed reading it. But the more I think about it, the less sure I am that it's correct.

All the characteristics of good poetry quoted there are characteristics of good prose too. Low signal-to-noise ration and maximum expressiveness are as much a characteristic of good prose, as of poetry. These things are not poetry's exclusive province. Indeed, they are characteristics of good communication in any medium.

For example..
(what General Charles Napier said after the conquest of Sind. (Peccavi means 'I have sinned'.)). The Gettysburg Address
The Last Question, by Asimov

None of these has anything more or less than is required. They are expressive, informative and beautiful. They are compact and have intense unity. But, they cannot be called poetry, unless we seriously stretch the meaning of poetry. We can't just say 'Any good collection of sentences is poetry', can we now?':)

So, what then, sets poetry apart?

The most concise way to convey the message of Charge of the Light Brigade is not the poem, but to say 'The Light Brigade was asked to charge the artillery. Even though the soldiers knew that they were going to die for no reason, they followed the order and got shot to bits.' Two sentences, tell you the whole story. Succint. Gets the information across.

But something is missing isn't there? What's missing is the emotional content. The Charge of the Light Brigade is about hopeless courage. It's not about telling you what happened at the Battle of Baclava. That poem stands for any conflict, anywhere where men throw their lives away for a mistake. It is as valid for the 13th Hussars as it is for the millions of lives that Stalin threw away in human wave attacks against the Germans.

Poetry is not about communicating a thought or an idea. It's about communicating an emotion. A poet seeks to make you feel what he feels. That's why our response to poetry is visceral, rather than cerebral.

We would not seek directions to the airport in verse. On the other hand the feeling of separation can be most beautifully expressed in song.

Good poetry is not just a play in words. It has soul. It is romantic in the Zen and the Art of Motorcycle Maintenance definition of classical and romantic.

Emotional content is what sets poetry apart.

Which brings us to programming..

Programming is a cerebral process. A program is a way of executing an idea or a concept. It is not concerned with the writer's (or the reader's) emotions. It is a 'classical' thing. Its raison-d'etre is utility.

So, where then, one might ask, is the place for art in programming? Is it possible for code to be beautiful? Am I a troglodyte who enjoys destroying other people's joy in writing code? The answers would be yes, yes and no.

Software is not poetry. If I must look for an analogue, I would look into architecture and civil engineering. It's like building a bridge, for example. A bridge can be beautiful, but it's primary purpose is utility, not beauty. A program takes it to the extreme. Its beauty is utility. Beauty here is a piece of code that does the mostest with the leastest.

Isn't that true of poetry also? Of course it is. And prose, and music, and photography, and any other art form. All art seeks to harmoniously interplay the elements to obtain maximum bang for the buck.

Programming is one such art. Poetry is one another such art. Other than the fact that they are art forms, there is not much in common between them.

I really like this post because other than the conclusion (programming==poetry) , the rest of the post is absolutely spot-on. More powerful programming paradigms do make programming more expressive. we must, as programmers, focus on low signal-to-noise ratio. More powerful tools make for better programs.

But these similarities are because both programming and poetry are arts, not because programming==poetry.


Naresh said...

"we must, as programmers, focus on low signal-to-noise ratio. "

I am guessing you meant "high signal-to-noise ratio".

Decent write-up, but your central thesis misses the point about your profession, and quite completely that too.

“Software is not poetry. If I must look for an analogue, I would look into architecture and civil engineering. It's like building a bridge, for example. A bridge can be beautiful, but it's primary purpose is utility, not beauty”

Aaaaah. So wrong .

I would first encourage you to read this book.
Emotional Design: Why We Love (Or Hate) Everyday Things.

Donald Normal the author also wrote the earlier landmark book called “The Design of Everyday Things”, another must read if you are an engineer.

The things he says are
“ there are three levels at play in design: visceral, behavioural, and reflective. It's still true that, on a rational level, products should be functional, but now he explains why they should be beautiful and have an emotional impact as well.”

So according to you, if a primary purpose of a bridge is utility, the Golden Gate bridge should not be the most visited landmark on Planet Earth. Yet it is. Why ? Because it is utilitarian?

To give another example, why should the IPod be famous. Because of the click wheel, or iTunes? No. The IPod appeals to most humans viscerally, which is why it’s the most wanted consumer electronic accessory.
To think that buildings or mechanical things is not art or cannot have emotion/visceral responses is a fallacy ( or a lack of true knowledge one ones art)

Now coming to programming, you made this statement and claimed it is succinct. You also claim that it is not emotionally responsive.

'The Light Brigade was asked to charge the artillery. Even though the soldiers knew that they were going to die for no reason, they followed the order and got shot to bits.'

But think of these statements

Open fil, “<..” or die.

At first glance it makes not much sense. Why is the OR operator which checks the output of two logical statements used here to control program direction.
What do you think it’s doing ?
Well, the answer is in the way Perl or the Unix Shell “short circuits” the OR.
If the first expression succeeded then the second does not have to be evaluated/executed.
If the first failed then the second will be evaluated thus causing the program to die.

Now that is why you will see another Perl idiom
System (“ ….”) and die;

Why this,? Because the Unix “system” call returns 1 on failure and 0 on success.
Means that if the "system" call succeeded, the And is a short-circuited as a failure and the second part is Not evaluated.
If the “system” call failed, then the AND succeeded and this would cause the program to “die”.

Now think of how a newbie but good Perl Programmer might write this
Open fil,”..”’;
If ( failed) { die;}

The better one may say
If( ! ( open fil, “,”..)) { die;}

Both the latter ones are succinct, readable, clearly understandable. But what is different ? They do nothing. It is flat, generates as much excitement as a light bulb in a fridge.

The first one gives you an “Ahaaaa feeling” as compared to the later ones.
You see , it has an emotional and visceral response to it.
That’s why the particular statement I quote from K&R made that book famous.
It generated that “Ahha” feeling to a lot of hackers.

Ever wonder why Lisp is so famous. Because Lisp is the only language that is defined in Lisp. Alan Kay rightly summarized that page of Lisp definitions to be the most beautiful piece of poetry as well as the “Maxwell’s equations of computer science”.
Think it’s not poetry? Try saying that to the Lisp aficionado.

So programming, designing & architecture CAN evoke emotional & visceral responses. You can split hairs and say its not poetry, but then that is your definition.
It still is poetry to me.

sambar42 said...


I completely agree with you in that the strcpy function in KnR really is beautiful. As is the Golden Gate Bridge. As is the SR-71 Blackbird.
That does not mean that the SR-71 is a poem.

All art pushes towards beauty. That does not make all art poetry. Why do you consider beauty to be the sole province of poetry? Do poets have the market cornered on passion?:)

Ultimately, if the bridge didn't stand over water, or the iPod didn't play music or strcpy didn't copy, or the Blackbird didnt fly, they wouldn't exist. While products have to appeal at the emotional and aesthetic levels(like you said, which I completely agree with), they have to work! Their primary purpose is utility then, isn't it?

BTW, you get the best signal-to-noise ratio with telegrams, not with poems [KD]:) The goal of a poem is very very secondarily utility (if that), and primarily visceral and aesthetic appreciation. A poem can exist purely on it's aesthetic and emotional merits. A bridge, a plane or a program cannot.

My point is not that code cannot be beautiful. I never said that. Please read the post again. Good engineering, good design and good execution is beautiful. I believe I did say that programming is an art.

But, is all art poetry?

My point is that calling strcpy a poem is the same as calling a bridge, a plane and The Gettysburg Address, a poem.

Kogi Kaishakunin said...

My two bits... I think programming is very akin to art. For example, if you and I spent sometime in drawing we could come up with a picture. Similarly people can be taught how to program. But to write a good or "beautiful" program you just need to have that coding gene in you. That is what separates the Bill Joys and Trovalds from the rest.

Naresh, you do a lot of quoting. But what do you think?

zen said...

Fascinating debate. I completely agree with the idea that both poetry and programming can be forms of 'art'.. expressions having a visceral or aesthetic appeal.

The non-hacker perspective- that programming has no viceral quality can equally be applied to 'regular' art. To a plebian such as myself, 'art' has relatively little visceral appeal. I have rarely been moved to tears standing in front of a painting the way I have with music or even poetry. So the 'viserality' of art, as it were, is subjective too.

One of the key differences between programming and poetry however, is that of utilitarianism. While poetry might express ideas, its primary purpose is emotion. Poetry could be 'meaningless' but beautiful.. as could Jackson Pollock. But programming has to have purpose outside of 'beauty'. Thus directions to the airport may not qualify as 'poetry'. Nor might 'ugly' code.. (again being subjective here).

So some code and some writing qualifies as art. But that needn't equate one to the other.

J. Alfred Prufrock said...

Sambhar, a lot of your post makes sense.

I don't agree, however, that 'things' cannot be poetry.
Do they appeal to emotion (Naresh's 'visceral appeal')? Check.
Do they inspire thought, imagination? Check.
Do they have an appeal beyond their immediate purpose? Check.
Then why NOT poetry?

Tell you what, go pick an argument with a guy who calls himself Falstaff. You'll find the link on my blog.

Thank for dropping by, because it helped me find your place. Which I like.


sambar42 said...

I see what you are saying. But, my funda is that it's a quality of all good art to inspire, transcend utility and cause an emotional reaction. Poetry is just one such art. Programming is another. As is architecture or aircraft design.

Falstaff said...

hey. Thanks for dropping by. Since JAP essentially committed me to commenting on this, I will, though I have to say I know next to nothing about software programming.

On the bridge issue, I'm afraid I can't really agree with you. Have you read Hart Crane's poem on Brooklyn Bridge? You can find it here:


So I would certainly argue that a bridge can be poetry in every sense of the term.

That said, I do agree with you in general that programming is not poetry. My reasons are:

1) Poetry, unlike programming need not be explicable. You don't need to understand how (or why) a poem works to appreciate it (in fact, one could argue you don't even need to understand it to appreciate it) which I suspect you do with a piece of code. This means that poetry is accessible to even those who don't know a thing about it - in ways that programming is not.

2) By a similar logic - poetry is not easily replicable, whereas I would assume good programming would be. What I mean by that is this - if you were to read a piece of code and understand the logic behind it could you then rewrite it from scratch and make it work just as well? I would suspect yes. that doesn't work with poetry though. If you write a poem and delete it (say by accident) it's possible that even you yourself will ever be able to recapture the essence of the poem / make it work as well as it did before; and it's certainly unlikely that anyone else could.

3) Closely linked to your notion of utility - I think the issue is not usefulness or not, it is the question of objective evaluation. Impersonal judgement in aesthetic matters is, as Marianne Moore would have it, a metaphysical impossibility which means that we can never know objectively if the poem succeeds, whereas such a test is possible for programming - we can confirm empirically that a piece of code achieves what it set out to, and can assume that it will continue to perform in the same way on all similar systems, in all trials - but such a test is not possible for poetry. The same poem can affect you in different ways over time or different people in different ways, so there is no way to test a poem. Another way of saying this is to argue that good poetry, unlike good programming follows no laws - so that it's impossible to tell, just by reading the poem yourself, whether it will work or what effect it will have when you actually put it to use. That's not true of programming - you may miss things if you're not careful (and so encounter glitches along the way) but theoretically at least you could read an entire program from start to finish and know if it would work.

sambar42 said...

I had never read the Brooklyn Bridge poem. It's pretty good. Inviolate curve indeed.

I got nothing against bridges, Brooklyn or Golden Gate :) They are works of art that stand on their own merits. But wouldn't whatever you had to say about programming hold for The Brooklyn Bridge as well?

sambar42 said...

Just to add a bit here.
I guess what I should have said was that while the Brooklyn Bridge can be appreciated by someone who does not understand it purely for its aesthetic merits (thereby bringing it closer to a poem), it still is replicable and can be objectively evaluated. ie, does it stand? Can it carry traffic? etc.

So, maybe there's a continuum here?

Naresh said...

There are many loopholes and contradictions in Sambar’s logic.
I will tackle them one by one

- Poetry is about evoking emotion. No other utilitarian purpose
- Program’s and bridge’s rimary purpose is utilitarian
- That they are beautiful is only a by product of their design
Therefore programming != poetry

Idea behind premise
Sambar confuses “primary beauty” with “secondary beauty”.
Basically, something that was built to be beautiful is art.
Something that was utilitarian but also turns out to be beautiful is NOT ART.

Why I think he’s wrong
Just because the Taj Mahal was built to be beautiful and the Golden Gate was built to be primarily useful does not mean that it isn’t art.

Making a useful-beautiful-thing is an order of magnitude more difficult than making a useless-beautiful-thing.

The designers of the Golden Gate and the Brooklyn Bridge had to work with many more constraints and challenges than the designers of the TajMahal. Yet they managed to accomplish all that BUT simultaneously made their products looks stunning at the same time. How much talent do you think that takes?

One of the biggest assumptions here is that poetry serves NO other purpose but to communicate an emotion. He says so in this line
“Poetry is not about communicating a thought or an idea. It's about communicating an emotion.”

why I think he’s wrong
That’s belittling poets and writers by equating them to entertainers whose purpose is to entertain bored people.

I have a different take on that line. I would say it this
“Poetry is about communicating a thought or idea WITH emotion”

Why did the British Empire love Rudyard Kipling so much? A generation of British civil servants and soldiers carried his poems, books and his “White man's burden” all around the world.
What was his job or influence?
He said things that everyone said, about colonialism, about bravery of the British Soldiers, but he said it via poems that caused the strongest response in a generation of young Britons.
He didn’t tell the British soldiers, “Lads die bravely for your country” There are a 1000 other people who must have said that. He said
“When you're wounded and left on Afghanistan's plains,
And the women come out to cut up what remains,
Jest roll to your rifle and blow out your brains
An' go to your Gawd like a soldier.”

It was this poem that the soldiers carried in their pockets.
Poets and writers, more often than not conveyed very strongly their opinions on the social mores of the times. They were mostly humanitarian people who hated injustice, suffering and human atrocities.
They conveyed these stances in poems and books. They also write entertainers, but if you see the great books of the ages, there are more books of the first kind than the second.

premise 3
- Programming is also art
- Art also evokes emotion
- But Art is not poetry just like programming is not poetry.

So programming can be art, but cannot be poetry???

Ok.. drivel. But I will try being a brave soldier one last time before the verbiage drowns out my thoughts.

Why I think he's wrong
One can say Painting is not Poetry because while both aim to evoke emotion, the way they do it is different. One uses colors on canvass while the other uses words.

This is where the central thesis of my point comes in.

I will assert programming is more like poetry than it is about painting. Why?

The primary unit of construction in poetry and also programming is the written word.

The primary units of construction of bridges and paintings are other bricks, mortar, chemicals etc. etc.

So if programming is an art and painting is an art and poetry is an art, then programming is more akin to poetry than it is akin to painting.

I can write a billion words why, but I think I will step back and point you to one of the best essays I have come across till now.
Here are the excerpts that I think capture my thoughts but said by someone a billion times better than I say it.

In actuality, these dichotomies dissolve under casual scrutiny. It has been assumed that disciplines such as programming are cold, rigid, seriously analytical and antithetical to the symbolic, ambiguous, poignant, often excessive realms of poetry. To some degree this is true: there are predominant traits to each discipline. Yet poetry and programming share more than strong affinities. Each is language-based, obsessed with conciseness, consistently evolving, modelled on consciousness, and inscrutable to the uninitiated ( think of James Joyce reading C++ ). Each uses language in ways that involve leaps and circular paths; each requires an arduous concentration that ultimately relies upon reasoning which invokes intuition; and each is closely related by a shared goal of precise communication of complex realities.

In order to effectively examine whether programming is an evolutionary descendant of poetry, it is perhaps wise to begin by asking: what is poetry? What is programming? Assume (for the moment) we are reading out loud a poem from a page or screen. Each word evokes a sound and a meaning. There is an external visual element: how does the poem appear? There is an aural component: how does the poem sound? There is an internal visual component: what images does it evoke? There is an intellectual component: is it well constructed? What ideas or concepts is it dealing with? There is an emotional element (a tactile visceral sense): is the poem true? What does it do to the heart? And then there is the synergistic totality of all these elements which mysteriously combine to create a presence, an energy, a living actuality. In short, there is an infinite array of levels and sensory processes involved in provoking an experience which will be called 'poetic'.

Are these same processes and levels invoked or inherent in programming? Obviously, a series of distinctions could be made (i.e. where is the aural component to program code?), Nevertheless, what persists is the truth that both these disciplines are in focussed relation with symbolic systematized languages believed by their practitioners to be capable of representing truth, beauty, consciousness, and even love. For example, when programming an automated task such as a text reader for the blind, it is possible to speak of love as a motivational aspect of programming. Fundamentally what distinguishes poetry and programming from other literary disciplines is their mutual focus on the word as talisman capable of being a reservoir for consciousness. In poetry, this consciousness is subtle and charismatic; in programming, explicit and binary. In programming, this audacious faith in words is palpably manifest in that every functional program is an emulation of thought which through integration in an apparatus manipulates matter. In addition, the urge to evoke identity from absence is central to programming; digital intelligence has evolved from the void; it has emerged from the unconceivable; it is the volatile product of severe imagination linked with the will. As Kenneth Patchen, a early twentieth century visionary concrete poet pioneer says in his seminal work Sleepers Awake, "Art is not to throw light, but to be light…." (Patchen 268) From this perspective, both poetry and programming are activities devoted to dissolving any residue of our species-centric faith in our existence as the only repository for consciousness.

Knowing Sambar, he will want to have the last word in any argument( this one should be no different), but consider these as mine for this topic.

PS: Thanks for the pointer to the Brooklyn Bridge poem BTW , It was very poignant.

sambar42 said...


My premises are really quite simple. Perhaps I did not communicate them well enough.

- There are different forms of art, programming, poetry, architecture, painting, etc etc.

- Some art is more utilitarian than others. Just because something is utilitarian doesn't exclude it from being art.

- All art, in its ultimate level, has beauty.

- Therefore, the fact that poetry and programming are both beautiful has to do with the fact that they are both arts.

- If there is a notion that poetry is somehow the epitome of art or beauty. I don't agree. Writing poetry is just one of many arts, in my opinion. So, a bridge can be beautiful, it can *inspire* poetry, but the bridge itself is not poetry. This seems to be the biggest sticking point.

I don't understand this separation between primary and secondary beauty. In my thinking, there's beauty (or the lack thereof). I would love an explanation of the difference. Some beauty is accesible to the unintiated (like bridges, poetry, music) and some is not (like programming).

I was wrong is saying that poetry has to do with communicating an emotion. You are right, it is about transmitting a thought or an idea with emotion. But, I believe that the impact of poetry comes from the emotion it generates, not the thought itself. Which is why some love poems hit you harder than others. They are all saying 'I love you.', but the emotional impact varies wildly.

That's a great essay, btw. I will have to think some more on it.