Hacker News new | past | comments | ask | show | jobs | submit login
Art vs. Computer Science (steveklabnik.com)
47 points by r11t on Jan 10, 2010 | hide | past | favorite | 37 comments



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.


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!


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.


You've summed it up very well.


Thanks.


I could argue that art consists of representing the world of human experience. That 'art' is right-brained, non-reasoning, 'intuitive'. There are many ways of representing the world, some of them 'better' at communicating one's intentions than others. E.g. Picasso beats Ricky 3rd-grader, Mozart beats Milli Vanilli.

Now I'd argue that a computer program is a representation of a world. It has logical aspects, yes (just as Norman Rockwell's 'art'.) But it also has aspects of quality, design (definitely non-logical), and, particularly important, how well it stands up to being battered by the input the world throws at it ... how well it represents a world.

Just like scientific theories, or mathematical conjectures, success may depend as much on beauty as on reasoning. Diamonds are judged just as much by cut as they are by weight. See Kuhn. See what happened to Eddington's 'Fundamental Theory'. And please respect Knuth's sense of the 'Art of Computer Programming'. Whether you understand what 'art' means yet or not.


I think you've confused a fraction of art with the whole. Art comes in many forms both low and high, both utilitarian and purely expressive. Art can be made by artists, but it can also be made by artisans (craftsmen).

This used to be obvious, most of the great Renaissance artists would be perfectly familiar with this definition. Many of them served as both artist and artisan depending on the circumstances. Is the ceiling of the Sistine chapel art? Few would say otherwise, yet it is just a mural. Is St. Peter's Basilica art?

Where do you draw the line? Is architecture art? Is graphic design art? There is no chasm between practical art and expressive art, it is a continuum with extremes at either end. To refuse the label of "art" to the craftsmen is an extreme disservice to their talent and their souls and to us all.


Can you elaborate on what exactly you mean by "art?" We can't have a useful discussion about a concept (and especially a duscussion about one concept being in the equivalence class of another) without knowing what our terms mean. In what ways are art and craft different? What are examples of art? Are you equating "art" with "fine art," or do you mean something else?


Apologies for being vague. Art is always a hard one to define in absolute terms, but the question that makes it easier (I think) is what is left for art? How does one become an artist these days? Is it enough to be purely ornamental? When we have advertising, music video, and graphic design to satisfy those types of creative spirits, what does the artist do to compete as Artist? Also with language in the West in the state it currently is in (words as symbols), art can mean anything to anyone, which is kind of a problem.

In the ways science must update its language when the language is polluted by society (cult, idiot, retard, etc), the language that describes creativity might do well with a refresh. I don't know - I look around, and every corner of every room has some genius sitting in a chair. I mean really, is this at all possible, and if so, new words should be invented to distinguish the great genius and just genius. I think the same problem exists when describing what creativity is, because to say it's all art is to say everything is merely art.

What I think art has become is a perspective. To be successful in art is to be able to initiate a unique conversation about the world using the Artist's worldview. A craftsperson requires a skill set - the ability to shape matter into an object, but almost nothing more. The artist must use what they create to say something profound. In an environment such as programming, this doesn't seem possible, but I'd love to be proven wrong. In saying that though, if there was to be any art in programming, it would be to program in a such an ugly fashion that no-one would think possible that the code was functional, but it would be.


It seems that 'art' vs 'craft' shares the same relationship that 'computer science' and 'programming' do. Not they're equivalent, but that they both share the same kind of higher vs lower distinction. Mildly off-topic, but I think it relates well to your 'pollution' sentiment. Universities have certainly been using the name 'Computer Science' while teaching 'programming.' And not teaching it well. But that's another discussion.

> In an environment such as programming, this doesn't seem possible, but I'd love to be proven wrong.

Not that anything can be proven, but I do think that code can say profound things. It might just be that it's because I'm only (almost) 24, but I feel that code helps me to understand myself, and has managed to change my opinions on seemingly unrelated topics. I'd agree that art has a higher calling than 'pretty pictures,' and that it "say[s] something profound." I didn't say much about this in my post, though.

To fully relate how I think about this would require a whole essay. So I'll be a little short, and sum it up with a small example.

I've been programming computers since I was 7. That's 17 years of coding. Yes, it's not like I was writing anything amazing at that young of an age, but those silly little games that I wrote certainly affected me personally. In a very stereotypical way, I was drawn to libertariansim, even though my parents are pretty staunch Republicans. I discussed a lot of political philosophy with a friend of mine who has very different views than I, and she remarked how much she saw a similarity between my thought process and the workings of a computer, and it really made me think about my views on the world. I realize that I tend to view the world as a system of equations, or a function with inputs and outputs, that I have pretty simple heuristic functions by which I make decisions, and that most people _are not like this at all_. Which came first? Do I think this way because I've been programming my entire life, or do computers work that way because they're a human creation?

This realization causes me to compare and contrast code and life on a fairly regular basis. When I go to write an API, I try to think in terms of communication. Connecting two applications is like connecting two people, and you have to bridge the gap between the two. When I'm naming functions or writing documentation, I think about how I'd explain my understanding of a problem to another person, and how the pieces of the puzzle fit together. When I see language wars, I think of how they're similar to real wars; no matter who 'wins', _everyone_ loses. Also that sometimes, quantity (of users) is it's own kind of quality (of design decisions.) When I think about Open Source, I try to resolve the cognitive dissonance that makes me say "socialism can't work" with the fact that I participate in something that's socialist in nature on a regular basis.

At this point, I'm rambling. Sorry. But I hope that I've at least started to make you think about the topic a little. The medium may be a bit strange, but it's not like modern art "say[s] something profound" to John Q Public, either.


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


I wouldn't say that theories we can actually prove are not science. Provable theories become approximations again when you take them out into the field. Also imagine a theory that is at first verified through experimentation, but later proven when found it relies on a mathematical relationship. In general science is not that well-defined. What matters is what knowledge the theories convey.

What most computer scientists don't yet realize is that algorithms are not that important. Their specific solution tailors to a certain context and its testable properties depend on that context. The interesting thing about Dijkstra's shortest path algorithm is not how he actually solved it, but the computational complexity of an optimal solution. If you look at it closely this is not really that interesting either. It does not tell you how to solve your shortest path problems when you're building a large-scale on-line route planner (notice all the context). It's just a little nugget of knowledge that can help you during design.

More powerful examples of computer science are Amdahl's law and the PFTK model for TCP throughput. These give us deeper understanding of the world of computation and networking that can really help engineers, the same way physical laws help engineers.


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.


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.


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.


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.


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

See: http://blog.computationalcomplexity.org/2006/07/science-and-...


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.


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


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.


The point in a mere six words:

Computer science is not programming.


You are correct, no matter how much universities seem to want them to be.


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


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.


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.


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.


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


"Code [is] written to be executed by a computer."

Maybe. It also is to express the author's understanding, description and specification of the problem domain and problem solution to other humans. After all, most code will be compiled. The compiled output is what the computer executes, and there can be many high-level input languages that (theoretically) compile to the same machine code.


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++)


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


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


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/


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.


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?



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.


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




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: