You are here

Code And Creativity

A few days ago I had a discussion with a friend about the question whether programming was a creative task. To be able to find an answer, first of all one has to agree on a definition of the word "creativity". Basically, it means "the ability to create something", but more commonly it's regarded as "the ability to create something with at least a little artistic value". Depending on which definition you use, the answer can be "yes" or "no": Writing code is definitely a process of creation - but there's nothing artistic about it. I've heard statements of people comparing code to poetry. Poems are written to be interpreted in many ways that are only limited by the reader's imagination, but a program is read by a machine as a 100 per cent exact set of instructions; there is absolutely no room for interpretation - that's simply how machines work. Sure, you can write the same program in hundreds of thousands of ways, but reading the code will tell you (or the machine) exactly what it does; double meanings result in compiler errors. And I can't imagine someone ever hid a deeper meaning in why he or she used a while-loop instead of a for-loop; you do it either for technical reasons, for reasons of convenience, or you choose one way randomly because it simply doesn't matter how you do it. Art is about knowing where and when to break the rules the artist set up for herself; computers cannot break rules.

Then there's Perl poetry, poems written in a computer language. Those are not designed to be code but pieces of art for which the artist sets up the rule to limit the use of words and grammatical structures in a way so it can be processed by the Perl compiler without errors. But that's about all these little items have to do with code. There's no intention to make working software. Writing a good algorithm is a lot like discovering new mathematical coherences: It's a constructive process that requires quite a bit of unique thinking; that's creativity in the basic definition, but without artistic value.

That's not to say programmers aren't artistically creative. But the artistic process takes place before the code is written: During the design phase. If you write software for someone following their design specifications, you'll end up like Jonathan Coulton's Code Monkey singing "this job fulfilling in creative way - such a load of crap" and being only little more than a machine following instructions. But designing a program - especially a game or even more obviously, a demo, but also a simple calculator - always takes an amount of artistic creativity. The programming code of a demo is only "embedded" into a piece of art, up to the point of being what makes it tick, of course, but the code itself - albeit often being a masterpiece - has no artistic value of itself. In the case of the simple calculator, you could design it so the numbers on the buttons are facing upside down and let the user, or interpreter, wonder why the hell you did that. And although you'll probably make changes to the source code for that, you're still not making the code art.

It would be interesting to hear more comments about this, especially if you have examples of code that have an artistic value of itself; so feel free to leave a comment or email to webmaster@wansti.de.

Content Topics: