Code is not art

Note: I wrote this when my primary job was writing code. It still reflects my view, more or less, but is intended to belittle neither code nor those who create it. To me, code is no more or less valuable whether you do or do not view it as “art”.

I have often heard software engineers say that code is art. That feels good to hear, I admit.

We like art. Making art is a creative process with infinite choices and nearly as many media in which to make it.

But code is not art.


Code is made to run.

We don’t write code to be admired for its beauty alone. Without an execution context, code is inert. The beauty is in the running.

And in the running, code is designed to help achieve desired quality attributes in a system. “Fast”. “Available”. “Secure”. “Testable”.

Code is not art.


Code achieves the desired quality attributes in a system somewhat, completely, or not at all. This is measurable and measured. Otherwise, an objective measure does not exist, only its potential.

Code can be and often is objectively, measurably bad.

Code is not art.


Code is never “ahead of its time”.

There’s no code that I like because it reminds me of the crisp fall air in Tennessee and that my mom dislikes because it’s “not blue enough”.

Code is not art.


We don’t agree to disagree about code at runtime. Code at rest, maybe, but not once it’s running. Code either does what it’s designed to do or it doesn’t, measurably. Even if it does do what it’s designed to do, it can often do it better, measurably.

Oh, did I say we can agree to disagree about code at rest? Static code analysis would like a word, when you have a moment.

Code is not art.


We can agree to disagree about style then. Is that ok?

No, probably not. Code is designed to be read by humans and communicates to that audience. Function, variable, and class names can be and often are objectively, measurably bad.

Software engineering has a lexicon. A queue is not a “bucket”. We don’t “change” records in a database. We update them.

Code is not art.


I have often heard software engineers say that code is art. That feels good to hear, I admit.

But code is not art.