I have a pet pieve. Actually, I have many, but only a few worth complaining about. One of these is when programmers describe their creations as “beautiful.” At first blush it might seem strange that people would describe computer code, filled with semi-colons, parentheses, and brackets as “beautiful.” One might be tempted to ask whether they were just in love with their syntax highlighters. However, I’ll be fair. The term “beautiful” in this sense refers not to visual aesthetics, but to a sort of notional aesthetic: ideas which seem so simple and elegent that they provide a certain sense of pleasure when one comes to understand them. When coders use beautiful as an adjective to describe their programs, they aren’t describing the visual asthetics of their computer code, they are discussing the presummed elegence of their solutions. They are declaiming the cleverness of their own inventions.
And at this point one should realize my first and more shallow objection: That praising your own work is just a little bit presumptuous. If someone were to approach you and inform you that the paintings of some unknown painter were beautiful you would likely take the person’s words as simple praise, but if the painter himself were to approach you and make the same claim you’d likely think that he was a little full of himself.
The problem here is that when a creator praises his own work it’s hard to distinquish between genuine enthusiasm for the work itself and simple egoism. Creators put a lot of effort into their creations and often have difficult and complex relationship with them, so it’s understandable that their ego would get wrapped up in their creations, but that still colors how one views a creator’s words. The fact is that, “beauty” is inherently subjective and when people make subjective judgements, who makes the judgement matters as much as or more than what that judgement is. So when a programmer calls his own code beautiful, it’s hard to take him seriously.
And that leads into my second and, in my opinion, more important objection: That placing emphasis on a purely subjective judgement distracts from more important measures of code. There is a place for self praise or bragging amongst programmers. In order for them to be useful, people do need to get the word out about their works. However praise should be useful.
Calling a program “fast” is useful. Speed may be relative, but it is something we can measure and it’s worth is understood. Likewise, terms like “correct,” “simple,” and “portable” are all also useful. Some may be more difficult to measure, but they all denote a clear quality of the code which is useful for judging it. “Beautiful” however, denotes nothing specific. It may denote the simplicity of a solution, or its cleverness. It may refer just how well suited a solution is to a specific problem, or how general it is. Really, it means whatever one wants it to mean because aesthetics are inherently subjective. It may be legitimate to call a piece of code beautiful, but it can be beautiful for a number of entirely different reasons, and unless you specify, it’s just not a very meaningful thing to say about a program. That’s all.