Page 1 of 2
Is code art?
Posted: Thu Dec 13, 2012 3:49 pm
by mariuszp
I've heard (haven't looked into it much yet) that people argue whether code is art.
My argument would be that it is art, because each programmer has a specific coding style, and comments in code could sort-of represent the programmers' feelings (you can sometimes see if they were calm or stressed for example).
What are your opinions?
Re: Is code art?
Posted: Thu Dec 13, 2012 4:08 pm
by Kazinsal
Re: Is code art?
Posted: Thu Dec 13, 2012 5:25 pm
by Jezze
I don't know if code is art but there is a beauty in code that is written in a way so you can read it just like if it was a book. It has a perfect tempo and structure and not once do you need to stop and think about what something does. It's purpose is obvious.
You know you have achieved this when you stop and wonder why all the code you've written seem to magically have disappeared.
Re: Is code art?
Posted: Thu Dec 13, 2012 10:11 pm
by sandras
I think there is no clear line between science and art. I can especially see that those two are very much together when I research music and sound. Like the time I found out, that the two most harmonious sounds to human ear have the wavelength ratio of 1:2, which is the simplest ratio. I don't necessarily mean that there should be just one concept for both science and art (I'm not sure where I'm standing on that yet), but that there may not be a clear line between the two, and that they have some things in common. So some things may have the qualities of both, some may have the qualities of just one.
The question, I think should be not "is code art?", but "where on the science-art scale does programming stand?". But then, you can't measure how much of a science/art something is, and the question becomes irrelevant.
I remember I a had simple echo implementation, which reminded me of a four line poem. And yeah, often I find pieces of code visually pleasing or the other way around.
Re: Is code art?
Posted: Thu Dec 13, 2012 10:48 pm
by earlz
I think it's both. Code is the perfect intersection between creative writing(art) and math. I think the main contributing factor to this is that there are many ways to get to a single solution to a problem. Many different ways to write code that does the exact same thing and compiles to the same machine code.
I think code is rather unique in this aspect even. In most things either there isn't a single solution(art) or there isn't more than one or two distilled approaches to get to the single solution(math).
Re: Is code art?
Posted: Fri Dec 14, 2012 1:34 am
by b.zaar
Code is art the same way painting is art. Sometimes you are painting a house sometimes you are painting a landscape. There is an art to everything and it comes naturally when you find it.
Re: Is code art?
Posted: Fri Dec 14, 2012 1:52 pm
by DavidCooper
Art is something that's been deliberately designed to affect people emotionally, though usually with a positive purpose (so killing lots of people to affect others emotionally would not normally be considered to be art as it's too negative). It certainly does come into programming in some places where we try to make the way things appear on the screen look attractive, but most of our code has no artistic component whatsoever. It is possible though to use programming for artistic purposes in various ways (as others have pointed out) which may have nothing to do with what the program does and which can only be seen by looking at the source code, but few of us are into that.
It's much the same as manufacturing gadgets like cameras, cars and the like - the main task is to get the functionality right, and a lot of that can lead to things appearing to be beautiful or ugly because of the way the functionality steers the design, but then the designer can stamp their own artistic ideas on top of that and tweak the thing into a form that's designed specifically to appeal to people emotionally. You won't usually find that in hidden components, and when it comes to computer programs almost everything is hidden so there is usually no need for us to think about how it looks beyond the practical one of making it easy to work with. But there are modern art prizes up for grabs which are generally won by things built out of or relating in some way to excrement (as they've all run out of ideas), so they'd probably be excited by something different like computer-code art if anyone can come up with some innovative ideas about how to do something artistic with it, though it would probably need to have some practical capability built into it at the same time so that it isn't just a load of meaningless junk.
There are alternative meanings of the word "art" which are not art by its main meaning. The skill or craft of programming can be referred to as an art, but it is not art. There is also a thing known as "found art" which is also not art, but it's where something like a shopping list happens by accident to sound like a poem, so exactly the same thing could happen with a computer program (though I doubt that would be possible with any of mine).
Re: Is code art?
Posted: Fri Dec 14, 2012 1:53 pm
by OSwhatever
I think coding is more similar to carpentry rather than art. Coding is a job that requires carefully hand made creations which is similar to doing woodwork.
Re: Is code art?
Posted: Fri Dec 14, 2012 4:02 pm
by Combuster
And since woodwork can be art, why not code? There isn't even an apparent need to shed all practicality in either case.
As far as I'm concerned, anything can be art if someone wishes to call it that way. The word of itself is just too poorly defined to have much of a discussion about it that doesn't revolve around opinions.
Things like the nyancat bootloader is IMO a good example of code qualifying as art, as well as those gizmo's like
the train from IOCCC
Re: Is code art?
Posted: Fri Dec 14, 2012 4:51 pm
by gerryg400
Re: Is code art?
Posted: Fri Dec 14, 2012 5:13 pm
by Combuster
gerryg400 wrote:Perhaps like
this ?
While genuinely original, it's still vandalism
Re: Is code art?
Posted: Fri Dec 14, 2012 5:45 pm
by turdus
It can be also pushed to the extremes, take a look at
The International Obfuscated C Code Contest. You'll find ascii art codes there (that is, by definition art):
Code: Select all
Int L[A],m,b,*D=A,
*c,*a=L,C,*U=L,u;s
(_){u--&&s(a=*a);}
char*B,I,O;S(){b=b
--?b:m|read(0,&I,1
)-1;return~I>>b&1;
}k(l,u){for(;l<=u;
U-L<A?*U++=46^l++[
"-,&,,/.--/,:-,'/"
".-,-,,/.-,*,//..,"
]:exit(5));}p(Int*m){
return!*U?*m=S()?U++,!S
()?m[1]=p(++U),2:3:1,p(U)
:S()?U+=2:p(U[1]++),U-m;}x(
c){k(7*!b,9);*U++=b&&S();c&&x
(b);}d(Int*l){--l[1]||d(l[d(*l),
*l=B,B=l,2]);}main(e){for(k(10,33
),a[4]-=m=e-2&7,a[23]=p(U),b=0;;e-2
?e?e-3?s(D=a),C=a [3],++1[a=a[2]],d(
D):c?D=c,c=*D,*D= a,a=D:exit(L[C+1])
:C--<23?C=u+m&1?O =O+O|C&1,9:write(m
||(O=C+28),&O,1)+ 1:(S(),x(0<b++?k(0,
6),U[-5]=96:0)):( D=B?B:calloc(4,X))
?B=*D,*D=c,c=D,D[ 2]=a,a[++D[1]]++,D
[3]=++C+u:exit(6) )e=L[C++],u=L[C];}
Some entries of the contest are really ugly though (made for stressing the compiler or printing their own source code), like this one:
Code: Select all
int _;main(O,l,o)char**l,**o;{_++>>9||main(1&(o?(int)o:O)|O*2,l,putchar(_%32?atoi(1[l])>>(7&O<<!o>>!o+29)&32<_|_==16?35:32:10)%10);}
These are definitely not art just pure science on the other hand.
But, to my point of view, coding needs creativity and you create something for audience. You work with a tool, and you have work within the capabilities of your tool. How does it differ for example to painting by oil? Or hammering a rock to make a statue? You'll also have feedback from your users just like a writer gets reader's letters after a book.
I see no major difference.
Re: Is code art?
Posted: Sat Dec 15, 2012 1:56 pm
by OSwhatever
Combuster wrote:And since woodwork can be art, why not code?
Because the purpose of code is not art. It can be a part of program that is considered art but I wouldn't consider the code itself being art.
Martial arts, is that art because it has the art word in it? It's a skill. "The art of programming", is not really art, its also a skill.
Re: Is code art?
Posted: Sat Dec 15, 2012 2:03 pm
by Griwes
Martial arts *are* art. Their spirit is not "follow my every move exactly"; it's "experiment, do things your way and create own things", which qualifies martial arts as art (which is very similar in programming, hence - programming is an art). IMHO. Also, to truely learn martial arts, you *have* to take it as an art.
Of course, martial arts involve and require skill, but so does painting, writing or playing on an instrument (said someone who practices both traditional Japanese martial arts and guitar).
Re: Is code art?
Posted: Mon Dec 17, 2012 8:55 am
by mansi21
It can be regarded as art as you said that each programmer has styling codes and comments but art is usually related to aesthetics!!
It is the skill and creation of aesthetic objects so in that sense code cannot be considered as art!