Linked by Thom Holwerda on Sun 28th Jul 2013 14:06 UTC
General Development "There is a reason I use 'old' languages like J or Lush. It's not a retro affectation; I save that for my suits. These languages are designed better than modern ones. There is some survivor bias here; nobody slings PL/1 or Cobol willingly, but modern language and package designers don't seem to learn much from the masters. Modern code monkeys don't even recognize mastery; mastery is measured in dollars or number of users, which is a poor substitute for distinguishing between what is good and what is dumb. Lady Gaga made more money than Beethoven, but, like, so what?" This isn't just a thing among programmers. The entire industry is obsessed with user numbers, number of applications, and other crap that is meaningless when you consider programming to be art. When I post a new item about some small hobby operating system, the comments will be filled with negativity because it's no Windows or iOS, whereas only ten years ago, we'd have lively discussions about the implementation details. And then people wonder why that scene has died out.
Thread beginning with comment 568180
To read all comments associated with this story, please click here.
Art or engineering?
by dpJudas on Sun 28th Jul 2013 15:58 UTC
dpJudas
Member since:
2009-12-10

I absolutely love to code, it is my favorite hobby, but I am not really sure it qualifies as art. In my view it is more like math or chess, where certain solutions can be beautiful or brilliantly designed or executed. The heart of coding is more logic than creativity.

As for why small hobby project postings are filled with negativity, I think it has partly to do with developers (and users) investing greatly in whatever tools they learn, and therefore they have a huge interest in what becomes the winning horse. If a hobby project attempts something that differs from their horse, some react by attacking the project.

Another reason is probably that most basic OS stuff has matured to the level where there is now a standard solution proved by the test of time. This means that whenever someone tries something different, you will have hordes pointing out all the features missing.

Reply Score: 3

RE: Art or engineering?
by galvanash on Sun 28th Jul 2013 21:54 in reply to "Art or engineering?"
galvanash Member since:
2006-01-25

I absolutely love to code, it is my favorite hobby, but I am not really sure it qualifies as art. In my view it is more like math or chess, where certain solutions can be beautiful or brilliantly designed or executed. The heart of coding is more logic than creativity.


I disagree. Its exactly like any other form of language.

There is writing like textbooks, documentation, instruction manuals, etc. - things meant to convey information as clearly and economically as possible. These kinds of things are extremely important and there is skill to doing them well, but few would consider the results "art".

Then you have poetry and other forms of creative writing, where the point is not just to convey information, but to convey it in ways that elicit an emotional response in the reader. That response may be triggered by your choice and flow of words, it may be triggered by clever grammatical choices or other "tricks" of language, or it may be that you are just using arbitrarily imposed restrictions to challenge your creative skills (iambic pentameter, haiku, basic rhyming, etc.)

Programming has exactly the same form and function.

Some people approach it as a straight-forward instruction manual - write exactly what is needed to convey the proper information to make the machine do what is intended. This is more analogous to the "textbook" example above. People who approach it like this consider the machine to be the intended audience - they want it to be readable by humans, but there is no effort put towards creative use of the language.

Others like to program creatively, they are not just trying to achieve a particular result, they are trying to do it in ways that fulfill their creative drive. They are writing for the humans reading their code, and they want their code to elicit an emotional response.

The heart of coding depends on the writer's intent...

My favorite example of this is Duff's Device:

http://en.wikipedia.org/wiki/Duff's_device

This is a straightforward copy of items from an array to mmaped output register:

send(to, from, count)
register short *to, *from;
register count;
{
do
*to = *from++;
while(--count>0);
}


This is art:

send(to, from, count)
register short *to, *from;
register count;
{
register n = (count + 7) / 8;
switch(count % 8) {
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
} while(--n > 0);
}
}


Edited 2013-07-28 22:08 UTC

Reply Parent Score: 2

RE[2]: Art or engineering?
by Vanders on Sun 28th Jul 2013 23:45 in reply to "RE: Art or engineering?"
Vanders Member since:
2005-07-06

That's the most useless use of Duff's devices I've ever seen. It's performing a word-by-word copy but has additional addition, a whole bunch of extra comparisons and is vastly less readable. What precisely is that supposed to gain over the "naïve" implementation, precisely?

Reply Parent Score: 3

RE[2]: Art or engineering?
by dpJudas on Mon 29th Jul 2013 01:30 in reply to "RE: Art or engineering?"
dpJudas Member since:
2009-12-10

This is art:

"send(to, from, count)
register short *to, *from;
register count;
{
register n = (count + 7) / 8;
switch(count % 8) {
case 0: do { *to = *from++;
case 7: *to = *from++;
case 6: *to = *from++;
case 5: *to = *from++;
case 4: *to = *from++;
case 3: *to = *from++;
case 2: *to = *from++;
case 1: *to = *from++;
} while(--n > 0);
}
}
"
I would rather call it a technique. And strictly speaking a convoluted and somewhat dangerous technique. It trades off readability for speed, assuming a certain type of CPU architecture and compiler.

The code might actually run slower on many newer architectures and compilers where the compiler might have vectorization passes which converts it into SIMD instructions. The cleverness of the code may confuse such a pass, thus using a much slower technique than what is otherwise possible. It also assumes that simply calling memcpy(to,from,count) isn't mapped directly to a compiler intrinsic, as it is on many modern compilers.

That doesn't mean it wasn't clever, back when this approach would be a good idea, but you always have to trade off cleverness/optimizations against readability for other developers and compiler passes.

To me, the main difference between art and craftsmanship/engineering is that in art you might write the above purely for the beauty of the code itself, while craftsmanship there's usually always one technique that is the better choice for a particular problem. In most cases that means that the common well understood solution is usually better (in the example to call memcpy), unless there's something special about this spot in the program that justifies deviating from the standard practice.

Of course, part of the fun for me on a hobby basis is to try deviate and see where it gets me. ;)

Reply Parent Score: 4

RE: Art or engineering?
by aargh on Mon 29th Jul 2013 07:54 in reply to "Art or engineering?"
aargh Member since:
2009-10-12

The difference between a dayjob programmer and artist programmer is akin to that of a stonemason and a sculptor. I.e. it's not the job description or tools, but quantity vs. quality, attention to detail and creativity.

Reply Parent Score: 2

RE[2]: Art or engineering?
by lucas_maximus on Mon 29th Jul 2013 12:00 in reply to "RE: Art or engineering?"
lucas_maximus Member since:
2009-08-18

Another ridiculous assertion.

As developer your job is to satisfy the requirements, that is it. Nothing more and nothing less.

Obviously during development there is times where you find out something should work differently or something wasn't considered ... but they should have been requirements also.

It kinda like making a chair. Yeah you could make a throne, but was it really specified anywhere that you should be making one when in reality it going to be sat in a school cafeteria.

The reality is that you have to choose 2 of the following good, fast or cheap.

Edited 2013-07-29 12:02 UTC

Reply Parent Score: 3

RE: Art or engineering?
by l3v1 on Mon 29th Jul 2013 10:21 in reply to "Art or engineering?"
l3v1 Member since:
2005-07-06

but I am not really sure it qualifies as art


You have to think about it as real life storytelling. Everyone can read or tell a story, but not everyone can tell it in a way to make other awe. For a given coding problem you can create a lot of solutions, but sometimes you stumble upon one or two which you look at and you feel it's "nice". That's when coding becomes art. Something which produces the same results but does it in a "masterful" way, like the difference between an ikea kitchen stool and a craftsman-style armchair.

Reply Parent Score: 4

RE[2]: Art or engineering?
by lucas_maximus on Mon 29th Jul 2013 12:01 in reply to "RE: Art or engineering?"
lucas_maximus Member since:
2009-08-18

But most people aren't willing to pay more for the hand-crafted one because they simply want to park their bum while they eat breakfast.

Reply Parent Score: 3