Opinions
This is an opinion page. It is not necessarily a source of truth.

Is code art?

Yes. I think that writing software is an art for the same reason that performing the violin is an art: both require one to develop both (1) the technical skill to work with a medium and (2) a developed sense that allows them to effectively exercise creative control over that medium.

A picture of a water clock
A picture of a water clock

Picture by Marcus Guimarães, CC BY 2.0

What is art?

I personally consider art “a product of creative control and technical skill” — a definition reflected in the Merriam-Webster dictionary, and to me, it is clear that programming involves both to various degrees.

If you were to task a non-musician with listening to a violin performance, they likely wouldn’t have the trained ear and vocabulary needed to notice the intonation, expressiveness, or whether the performer’s nails turn white as they press against the fingerboard — they’d only know whether or not it had a pleasing effect to their ear. Similarly, if you were to task a non-programmer with evaluating a sufficiently complicated codebase, they likely wouldn’t know where to begin navigating it, what makes it good, or how to identify its bad design decisions — they’d only know whether or not it functions in a pleasing way.

Is programming expressive?

It can be. For concrete examples of artistic coding where creativity and form take precedence over “just solving a problem”, look at the International Obfuscated C Code Contest (IOCCC), the demoscene, the entire hobby OS community, or most of the quirky software in the Plan 9 community.

Not all programming is necessarily expressive. I concede that adding an endpoint to an API that fetches content from a database is not a particularly creative task. A significant amount of work done in the software industry involves these drudgeries in the same way that a significant amount of work done in the arts industry involves tweening between keyframes and animating icons. For cases like that, I do not think it matters much if people use AI for those tasks.

That said, building any sizeable and non-trivial codebase involves making countless design decisions regarding API design, program structure, and implementation. As a result, I think most software is expressive to some extent.

Don’t programmers only write optimal solutions?

Sort-of. Every programmer has a different view regarding how to solve problems, and they all think that their solutions are the best. Therefore, “solving a problem in an optimal way” usually ends up being a form of expression.

If you task two programmers with creating “the best web server ever”, one person will use a thread-per-request model in Rust, another will use a libuv event loop that offloads blocking operations to an external process. One person will implement dynamic pages by calling a FastCGI server, and another will implement dynamic pages by calling a Lua interpreter. Both servers will probably end up with comparable performance despite them being implemented completely differently because many problems have multiple good solutions.

Do programmers want to express themselves in their work?

I would argue that they do. There is a derogatory phrase in programming circles, “not invented here”, that refers to the tendency of some programmers to reimplement things when it is not necessary — often because they would like to solve problems in a slightly different way. This phenomenon would not exist if programmers were solely focused on making functional software. Therefore, I would argue that it exists for personal development and artistic fulfilment.

Does programming provide a “social dialogue”?

Yes. Writing a software project of any significance requires one to interface with tools, libraries, operating systems, and other APIs that have been shaped by thousands of other programmers. One must read code, examples, and documentation written by other humans, make it their own (to some extent), and use it to synthesize something that is their own. This is obviously an active and constructive form of engagement with others’ work.

There are abstraction layers such as SDL that reduce the amount of engagement a programmer must make with other codebases, but even so, some amount of engagement is required.

Rebuttals to common remarks

“Art must convey emotions, themes, or aesthetics.”

Someone who says this is using the word “art” to refer to fine art: products of skill where aesthetics and expression matter most. I agree that most code is not fine art, and only forms of code where expression is paramount (such as the ones linked previously) would qualify under such a definition.

That said, I would argue that only recognizing the fine arts as “art” is an idiosyncratic use of the word. For example, pottery and graphic design are both widely considered “art” despite not necessarily meeting the criteria for fine art.

“You can learn to code in a weekend, but you can’t learn to draw in a weekend.”

Weekend painting classes and workshops are a counterexample to the second statement.

“Programming is not art because it is functional.”

If art must be non-functional, you have a different understanding of the term compared to the vast majority of people. For example, Bernard Gitton’s water clocks are built to tell the time, but most people would agree that they are works of fine art because the design is easy for untrained individuals to aesthetically appreciate.

“Programming is like solving a puzzle.”

A Rubik’s cube can be solved with the same techniques every time. The same is true for sudoku puzzles.

Unless you are repeatedly reimplementing variations of the same things (e.g., web forms, basic game functionality), writing software always involves continuously learning and widening your understanding of how software can work (as well as how it can break). This process is fundamentally different from learning to solve a puzzle where the goal can be predictably achieved after learning a few methods.

“If everything is art, then nothing is art.”

I don’t think everything is art — only the products of creative control and technical skill.

“Programming isn’t art because creative expression is not its main goal in most professional settings.”

Is creative expression is the main goal of any discipline in most professional settings? As a counterexample, writing is part of the fine arts, but as far as I can tell, most professional writers spend the bulk of their time on legal documents, sales pitches, news articles, and copy-writing.

References