Elegance is a fundamental concept that is deeply embedded in our lives and work. Is there a universal definition of elegance?
In software, as in other domains, the word elegant is imbued with power. I’ve marveled at how elegance manifests in many forms and have always sought elegance in my work. But to appreciate elegance, one has to keep an open mind about whether it’s always worth attaining.
Are elegant solutions more understandable and maintainable? Are elegant words clearer and more powerful? Are elegant designs easier to use? Is elegant software architecture easier to implement? In fact, there is a difference between practicality, simplicity, usability, and elegance, and the desirability of each attribute does vary.
Let’s go looking for it. There is particularly pure elegance in math. Euler’s identity is a poster child, conveying so much, yet in such a compact form:
Poetry also is an exercise in textual elegance, as in this stanza from e.e. cumming’s anyone lived in a pretty how town:
Code mixes the textual and logical, and so elegance in text or logic carries through to elegance in code. The following images show two programs in Haskell. Both do the same thing: printing the words to the “99 Bottles of Beer On the Wall” song. But which is more elegant? This one:
or this one?
At this point, one definition for elegance could be the least possible solution. I prefer reduction by iteration in recognition that the act of achieving elegance is indistinguishable from the result. Another definition I’ve thought up is the lowest entropy solution at a given level of information, connecting elegance with information theory. In graphical terms, the most elegant outcomes in a given solution space would lie at the low points of a featured plane upon which the information level is constant.
The lowest entropy solution at a given level of information.
One might mistake elegance for simplicity, but elegance is really about order. Remember that elegance is about how information is ordered and so, with increasing amounts of information, something elegant isn’t necessarily ‘simple’. That is why I chose a Mandelbrot set as the header image. This fractal image has immense and complex information content but is ordered at every level with a repeating pattern, and is thus incredibly elegant.
Order, disorder, and complexity are within the realm of chaos theory, which asserts that whereas chaotic complex systems have underlying ordered patterns, disordered systems have none. To the uninitiated, the word “chaos” takes some getting used to but basically, the next state in a chaotic system is a function of the state just before. In a truly disordered system there’s no predicting what the last state was.
Hidden order within even incredibly complex systems creates a fine-grained elegance. For example, the natural world carries almost limitless amounts of chaotically ordered information, and that is why our minds never tire of the elegance of nature.
We perceive man-made works as elegant to the extent they are ordered, given the information they need to carry. This idea goes back to a paper I read way back in 1999, The Visual Complexity of Pollock’s Dripped Fractals.
Pollack’s drip painting may be timeless because it approaches the chaotic content of nature. There also are some material human practices that incorporate nature to such an extent, they may never go out of style. The Japanese tea ceremony is beguilingly elegant because it perhaps intentionally incorporates naturally chaotic elements throughout: the froth of the tea, the grains of matcha, the lightly finished woods and bamboo, and the irregular shape of the stirrer.
Styles are bound into aesthetics, a significant point that we’ll return to below.
Above I showed how coding elegance derives from mathematical and textual elegance, and how complex systems like the Mandelbrot set are a bridge between mathematical and aesthetic elegance. What about the popular conception of elegance, for example, as embodied by Kate Middleton, Duchess of Cambridge? She is elegant in the popular sense of the word, but does she fit our definitions? If the Duchess dressed attractively but messily, she would not be elegant. Instead, she is regularly attractive and put together. Given the carefully ordered information she conveys, she is elegant.
Elegance extends into so many human activities beyond fashion. For example, Fred Astaire embodied elegance in his dancing. Astaire’s dancing fits very nicely into the idea of a complex, ordered system. We never know what he’s about to do, but we know how he got there, and he was graceful; that is, he had a reductive method that kept the mere essence of the wonderful information he wanted to convey.
Going a step further, some physical arts innately incorporate elegance. One of Judo’s two founding principles is seiryoku zen’yō which translates to “maximum effect, minimum effort”. See how the pendulum of Harai goshi efficiently relies on gravity instead of strength.
As with Judo, the human attraction to elegance is so strong that in some arts, their works are judged by its achievement.
In fact, my intellectual experience when arranging flowers feels remarkably similar to what I experience designing user interfaces. Why is that? Recall my definition of elegance as “the lowest entropy solution at a given level of information”. Consider the flower arrangement problem as a 3-dimensional network or ‘edge’:
Each dot represents a blossom or generally, information. Their optimal arrangement is lowest entropy according to some underlying formula that might include the length of each edge, the number of edges that don’t or do cross, the variation in length of edges, maybe the area contained between edges, and so on. Would there generally be more than one optimal solution to the formula, thus allowing for various artistic interpretations, none of which are necessarily better? Or might there be a single optimality, which would amount to a discovery that for any given bunch of flowers, there is only one ‘best’ arrangement? In pondering this, remember, as in the graph above, that the solution surface could lie in a plane with multiple minima — in this case, representing more than one best artistic solution.
Once we’ve figured out this formula, maybe we can apply ‘variants’ of it to designing other stuff, like user interfaces! There is a precedent of sorts for this, albeit in another domain. Pyotr Ufimtsev’s book “Method of Edge Waves In The Physical Theory of Diffraction” provided a formula for radar cross section, turning the art of stealth into a formal engineering practice. Perhaps a similar formula exists for calculating entropy in user interfaces, and thus providing the means to optimize their design.
There are practical considerations that limit the use of elegance. For example, an elegant solution in software may so economize on the information carried in its solution as to make it unmaintainable by others. Here’s another example of a seemingly inelegant design, done on purpose by people who know what they’re doing:
Major media portals like MSN and others prioritize usability over elegance. This isn’t always true; I sometimes think that Google’s designers are so infatuated with elegance that they lapse into information reduction just to be “more” elegant, because they sometimes tend to have less discoverable interfaces. For example, Google Docs often makes it impossible to find stuff I already know exists.
The pursuit of elegance thus sometimes confoundingly works against design goals. I once designed an interface around context, with the interface adapting to the state of the system, a variation on “graduated engagement”. Its elegant design kept the user ever close to their needs, and I was pleased with myself — maybe wrongly. In this case, information seemed to have been removed at no cost, but the interface violated expected patterns and may have decreased navigability. Be careful not to make elegance into a fetish.
The definition for elegance that I’ve been using has been, “the most ordered solution at a given level of information”. Now let’s consider when information can be varied, which widens the latitude for an elegant design: provide just enough information so that inferences can be made efficiently and to the necessary extent. In other words, first take care of usability; this and aesthetic considerations are the major considerations in Stuart Feldman’s 2014 dissertation, A methodology for measuring elegance in engineered artifacts. Feldman actually uses measures of order to gauge aesthetics.
This dance between usability (level of information) and aesthetics (order) is wonderfully explored in Tufte’s The Visual Display of Quantitative Information. Among Tufte’s fine examples are Charles Minard’s 1869 chart showing the number of men in Napoleon’s 1812 Russian campaign army, their movements, as well as the temperature they encountered on the return path.
A veritable battle between aesthetics and usability occurred in the evolution of the New York City Subway map. Here’s the map I first rode the NYC subways with, created by Goldstein, Vignelli, et. al. This map was simple to a fault. Note the word “fault”.
The NYC Subway map of the 70s clearly showed lines and connections but failed to convey the relative scale of the system and so inhibited riders’ trip planning and their awareness of where they actually were in the system. The late 70s update to the map introduced relative geographic accuracy.
The map with geographic information has evolved ever since, with increasing deference to actual geographic scale. Remember that this alternate definition of elegance involves both usability and aesthetics. I’d hazard that the Vignelli map was more elegant, but the map’s usability has since gone way up. Then again, tastes have changed since the 70s. Maybe the newer maps are just as aesthetically pleasing to their current audience — do you recall my mention of changing styles above? So long as we synthesize designs and objects, their elegance may vary over time, as our aesthetics continue to evolve.
In many pursuits, achieving elegance indicates not just understanding of a problem, but its mastery. The more elegant a physics theory, the more it explains of a phenomenon, which indicates that the theory is approaching the underlying model behind the phenomenon; quantum mechanics is regarded as the best so far. Programmers pursue elegance for the same reason. While an approximation to a problem will have to continually be revised to account for wherever it doesn’t fit, an elegant solution accounts for all scenarios because it is fully aligned with the problem. If truly elegant, it will never need updating, will not fail due to unforeseen features of the underlying model, and without needing to handle exceptions, it will be easier to understand. I once coded a complex system over several months. On the very last night, I finally achieved an elegant understanding of the model. I came back, threw out months of work, and recoded the entire system in one day.
This definition of elegance is from NASA’s Engineering Elegant Systems: The Practice of Systems Design. Its use of “richness” is to me synonymous with information content.
The idea that the proper goal of systems engineering is to produce an elegant design was first introduced in a speech by Robert Frosch. He noted that he often got no response when he asked systems analysts, “Is it an elegant solution to a real problem?” They did not understand the question. Elegance is something you know when you see it, but is not something easily defined, particularly in the sense of a system. Webster defines elegance as a “dignified richness and grace.” This articulates an attitude of intent and a social response to the system. This definition identifies key system attributes. ‘Dignified grace’ conveys a notable ease of use or operation in a variety of applications. ‘Dignified richness’ conveys a notable robustness in application, a full achievement of the system intent, and a satisfaction of intent not fully specified. A term that provides further help with this definition is concinnity. Webster defines concinnity as ‘a skillful arrangement of parts, harmony, and elegance’. This conveys the idea of a well-organized system with skillfully defined system interrelationships. System aesthetics are accounted for in the idea of richness, grace, and harmony. An efficiency in the system layout and construction is also seen in the ‘skillful arrangement of parts, harmony’ of the system. A well-structured system is an efficient system. Perhaps one can state a definition of system elegance as ‘a system that is robust in application, fully meeting specified and adumbrated intent, is well structured, and is graceful in operation.’
One notable academic work on elegance and its practical aspects is Elegance as Complexity Reduction in Systems Design. Similar thoughts came to me independently, which is yet another illustration of how common theories often emerge.
For a wonderful discussion abut the Vignelli subway map, see :
Read the full article here