You On AI Field Guide · Dijkstrian Elegance The You On AI Field Guide Home
Txt Low Med High
CONCEPT

Dijkstrian Elegance

Not an aesthetic preference but an <em>epistemic property</em>: a solution is elegant when its correctness is <em>visible</em>. Elegance is the precondition of trust.
Dijkstra used the word elegance in a sense most readers misheard as aesthetic. He meant something far more severe. An elegant program is one you can look at and see why it works. An inelegant program is one that works but conceals its own logic. The first is correct for reasons that can be stated; the second is correct by accident — it works because its bugs happen not to be triggered by the inputs it has received. Elegance is therefore not a matter of taste but of epistemic status: the elegant solution is trustworthy because its correctness is demonstrable at a glance; the inelegant solution is a bet. Dijkstra's lifelong insistence on elegance was engineering judgment, not aesthetic preference. He believed — and the failure histories of complex systems have borne him out — that the only reliable code is code simple enough to be understood, and the only way to achieve such simplicity is to demand it, relentlessly, against the constant pressure of a culture that rewards output over clarity.

In The You On AI Field Guide

The key formulation is characteristically compressed: "Simplicity is a great virtue but it requires hard work to achieve it and education to appreciate it. And to make matters worse: complexity sells better." The observation cuts in two directions. Simplicity is difficult because it requires the programmer to understand the problem deeply enough to find its essential structure — to strip away everything that is not necessary and keep only what is. And the market does not reward this difficulty, because the market cannot distinguish between a simple solution that is correct by construction and a complex solution that appears to work. The complex solution may look more impressive, because complexity is often confused with sophistication.

AI-generated code elevates this confusion to a structural principle. Large language models are trained on vast corpora of existing code, and existing code is overwhelmingly complex — not because the problems are inherently complex but because most programmers, working under time pressure without the discipline Dijkstra advocated, produced solutions that were adequate rather than elegant. The training data encodes the profession's median practice, not its best. When an AI generates code, it generates code that resembles the code it was trained on — competent, conventional, almost never elegant. This is not a failure of the AI. It is a faithful reflection of the data.

The consequence is a subtle but pervasive degradation of the standard against which code is judged. When the AI generates a function that is correct but complex, the builder has two options: accept it because it works, or reject it and ask for something simpler — which requires her to know what simpler would look like, which requires understanding the problem at a level the AI was supposed to make unnecessary. The structural incentive points overwhelmingly toward acceptance. The code works. The deadline is real. The effort required to demand and evaluate a simpler solution produces no visible output.

The result is the progressive erosion of elegance as a standard. The smooth aesthetic that Byung-Chul Han diagnoses in contemporary culture is the same aesthetic AI-generated code embodies: smooth on the surface, opaque beneath. Code that reads well, that follows conventions, that passes linting — and that conceals, within its conventional surface, a logic no one has examined for correctness. The smoothness is not evidence of quality. It is the mechanism by which the absence of quality is concealed.

Origin

The relevant Dijkstra essay is "On the Role of Scientific Thought" (EWD447, 1974) and the various manuscripts collected in Selected Writings on Computing. The aphorism about complexity selling better appears in several EWDs from the 1970s and 1980s and reflects a concern that deepened throughout his career as the profession grew and the incentives for careful work weakened.

The argument has a surprising convergence with Dieter Rams's Weniger, aber besser in design and Christopher Alexander's quality without a name in architecture — three thinkers in three domains converging on the claim that restraint is not a limitation but the precondition of reliability.

Key Ideas

Elegance is visibility of correctness. The elegant program makes its own reasoning inspectable; the inelegant one hides its logic behind conventional surfaces.

Correct by construction vs. correct by coincidence. Dijkstra's two categories correspond to programs whose correctness was derived and programs whose correctness is a fortunate property of the inputs they happened to receive.

Complexity sells. The market cannot distinguish correct-by-construction from appears-to-work, so the market rewards output volume over understanding.

AI outputs median practice. Language models trained on the corpus of existing code reproduce the profession's habits, including the habits Dijkstra spent a career arguing against.

Regeneration compounds. Each AI-generated fix adds complexity without adding understanding. The system grows more complex with each iteration, and the complexity is of the worst kind: generated rather than designed, with no architect who can simplify it.

Explore more
Browse the full You On AI Field Guide — over 8,500 entries
← Home 0%
CONCEPT Book →