Archive for March, 2007

Shakespeare and the Art of Coding

March 18, 2007

That, for a start, is “coding”, not “codeine”.

What is the relationship between Shakespeare and the Art of Coding? Is there a relationship between prancing around on a stage reciting sonorous lines of poetry and salacious prose, and the noble art of sitting down to a session of hacking out a solution to a problem?

If so, what?

I took a course in writing plays last year. I even was the sound of the mournful wind in the hills in a one-horse town in the West Coast of New Zealand’s South Island during the Gold Rush days, during a play on that very subject.

One thing that struck me, watching the course teacher, who by then was a friend, changing her play on account of the actors’ concerns about how it could be made better. It was so much like how I was taught to program. Find out what is required, then find out some more, and even then you won’t have the full story. Then when you think it’s finished, it won’t be, and you’ll need to start over again, at least for some sections where it just doesn’t work …

And then there’s the performance aspects of it.

A book is perfectly satisfactory just sitting on a shelf. Fiction, non-fiction, religious, reference, whatever. It doesn’t need to do anything.

A play is next to pointless just sitting on a shelf:
“Tomorrow and tomorrow and tomorrow,
“Creeps in this petty pace from day to day,
“To the last syllable of recorded time;
“And all our yesterdays have lighted fools
“The way to dusty death. Out, out, brief candle!”

That requires expression. You need someone on a stage, hands out, voice breaking, then hardening, as the small glimpse we are shown of Macbeth’s heart is blown out by the shock of his wife’s death and the impending attack by the son of the man he killed to gain his throne, in alliance with the English.

In much the same way, software is written to be performed. Unlike prose, it doesn’t fully exist without a computer to “perform” it. Minix or Linux, for example, without compilation is as uninspiring as Macbeth without performance.

But the other thing is that, much like a play may well be altered dramatically from its printed version, in order for it to actually work on stage, so software may also need to be radically altered to enable it to work in new situations.

Shakespeare knew most of this, insofar as it relates to plays – that is why people still go to see his plays performed, that is why people still wish to perform them. That’s why people still work their guts out editing the text, confused as the original Quartos and Folios often are.

And that’s the link between the Bard and Software. I could have said that in fewer words, but I wouldn’t have known as much about what I was saying, if I had.