Friday 6 September 2013

Is programming really art?

Disclaimer: I love programming.

 The other day Meza went to great length discovering the nature of programming. His conclusion is that programming is art.

I beg to differ.

 I don't think carpenters and painters are the same. Neither are musicians and programmers. Silence and a problem to be solved are not the same. A painter wants to say or to show something, and then the audience can decide whether or not they like it. A programmer is presented with a problem, and they go about solving it. It's not an empty canvas, it's not what the programmer has to tell the world. There is nothing artsy about it. It's creative, it's rewarding, but it's not art.

There is however a great deal of craftsmanship involved. Now. Not all crafts are the same. A plumber for example is pretty much bound by the way a pipeline can run, by the placement of the bathtub or the mainline. He has quite little room to maneuver. A carpenter on the other hand only has to make sure that the table's surface more or less flat, or not even that.

A programmer is as free as it gets. Software is called soft for a reason. Not a single element of the program to be written is bound by anything other than the programmer's mind. And now you might think I'm exaggerating. Think again.

The greatest thing about being a programmer is that you can solve a problem literally in thousands of ways. You can even create your own tools while at it. I know of no other craft that you can say the same about. And that's why I love programming.

1 comment:

Athos said...

Actually, when writing code, you pretty much do most of the following things all the time, possibly without ever noticing:

* Break down a problem into several subproblems that are simple or easy to be solved and _communicate_ the ideas you come up with along the way, in code.
* Follow a set of rules, and every now and then intentionally break some of them when it yields better results. Don't forget to express as much as possible of such decisions in code, as well!
* Invent good names, often metaphors to make your code easier to understand. (Remember the wollet example from the TDD book?)
* Fine tune it step by step, piece by piece until you are satisfied with and proud of your creation.
* Sometimes, when facing the limits of the tools or the platforms you are working with, you need to be creative, and push those limits to the extent where the things you are doing, seem impossible to be done in the first place. (The obvious example here would be the demoscene, which is definitely a form of art, but the same mindset can help a lot when dealing with mobile phones, javascript optimization, etc.)
* GUI is often an essential part of a software, so the rules of visual arts often come into play when designing and implementing a nice GUI. (Golden ratio, colors, etc.)
* When doing the fail-pass-refactor cycles, you are actually doing steps and movements that you have practiced a thousand times until they became so easy to do that you don't even have to think about them, allowing you to focus your thoughts on the higher level concepts and abstractions. In other words, you don't think about the magical Vim commands or the IDE hotkeys while using them, you don't think much about code smells and refactoring steps, they just keep popping into your mind in an instant as you are reading the code.

All of these resemble exactly what you do when practising any of a big variety of arts, be it creative arts or martial arts, whatever. It's true that art is often about expressing your thoughts freely, without any constraints and boundaries (other than those that are imposed by your knowledge and experience), but art does not stop there. Many instances of art were created with the authors being limited in what they were expected to express and in what forms they could do it. Think of the several paintings for example, that were created to make a customer happy, or the soundtracks of many movies: e.g. the main theme of the Pirates of the Caribbean wouldn't fit well into the movie Requiem for a Dream, regardless of both musical pieces being able to express certain emotions and moods.

In short, I'm not sure if we can draw a sharp line between art and programming that easily.