Note the carefully engineered punctuation in the title. The quotes indicate that the assertion therein contained is not mine; the question mark is there to indicate that I'm not sure I agree.
Though the quoted assertion may suggest it comes from some Association of Cosmeticians, I got it from the cover of the festschrift in honour of Edsger W. Dijkstra, the programming guru who died in 2002.
Dijkstra believed that
In his writings and in his lectures, Dijkstra held up mathematics as a prime example of the kind of beauty that he strived for in his own programming and that he found lacking in the work of those who program for pay.
There is no evidence that Dijkstra differed from the majority of the educated public in having the opinion that music, painting, sculpture, poetry, architecture, landscapes, faces, ... can each be beautiful in their own way, and that mathematics belongs in such an enumeration. By writing EWD 538 "A Collection of Beautiful Proofs" he went further than just having such an opinion. Let us compare Dijkstra's note with "The Phenomenology of Mathematical Beauty", an essay in "Indiscrete Thoughts" by G-C. Rota (Birkhaeuser, 1996), who was a mathematician. The essay is relevant here, if only because it contains the statement:
Attempts have been made to string together beautiful mathematical results and to present them in books bearing such attractive titles as 'The One Hundred Most Beautiful Theorems of Mathematics'. Such anthologies are seldom found on a mathematician's bookshelf.As Rota explains, mathematicians are concerned with settling open problems (finding a proof of, or a counterexample to, a conjecture) or with creating abstractions that clean up existing mathematics. The one is concerned with truth, the other with conceptual structure. Neither is concerned with beauty. The credit goes to the author of the first proof of an important conjecture, and, as Rota notes, this proof is usually ugly. A new conceptual structure, like the group or the category, is valued because it connects a large number of previously disparate mathematical facts. That it may be experienced as beautiful is coincidental.
Of course the ugly proof is often improved. Not to make it beautiful, but to make it accessible to a wider audience of mathematicians. That it may also become beautiful is secondary. Rota dismisses "beauty", as used in mathematics, as a "bounty word". Bounty words have in common that they denote qualities that are elusive in the sense that they are valued, yet are not goals that can be directly pursued. In so far as bounty qualities arise, it is as a side-effect of something else. Another example of a bounty word is "creativity"; "happiness" falls in this category as well.
Rota's remarks suggests a closer look at what constitutes beauty. How is it that something like an airplane or a pistol can be experienced as beautiful? It seems that in these cases there are severe technological constraints combined with the fact that the marketing department has no input.
What makes something Art? One might be tempted to answer "Beauty". But try that next time you talk to a painter whose work you admire. A sure way to make her cringe with embarrassment is to say: "I find your paintings so beautiful." She is after something else; beauty is a side effect.
How does this translate to programming? Part of programming is to construct applications, using existing programming languages. This is like a mathematician trying to prove a conjecture; the conjecture in this case being that the application is possible. The program is an existence proof. In mathematics, what matters is whether the proof works, not whether it is beautiful. In soccer, it matters whether I scored the goal; that I fell on my backside while doing it is irrelevant.
The ugly first proof in mathematics was at least intelligible to a small group of insiders, otherwise we would never have heard of it. The ugly first program is likely to be intelligible only to its author. We hear of it because it works. But the program "works" in a way that is different from the way in which a proof "works". The proof works as long as the paper on which it is written exists and as long as there are people around to understand it. The program only works if there is a suitable hardware and software infrastructure. Any day these may change so that the program no longer works. That means that the program has to be "maintained". It may well happen that the first version of a program is too difficult to maintain. This is the business case for rewriting it. It may become less ugly in the process.
Dijkstra tried to support his thesis that programs should be beautiful by appealing to mathematics. That this argument is based on a mistaken view of mathematics does not prove that his thesis is false.
So, let us again consider the question: "Should we allow ugly programs?" The reason Dijkstra considered this question was that programming is in trouble, in ways that he eloquently described. The trouble manifests itself in too many degrees of freedom, thoughtlessly exercised. Too many degrees of freedom allowed by overly complex programming languages. Too many degrees of freedom allowed by the design methods, or, perhaps lack of these. Requiring that designs and their implementations be beautiful is one way, admittedly vague, and subject to heated argument, of coping with such a complex environment.
Perhaps beauty is a programmer's business after all.