
Art vs. Computer Science - r11t
http://blog.steveklabnik.com/art-vs-science
======
dstorrs
In college, I was an English major. I took CS 101 because it was the ONLY
course open and I needed 3 more credits. In the first or second class Bob
Geitz (the professor) demonstrated that you can directly transform a FOR loop
into a DO...WHILE--they were completely interchangeable, but had different
nuances.

This was a transformative moment for me--I realized that computer code _is_
poetry, with all the beauty and elegance and difficulty that implies. Further,
it is poetry that can alter the physical world. In legends and mythology, what
is the one-word name for "poetry that alters the physical world"? _Magic._

I've been a computer professional ever since.

------
grantmoney
Why is art reduced to craft in this modern age? Really, for any programmer to
assume they are being artistic just because their code is 'nice' is absolutely
absurd, and it's horrifying to think it happens. To be an Artist now is to be
a social/cultural/literary critic. There cannot be art in programming, no
matter how creative one thinks they code. Please stop it!

~~~
kellishaver
What about commercial art and design? Would you consider those as having been
"reduced to a craft" as well? One could look at this from the same
perspective.

It all depends on your definition of art. For me, that's taking raw materials
and making them into something beautiful, whether it's to solve a problem or
elicit some sort of emotional/social/intellectual response, or make a
statement is entirely irrelevant. Commercial art is every bit as much of an
art. It's just art with a different purpose.

There is no reason code cannot be beautiful. Of course I don't mean that in a
visual sense. It's letters and numbers and symbols that need to be structured
in specific ways in order to function. But in an intellectual/functional
sense, code can certainly be beautiful and creative and elegant.

I don't think the author's comparing a bit of C code to a Rembrandt painting
in the visual sense, but saying that programmers should embrace those same
ideals of creativity, innovation, and fluidity of thought that many artists
do.

It's more about opening your mind to new ideas and learning to find and
appreciate the beauty in the function of the code.

~~~
steveklabnik
You've summed it up very well.

~~~
kellishaver
Thanks.

------
andreyf
_I won't dispute that computer science is indeed a science. CS is very
testable, we can easily show evidence that a pop operation takes O(1) time._

Science is about discovering models to describe the world. Proving from axioms
that pop can be done in constant time on a Turing machine is math.

 _The fundamental theories of computation are mathematically rigorous._

Exactly. Math. Not science. Nothing in science is mathematically true, only
not-yet-shown-untrue. See: <http://www.edge.org/q2005/q05_8.html#kay>

~~~
d0mine
You can't _prove_ that list.pop in Python is always O(1) (imagine there is a
bug in a reference implementation). But you can _test_ that assumption for any
given implementation.

~~~
andreyf
Given an implementation of Python, yes, you can prove list.pop will run in
some (constant, one would hope) number of clock cycles on an abstract
architecture. Building reliable machines to simulate such architectures is
part of CS, but not a science.

Science is the construction of abstract models which match observed phenomena.

------
kellishaver
FWIW, which probably isn't much, I have a degree in fine art. Most of my work
these days is UI design for web apps, but I also end up coding those UIs. With
the exception of one long-standing project, any backend development I do
(which does come up from time to time), I do in Ruby, which I switched to
almost exclusively after using PHP for years, because it felt cleaner and more
natural to me. Not that I have anything against PHP (I don't want to make this
into a language war), it just felt like a better fit for me, personally.

I love beautiful code, whether it's javascript, ruby, or just html/css markup.
My goal, at the end of the day, is to do as much as I can with as little code
as possible. For me, I find that when I'm pleased with how my code looks, it
also runs better, more efficienly, and more smoothly-not to mention it becomes
much more maintainable.

I would say that there are certain artistic principles that influence the way
I code and I try to extend the clean elegance of the UI to more than simply
its appearance. I want the code that powers it to match that aesthetic in
terms of its form, readability, and efficiency of function.

------
ntownsend
_I don’t have a paper to show you, some great insight into how von Neumann
architecture is totally lame._

If it weren't for the von Neumann architecture the author wouldn't have pretty
code to look at. I suppose he could write a post about the arty setting of
switches and attachment of patch leads on his personal ENIAC.

It seems to me that the requirements for the existence of code meant to
program a computer (and look pretty) are a memory to store the code and an
automatic method of retrieving, and carrying out, the instructions in the
code. That sounds a lot like the von Neumann architecture.

Also, I don't follow the analogy to pre- and post- relativistic physics. There
was a shift in the intuition and the models used, but the object of study
didn't change. Physics stayed the same. Electrons didn't change their behavior
because we came up with new models for them. Similarly, in computer science, a
shift in intuition and models doesn't change the nature of computation. The
travelling salesman problem is still NP-complete.

------
amichail
As you might guess, I think this completely misses the point.

See: [http://blog.computationalcomplexity.org/2006/07/science-
and-...](http://blog.computationalcomplexity.org/2006/07/science-and-art-of-
computation.html)

~~~
steveklabnik
I don't think that CS in a strict sense should go away. On the contrary, I
don't think more formal methods are thought about enough. However, I do think
that outside of the box thinking is important, and things that are not
strictly scientific can be pursued from other perspectives, such as api design
or interface design.

Offtopic: wow, this droid is hard to type on compared to my iPod touch. Sorry
this response was so mangled the first few times.

~~~
amichail
The point is that the art of computing should be much more interesting than
anything to do with coding style. See the link above.

~~~
steveklabnik
I don't think anything should be more interesting than anything else.
Different things appeal to different people. As I get older, I find myself
becoming more interested in things that are more in the realm of engineering
than strictly theoretical science. Doesn't mean theory is good or bad, and I
do like some theory topics.

------
steveklabnik
I had to vote this one up. Thanks for submitting it.

I have a few posts related to this half written, but I haven't gotten around
to finishing them yet. I think this is a really interesting topic that doesn't
get enough discussion in the community at large. We already have "IT vs IS vs
CS" distinctions that are tenuous at best, yet I think most people tend to
approach CS more of an art or craft than as a science.

"Computer Science" as a term has really gotten muddled by the universities. I
try to stick to its original definition, but I'm unsure how long it'll stay
that way, considering languages change over time...

------
HenryR
Computer science is the formal study of problem solving. Hence, algorithms -
deterministic, mathematically tractable, general solutions to problems. Hence
programming language theory - ways to efficiently express solutions to
problems. Hence the study of data structures: building blocks that solve small
problems, which crop up in many, many larger spaces, very effectively. Hence
the study of the formal theory of computation: tractable models of mechanisms
for general computations that happily map onto physically reliable machines.
Hence computing machines: devices that allow us to compute solutions to
problems at high speed. Hence machine learning, computer graphics and natural
language processing: studies of specific classes of problems that happily
submit to some general (but domain specific) approaches.

Computer science shares some of the creative sensibilities of mathematics: the
building blocks (theorems) may be well understood, but there is a creativity
and insight required to arrange them in such a way as to produce an
[efficient/elegant/small/general] method to solve a given problem (proof). At
the same time, this is why coding on its own is such a pale shadow of the
entire field of computer science. Implementations at their worst are merely
transcriptions of someone else's work.

Don't aspire to be an artist with your code; it's not the medium for art.
There's a different aesthetics at work here. You will not habitually provide
commentary on society or the human condition. Don't begrudge others the fact
that they might. They don't begrudge you the beauty that you produce.

------
tumba
I'm surprised nobody has referenced Donald Knuth's 1974 Turing Award speech,
Computer Programming as an Art.

<http://portal.acm.org/citation.cfm?id=361612>

Paul Graham even posted it in its entirety here:
<http://www.paulgraham.com/knuth.html>

This question hinges on how you define the terms science and art. I like
Knuth's definitions.

------
brazzy
I think that if you believe coding is an art form, you are deluding yourself.
You probably wish that your chosen field of expertise would get more respect
from society rather than being considered a boring occupation of geeks. I can
understand that, but wishes don't make beggars ride, and neither will they
make coding fashionable and cool.

Code is not art, and never will be. Art is something created purely for its
aesthetic appeal and to evoke emotions. Code written to be executed by a
computer. It may have some aesthetic aspects but these are secondary to its
executability. It also requires far too much prior knowledge to be appreciated
by most people.

At best, code can incorporate aspects of industrial design: an aesthetically
pleasing symbiosis of elegance and functionality, but with the latter always
being the dominant goal.

The article also assumes a false contradiction between art and science that
makes me suspect the author understands neither.

~~~
steveklabnik
> Art is something created purely for its aesthetic appeal and to evoke
> emotions.

What do you think of things like obfuscated Perl, Perl poetry, the Underhanded
C Contest, obscure langauges like Brainfuck, 'joke' languages like Intercal or
Malbolge, or even, say, Ruby on Rails? Sometimes code is created for a reasons
other than functionality, or is functional while making commentary on the
world or the way things should be.

Also, languages themselves ooze philosophy. We talk about not 'writing Java in
any language,' or how Rails is 'opinionated software,' or how Python is
'batteries included.' Every language expresses its authors viewpoints about
the world.

> It also requires far too much prior knowledge to be appreciated by most
> people.

I didn't think that accessibility was a requirement for art. In fact, it would
seem that among certain crowds, work that's too accessible isn't seen as art.
My art history is admittedly really poor, but wasn't pop art looked down upon
for a while? Besides, you can't possibly tell me that, say, modern art is
accessible, yet it's still art.

> The article also assumes a false contradiction between art and science that
> makes me suspect the author understands neither.

I'm not saying that they're contradictory. As someone else summarized earlier,

> I don't think the author's comparing a bit of C code to a Rembrandt painting
> in the visual sense, but saying that programmers should embrace those same
> ideals of creativity, innovation, and fluidity of thought that many artists
> do.

------
friism
I think a project like OpenFrameworks embody some of the thoughts in the post:
<http://www.openframeworks.cc/> (don't get put off by the fact that it's C++)

~~~
jrbedard
If you are put off by C++ but not by Java, there's the Processing framework
which is similar: <http://processing.org/>

~~~
steveklabnik
... I'm personally put off by both, but I agree with both you and the parent.
These are both libraries that try to show code from a different perspective.
Good links, both.

------
robfitz
_But you can’t get a ‘liberal arts’ CS degree._

Georgia Tech's Computational Media degree is one of these. The major is shared
by their CS and Literature departments, thinking about programmatic artifacts
as if they were traditional cultural media like poetry or music.

I was one of the first graduates from the program and it hit on something I'd
really felt missing elsewhere, so take this as a recommendation if you happen
to be looking for a university in the SE US...
<http://lcc.gatech.edu/compumedia/>

~~~
steveklabnik
Thanks for the link. I already went to school, but I'm really interested in
the different ways that programming and CS are taught, so I'll check that out.

------
justagirl
Actually it is possible to have an arts degree in comp sci (i have one).
Second - it doesn't matter what language you use; you can be a code "artist"
and program in any language. I don't get why people obsess over obscure
languages instead of developing marketable skills. Nobody uses Haskell!
Finally, please not another computer science vs engineering vs art vs science
debate. It gets old. Who really cares anyway?

------
amando44
<http://www.computer-nach-wunsch.de/>

------
anonjon
I think of the non-hardware parts of computer science as applied philosophy.

Art seems wrong to me as a descriptor because it would imply that I'm writing
code for a sort of aesthetic beauty. The aesthetic beauty should be in the end
result.

Which also means it probably isn't science, because really what I worry about
when I'm programming is that the end result will be correct. To some extent I
am concerned about scientific process, having a program that is repeatably
verifiable as doing what I expect, but in terms of actually using scientific
methods to write software, I can't really say I do that very much. As with the
beauty, the science is in the end result and not really the process.

Which brings me to why I think it is applied philosophy:

What am I doing when I write code? I am taking a problem and deconstructing it
into different pieces, finding ways to represent the different pieces, and
reasoning about how everything should interact. I think this basically holds
true for functional, object oriented, and imperative programming.

I think that from this perspective, writing code is closest to some sort of
philosophical inquery. You are using a computer to build abstractions, and
through enough abstractions (or abstractions written by someone else, imported
in libraries), you are able to create something.

~~~
steveklabnik
> Art seems wrong to me as a descriptor because it would imply that I'm
> writing code for a sort of aesthetic beauty.

I think code can hold the same kind of beauty that math has when someone says
that a proof is elegant, or a theory is beautiful. It's not a visual
aesthetic, but appealing nonetheless.

Anyway, I think that the idea of programming as philosophy is interesting.
I'll have to think about that more.

