Live data from Hacker News

Knuth: Computer Programming as an Art (1974)

paulgraham.com

81–90 of 110 posts

Re: Knuth: Computer Programming as an Art (1974)

#81

Earlier quoted context omitted.

What part of computer science is experimentation?

I am tempted to write: "what part isn't?" Seriously, just about everything we do in computer science is experimentation, at least if it involves... physical computers . Every time we run a program, we run an experiment. At least if we have some expectation of what we want the program to do. Every time we write a test, or run a test suite, we are running an experiment. Every time we implement some sort of abstraction,…

> at least if it involves...physical computers.

Yeah you "explore stuff" in any field. Science, art, math, every day life, when learning a craft (welding etc). Just because you explore doesn't mean that is what the core of what computer science is.

> Every time we implement some sort of abstraction, every time we vary a parameter, every time we optimize a program, we are running experiments.

Ok, what in life then isn't science because well everything is running experiments? I am going to buy milk -- it's an experiment to see what happens. Maybe I won't find parking. I am drinking coffee in the morning, it's an experiment to see if it will still keep me awake.

By that token we've diluted the word science to not really mean anything anymore.

Re: Knuth: Computer Programming as an Art (1974)

#82

Art can occur when the same person is both the source of the requirements for the program, and the implementor of the program. Much of the art is in the coming up with the specification: that is the concept in the art. The concept can be skillfully rendered into code. Concept + skillful rendering = art.

What about algorithm problems for with the most efficient Big-O solution is known? How can you "skillfully" render code when there is only one best possible way to do it? I would argue that in those cases, programming is not an art because the arriving at the solution is very mechanical and there is literally zero room for creativity. Thus imo this answer isn't broad enough to fully define "Art"

My comment doesn't assert that programming is always art.

Slathering paint onto a surface isn't always art.

Big Oh has to do with large N.

"If a program manipulates a large amount of data, it does so in a small number of ways." --- Epigram 5, Alan Perlis

"For every polynomial-time algorithm you have, there is an exponential algorithm that I would rather run." -- Alan Perlis

"Don't do things that scale" -- P. Graham

Re: Knuth: Computer Programming as an Art (1974)

#83

Earlier quoted context omitted.

> There's nothing to study via experimentation There isn't??

What part of computer science is experimentation?

This is stretching it, but if you accept automata theory as a part of CS (not very controversial) and accept cellular automata like the game of life as a branch of automata theory (not very controversial) and accept some research methods involving experimentation and observation of the behavior of random seeds as part of cellular automata theory (not very controversial) then the very extended argument stretches from hard core CS to 'stick a random seed in the CA, run it, and ta da, we observe the un predicted existence of gliders!'. Its stretching it but I think its acceptable.

I was going to list some formal percolation theory studies in as an applied version of imaginary network routing protocols or could be seen as a very weird emulation of a CA, kinda, but that's probably going way too far. Practical simulation of a specific algo is obviously cheating, but simulation of an abstract concept is maybe not cheaty. Possibly there is, or will be, an analytic topological pure math theory that could be applied to mathematically prove constants currently only discovered by experiment in perc theory. If you're ever bored and want to run some simulations, perc theory is very project euler like in that a short(ish) question quickly results in "I guess I gotta run it and see".

Another "stretch the limits" is there is no unclassified explanation of some peculiar corners of some crypto algos. Hard to know if they're truly random, determined by experimental runs against possibly classified cracking techniques, or intentional back doors, or intentional classified design techniques. But relying on military intel classification "we can't rule out experimental methods being used in secret" is kinda cheaty in the spirit of the discussion.

Re: Knuth: Computer Programming as an Art (1974)

#84

Earlier quoted context omitted.

I agree, craft is much more appropriate. I think this is a confusing essay, because in everyday speech "art" is employed to mean something very different from "an art" and we get lost in semantics. The continued references to obsolete definitions confuse things further. In practice, the phrase "an art" is usually used in the same way as "an artform", as it is not meant to be taken literally; a commentator may say "th…

I agree, but I'll go further than you - I don't think this essay is confusing at all. It's simply nonsense - the kind of thing someone clever writes when they're discussing a subject completely outside their area of competence. CS can be a craft. It's not one of the arts, not even if it's beautifully put together, because the arts are not primarily about technique - they're about capturing and distilling human experi…

"more or less what art meant"

To which I reply: Did you actually read the essay? Since you started the ad hominem argument, I feel free to continue in that vein.

What is interesting is that most "programming" is exactly "capturing and distilling human experiences using allusions and associations to (re)create those experiences". What else is coding a front-end to an application that saves time and/or labour, and/or makes possible things that were, before the program, impossible? An Art, a Craft or a Science? From your very definition, "Art" would be the answer.

And yet, you begin your criticism with "It's simply nonsense"

Re: Knuth: Computer Programming as an Art (1974)

#85
post #33

Earlier quoted context omitted.

What about algorithm problems for with the most efficient Big-O solution is known? How can you "skillfully" render code when there is only one best possible way to do it? I would argue that in those cases, programming is not an art because the arriving at the solution is very mechanical and there is literally zero room for creativity. Thus imo this answer isn't broad enough to fully define "Art"

Change the constant. Change the x that the big O is about, for example by using vector instructions. Implement a theoretically less efficient algorithm that is faster (examples: switch to a O(n^2) sort for small data set, or to a linear search for smallish arrays)

Use data with a smaller size N, and do something more interesting with it.

Re: Knuth: Computer Programming as an Art (1974)

#86
post #33

Earlier quoted context omitted.

What about algorithm problems for with the most efficient Big-O solution is known? How can you "skillfully" render code when there is only one best possible way to do it? I would argue that in those cases, programming is not an art because the arriving at the solution is very mechanical and there is literally zero room for creativity. Thus imo this answer isn't broad enough to fully define "Art"

Change the constant. Change the x that the big O is about, for example by using vector instructions. Implement a theoretically less efficient algorithm that is faster (examples: switch to a O(n^2) sort for small data set, or to a linear search for smallish arrays)

would the procedures you describe be classified as an artistic endeavor?

Re: Knuth: Computer Programming as an Art (1974)

#87

Earlier quoted context omitted.

What about algorithm problems for with the most efficient Big-O solution is known? How can you "skillfully" render code when there is only one best possible way to do it? I would argue that in those cases, programming is not an art because the arriving at the solution is very mechanical and there is literally zero room for creativity. Thus imo this answer isn't broad enough to fully define "Art"

My comment doesn't assert that programming is always art. Slathering paint onto a surface isn't always art. Big Oh has to do with large N. "If a program manipulates a large amount of data, it does so in a small number of ways." --- Epigram 5, Alan Perlis "For every polynomial-time algorithm you have, there is an exponential algorithm that I would rather run." -- Alan Perlis "Don't do things that scale" -- P. Graham

True. My mistake. I was mostly referring to this statement:

>Concept + skillful rendering = art

This statement does not fully cover the definition of art.

Re: Knuth: Computer Programming as an Art (1974)

#88

Love this part, "In fact, when I first picked up a dictionary in order to study the words "art" and "science," I happened to glance at the editor's preface, which began by saying, "The making of a dictionary is both a science and an art.""

Also

  "The science without the art is likely to be ineffective; 
  the art without the science is certain to be inaccurate."

Re: Knuth: Computer Programming as an Art (1974)

#89
Why is it that "it's more art than science" gets so much use, whereas "it's more science than art" is never used? We use the former to explain why a given process is not deterministic -- for example, appraising artwork, drafting a business plan. Why is it never necessary to explain that a process is deterministic?

Re: Knuth: Computer Programming as an Art (1974)

#90

"According to most dictionaries "science" means knowledge that has been logically arranged and systematized in the form of general "laws."" Ahh yes, the logical arrangement. Programming Law #1: Thou shalt tab to indent. Programming Law #2: Nested loops shall indent deeper to the right. How about the six laws of depth in art? 1. Perspective - 2-point, 3-point... 2. Lower on canvas is closer, higher is further away 3.…

> You have to find the artists' artist and mix her color 5000 times, like roll-on-your-head Shaolin Temple skull-hardening. Return to the 36th Chamber and draw with charcoal attached to the end of a long stick of bamboo, then ring the bell, for another style has died. Or, you know, go to art school.

Why the downvote aggro for a tounge-in-cheek quip?
Post reply on HN