Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Is Programming Art?

DZone's Guide to

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?

· Java Zone
Free Resource

Learn how to troubleshoot and diagnose some of the most common performance issues in Java today. Brought to you in partnership with AppDynamics.

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.”

Fair enough.

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.

Artist

Here is the idea that the primary purpose of and goal with a work of art is the aesthetic appeal.  So if you think in terms of users/consumers/customers/whatever, the producer of an artwork makes something designed to appeal aesthetically to the audience, and the audience considers it on that basis.

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.

raccoon

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.

Understand the needs and benefits around implementing the right monitoring solution for a growing containerized market. Brought to you in partnership with AppDynamics.

Topics:
computer science ,programming ,software development

Published at DZone with permission of Erik Dietrich, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}