# Code-Driven Illustrations Make Their Assumptions Visible

> Generated pictures can make an idea vivid, but diagrams built from code can also expose the rules that make the idea true.

- **Author:** Gökçe Akçıl (https://softwaredeveloper.biz/author/gokce-akcil)
- **Topic:** philosophy-computation
- **Published:** 2026-12-02T11:39:28+00:00
- **Canonical URL:** https://softwaredeveloper.biz/p/code-driven-illustrations-make-their-assumptions-visible

## Key Thesis

Image models are strong at visual invention, while code-driven illustrations are often better when a picture must preserve relationships, labels, and constraints. Choose the representation by what readers need to infer, then test it like any other software artifact.

---

A picture can persuade before its viewer has decided what it means. That is useful when the goal is atmosphere, but dangerous when a diagram is meant to explain a system. A polished image can conceal whether its arrows, labels, and proportions express anything consistently.

That tension surfaced in the Hacker News discussion around Simon Willison’s [essay on code-driven AI illustrations](https://simonwillison.net/2026/Nov/28/code-driven-ai-illustrations/). The question is not whether an image model can make an attractive picture. It is what kind of picture becomes more useful when generated by code, and what “useful” means when people rely on an image to think.

A model-generated image is not automatically shallow, nor is a coded illustration automatically true. The distinction is that code can make some of an image’s rules explicit. That changes not just how the illustration is made, but what a reader can reasonably know from looking at it.

## A picture is also an argument

In philosophy, a representation is not merely a copy of its subject. It selects features, suppresses others, and proposes a way of seeing. A circuit diagram, for example, does not resemble a circuit board in the way a photograph does. Its symbols and connections make a claim about how the components relate.

An image model can learn rich visual regularities through training and produce outputs that feel coherent. In a diffusion system, a prompt conditions a generation process that progressively denoises a latent representation. That can produce compelling texture and composition, but the process does not guarantee that two objects have the requested spatial relationship, or that a small label will remain legible.

Code-based illustration offers a different contract. A program can specify that one node sits above another, that a line connects two named components, and that labels are text rather than visual approximations. The output may look plain, but its structure can carry semantics a reviewer can inspect.

<svg class="acad-diagram" viewBox="0 0 680 180" xmlns="http://www.w3.org/2000/svg">
<rect x="18" y="52" width="172" height="72" stroke="currentColor" fill="none"></rect>
<text x="35" y="82" stroke="currentColor" fill="currentColor" font-family="monospace" font-size="12">Intent and constraints</text>
<text x="35" y="103" stroke="currentColor" fill="currentColor" font-family="monospace" font-size="12">human specification</text>
<line x1="190" y1="88" x2="250" y2="88" stroke="currentColor"></line>
<path d="M242 81 L250 88 L242 95" stroke="currentColor" fill="none"></path>
<rect x="250" y="52" width="172" height="72" stroke="currentColor" fill="none"></rect>
<text x="267" y="82" stroke="currentColor" fill="currentColor" font-family="monospace" font-size="12">Code representation</text>
<text x="267" y="103" stroke="currentColor" fill="currentColor" font-family="monospace" font-size="12">explicit relations</text>
<line x1="422" y1="88" x2="482" y2="88" stroke="currentColor"></line>
<path d="M474 81 L482 88 L474 95" stroke="currentColor" fill="none"></path>
<rect x="482" y="52" width="180" height="72" stroke="currentColor" fill="none"></rect>
<text x="499" y="82" stroke="currentColor" fill="currentColor" font-family="monospace" font-size="12">Rendered illustration</text>
<text x="499" y="103" stroke="currentColor" fill="currentColor" font-family="monospace" font-size="12">reviewable artifact</text>
</svg>

The diagram’s simplicity is the point: an explicit representation lets us ask where meaning entered the process. The code can be wrong, of course. But its claims are available for inspection, rather than embedded only in a convincing surface.

## The medium changes what can be known

We can compare the two approaches using a rough ordinal rubric. These scores are not benchmark results. They describe common tendencies when the task requires a diagram with specified relationships. A different task, such as making a mood board or exploring visual directions, changes the weighting.

| Dimension | Image model output | Code-driven illustration | What the reader gains |
|---|---:|---:|---|
| Geometric consistency | 2/5 | 5/5 | Stable positions and connections |
| Label fidelity | 2/5 | 5/5 | Text that can be checked and revised |
| Visual variation | 5/5 | 3/5 | More exploratory surface treatments |
| Editability | 2/5 | 5/5 | Local changes without regenerating all details |
| Auditability | 2/5 | 4/5 | A path from specifications to rendered form |

The ratings expose a useful distinction between visual quality and epistemic quality. If the image’s purpose is to evoke a feeling, variation may matter most. If a team is reviewing a data pipeline, a wrong arrow can be more costly than a dull palette.

Code is not a truth machine. A script can faithfully render an incorrect assumption, and generated code can contain layout bugs or omit a requested relation. The advantage is narrower: constraints can be represented, tested, versioned, and revised in familiar engineering workflows.

In production, the useful image is often the one whose generating logic can be inspected, versioned, and integrated into the system around it.

## From illustration to working artifact

This matters because technical diagrams are not decoration around software. They shape shared understanding of dependencies, ownership, and failure. When a diagram is generated from the same source as a system specification, teams can reduce the gap between what they believe they operate and what their documentation says.

The investment case is practical, not aesthetic. A team should compare the cost of building and maintaining a diagram pipeline with the expected cost of misunderstanding, rework, and stale documentation. For a one-off concept image, that machinery may be waste. For a diagram embedded in an operational review, a reliable renderer and a clear validation step can repay their cost.

A sensible workflow separates invention from commitment. Use an image model to explore visual possibilities when composition is open-ended. Move to code when geometry, text, or repeatability becomes part of the requirement. Then review both the source and the rendered result, since formal correctness in code does not ensure legibility to a human.

## Craft is knowing what to constrain

This is also a question about the limits of machine intelligence. A model can produce an illustration that appears intentional without possessing the human purpose a viewer attributes to it. Code does not solve that philosophical gap. It makes certain intentions legible as rules, where people can challenge them.

That distinction resembles the difference between knowing how something looks and knowing how it works. An image can offer a powerful perceptual guess. A program can expose a chain of choices. Neither replaces judgment, because someone must decide which properties matter and whether the representation serves its audience.

The craft, then, is not to make every image executable. It is to choose a medium whose failure modes match the task. When a picture needs to invite imagination, loosen the constraints. When it needs to support a decision, make its assumptions inspectable. The best illustration is not the one that looks most intelligent, but the one that lets its reader reason with less confusion.

## References

- [Hacker News: Code-driven AI illustrations are more useful than images from image models](https://simonwillison.net/2026/Nov/28/code-driven-ai-illustrations/)
- [Gökçe Akçıl (gokce.ai)](https://gokce.ai)

---

## Discussion (2 notes)

- **Priya Nair** (PhD Candidate, Comp. Neuro & ML · Cambridge, MA · 2026-12-02): The production edge case is a diagram generated from a changing schema: code can preserve the connections while long labels, localization, or a new node count make the layout unreadable at mobile widths. That is not a rare cosmetic failure if the illustration ships in documentation across releases. I’d want a comparison of maintenance cost for one-off editorial art versus repeated diagrams, plus tests for semantic invariants and rendered legibility across realistic inputs. Explicit rules help only if the layout remains usable when inputs drift.
  - **Marcus Chen** (Staff Storage & Kernel Engineer · Seattle, WA · 2026-12-02): Your edge case is correct: code can guarantee adjacency while failing layout. Mobile widths expose missing constraints. The maintenance question is about layout robustness, not just semantic invariants. Did you test with realistic label length distributions and viewport breakpoints?
