Is Programming Art?
How we program can be described across a span ranging from art to science. It has been a nagging question in our profession for some time. Where do you fit?
Join the DZone community and get the full member experience.Join For Free
don’t look now, but i’m pretty sure this makes three weeks in a row of doing at least 1 reader question per week. today, i’m going to tackle a question i received: is programming art? here is the actual text of the question. it’s a well-written consideration that cites two parallels: painting and writing.
this article asks if computer [scientists] apply scientific methods, but perhaps we should reconsider the premise, is computer science even a science at all? i contend that a software engineer has more in common with an artist than a physicist. if a painter applied scientific principals and determined that the most pleasing color is purple and the most pleasing subject matter is a tulip, then all artists would paint nothing but purple tulips, which would not be pleasing at all.
lets compare the developer to another type of artist, the writer. whether you’re writing the great american novel or assembly instructions for a book shelf, or anything in between, you must consider questions like what tone of voice should i use, how formal should it be, how long should each chapter be, etc. there is never a single, scientific answer to those questions any more that there is to questions like how long should a method be, how descriptive does a local variable name need to be, etc.
to answer these questions, any writer or developer must consider the target audience. the great american novel will be written in a much different tone than a book to teach children how to read. the audience for your code is not the user (that’s the audience for the ui). the audience is the cpu, but much more so, its the next developer who needs to edit your code, or even a future you.
bear in mind that this was written against the backdrop of this post that i wrote back in the fall , in which i answered a reader question about whether what programmers do is scientific (as in the “computer science” that we learn). thus, the sentiment here seems to be, “i think maybe what we do is better compared to art than experimental science.”
what is art?
but before going further, i’d like to level set a bit with the actual definition of art. if i go the classic, find a dictionary definition route , i get an adorably lieutenant data-like answer.
1. the quality, production, expression, or realm, according to aesthetic principles, of what is beautiful, appealing, or of more than ordinary significance.
2. the class of objects subject to aesthetic criteria; works of art collectively, as paintings, sculptures, or drawings: a museum of art;
an art collection.
if i go look for any number of essays on the topic , two main themes emerge. the first is some rallying around the “it’s hard to define, but maybe it’s like the obscenity case in that i know it when i see it. ” i think this line of reasoning is intended as an inoculation against the philistine in the art museum saying, “throwing paint at a canvas ain’t art — i coulda done that!” that one isn’t particularly interesting for our purposes here, which brings me to the second theme: aesthetics.
from this working definition, consider the examples in the reader question. the first item of interest is the painter arriving at the ‘optimal’ painting of purple tulips. that might be the optimum, at least until the audience grew bored and wanted something different. due to saturation, the purple tulips would lose aesthetic appeal.
next up are the various flavors of writing: bookshelf assembly, great american novel, children’s phonics book. using the aesthetic heuristic for art, do these quality? the answer is, “no, yes, no.” an instruction manual isn’t intended to appeal aesthetically though a bored writer may try to inject some panache into its writing. the great american novel is intended purely for aesthetic purposes — it does nothing but entertain. the children’s book? that’s intended to be instructional. the aesthetic appeal here would be intended to hold the children’s attention — helping with its true functional purpose. (as an aside, the aesthetic heuristic makes considering the ‘audience’ to be the cpu get a little surreal.)
what about programming?
so far i’ve talked a good bit about art, and some about painting and writing, but none about software. using the aesthetic heuristic, can we say that programming is art? i would say, yes, absolutely. but i’d say this only if you include the realm of video game programming. if you leave aside the cultural baggage of “is halo really art,” you’ll observe that video games sell aesthetics in the form of entertainment. audiences get excited over impressive visual rendering and realistic ai competition. they’re not buying video games to learn nor are they buying them to increase the profitability of a venture. they’re buying them because they appeal.
outside of that, is programming art? it’s hard for me to buy that line of reasoning because the most software in the wild has an efficiency-increasing value proposition, meaning that it’s motivated by something other than aesthetics. you don’t add a plugin to your corporate sharepoint because of the beauty of the sharepoint api — you do it so that the company doesn’t need to incur the salary cost of a temp to key in data manually.
now, i understand the line of thinking that goes, “this is more art than engineering/science” when talking about something whose solution space is extraordinarily open-ended. is your door hinge squeaking? no mystery there — throw some wd-40 on it. is your door missing? well, there are so many options for replacing it, that we’re talking more art than science. it’s easy to get caught up that way as you contemplate what door would look nice, but let’s not forget that your main goal is to keep raccoons from wandering into your house.
programming as _______
i can succinctly summarize my answer to the question in the title. is programming art? sometimes, but usually not. interestingly, this would also be my answer to, “is programming science?” and that’s kind of interesting because it is suggestive of the degree to which software development has permeated society.
at its core, software development is optimization , i’d say. it’s about figuring out what can be delegated algorithmically, and then construct that delegation. this applies to the sharepoint plugin and other mundane line of business things, but it also applies to sleek apps and video games. in the case of the latter, you’re automating entertainment. instead of going outside to play basketball, kids are playing it virtually on their phones.
because programming is becoming woven into the fabric of our existence, i think you’re going to have a fairly easy time finding examples of when it looks like or even is something else. programming can be art. programming can be science. programming can be engineering. programming can be mindless data entry. which of these things it is when you’re doing it is within your control. mostly.
Published at DZone with permission of Erik Dietrich, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.