$ ./talk --lightning

The Lost Beauty
of Code

When code stops being written by humans,
does beauty still matter?

Alessandro RomanoLightning talk

Craft & Coding Agents

quicksort :: (Ord a) => [a] -> [a] quicksort [] = [] quicksort (x:xs) = quicksort [a | a <- xs, a <= x] ++ [x] ++ quicksort [a | a <- xs, a > x]

Where I come from

My generation learned problem solving through code

  • 01

    A blank screen

    Nothing autocompleted the idea. You had to invent the mechanism before you could type it.

  • 02

    A wrong answer

    The loop never terminated. Debugging was not a chore — it was the only way to read your own reasoning back.

  • 03

    The click

    The moment the algorithm ran in your head before it ran on the machine. That was the reward.

We didn't learn to code. We learned to solve problems — and code was just the notation.

Exhibit A · C

The first time I saw quicksort, I thought it was a composition

void quicksort(int a[], int lo, int hi) {    int i = lo, j = hi;    int pivot = a[(lo + hi) / 2];    while (i <= j) {        while (a[i] < pivot) i++;        while (a[j] > pivot) j--;        if (i <= j) { swap(&a[i], &a[j]); i++; j--; }    }    if (lo < j) quicksort(a, lo, j);    if (i < hi) quicksort(a, i, hi);}
  • Eleven lines. Nothing left to remove without breaking it.
  • No extra memory. It sorts in place, by moving data around a pivot.
  • Two pointers walking toward each other. That's choreography, not bookkeeping.
  • Procedural, mechanical — and still graceful.

Exhibit A · watch it move

Eleven lines, one dance around a pivot

void quicksort(int a[], int lo, int hi) {    int i = lo, j = hi;    int pivot = a[(lo + hi) / 2];    while (i <= j) {        while (a[i] < pivot) i++;        while (a[j] > pivot) j--;        if (i <= j) { swap(&a[i], &a[j]); i++; j--; }    }    if (lo < j) quicksort(a, lo, j);    if (i < hi) quicksort(a, i, hi);}

The highlighted line is the one executing. State lives in four variables: i, j, pivot, and the array itself.

i j pivot value swap settled

Exhibit B · Haskell

Same algorithm. No pointers, no swaps, no process.

quicksort :: (Ord a) => [a] -> [a]
quicksort []     = []
quicksort (x:xs) = quicksort [a | a <- xs, a <= x]
                   ++ [x] ++
                   quicksort [a | a <- xs, a >  x]

Four lines. Slower and hungrier than the C version — and still the one I remember.

  • It doesn't describe how to sort. It states what sorted means.
  • Smaller than the pivot, the pivot, bigger than the pivot. That's the whole definition.
  • The same satisfaction as an equation that suddenly makes sense.
  • Beauty and speed were two different axes — and we cared about both.

What we built on top of that feeling

So we decided writing code was an art

The obsessions

Naming. Indentation. Recursion instead of a loop, because it read better. One line you'd show a colleague the way you'd share a chord progression.

The institution

Clean code, readability, maintainability, DRY, SOLID. Best practices were taste, written down and made teachable — an aesthetic with a business case.

The signature

You could tell who wrote a module. Open source was a museum of style. Code carried a voice, and reading it was how you learned.

“Programs must be written for people to read, and only incidentally for machines to execute.”

Abelson & Sussman, SICP (1985)

Then coding agents arrived

The process became a black box — and we stopped looking inside

In

“Add pagination to the users endpoint”

?

400 lines
you will skim once

Out

Tests pass. Endpoint paginates. Ship it.

Be honest about how far this goes: we're not even curious about what's inside anymore. We only check that the transformation happened.

Does it run? Do the tests pass? Did the diff stay small? Is it beautiful?

A historical moment, not a complaint

Every abstraction took the machine away. This one takes the thinking.

1970s Assembly · registers, addresses, by hand You thought about the machine
1980s C · pointers, malloc, free Registers: gone
2000s Python, JVM, garbage collection Memory: gone
2010s Frameworks, containers, cloud The machine itself: gone
Now Coding agents · prompt, review, merge The solution: gone

Through every one of those steps, problem solving stayed on our side of the line. That's what makes this one different in kind, not just in degree.

The new argument

Push hard enough and it will tell you you're right

MeThis is cleaner. Rewrite the loop as a comprehension.
AgentYou're absolutely right — the comprehension is more idiomatic.
MeActually, no. The explicit loop was clearer.
AgentYou're absolutely right — the explicit loop is clearer.

It agreed both times. Only one of us was making an argument about beauty.

The uncomfortable part

Winning the argument is now free. So my taste never gets tested — and I can no longer tell whether I was right or just insistent.

And when I hand it code that was written with intent, it usually gets the syntax right and the reasoning wrong.

The honest question

If a machine is the next reader, does elegance still matter?

Still worth it

  • A human still reviews it, and review is where the bugs die.
  • Structure is how intent survives the person who had it.
  • Elegant code is cheap to change; clever code is expensive to touch.
  • The next model trains on what we leave behind.

Maybe not

  • If nobody reads it, readability is decoration.
  • If it's cheaper to regenerate than to repair, why maintain it?
  • Performance is optimized for me — so why weigh allocations?
  • The machine doesn't feel the symmetry. It never did.

I don't have the answer. I notice that I keep asking for the elegant version anyway — and I can't fully justify it on business grounds.

What survives

We can still read. Writing the elegant block is what's slipping away.

  • Reading survives

    Judging a diff, spotting the wrong abstraction, feeling when a solution is heavier than the problem — that's still ours, and it's the whole job now.

  • ?

    Writing is fading

    Composing eleven lines that couldn't be shorter is a muscle. It was built by debugging, and debugging is the first thing we handed over.

Where beauty might move

Maybe elegance relocates: prompts as poetry, architecture as composition, agent flows as storytelling. A different craft — but nobody learns it by reading a beautiful function anymore.

It becomes a language you can still read, but no longer speak.

One last thing

Maybe beauty was never for the machine.
It was for us.

Chasing it taught us to care about structure, to respect logic, to find harmony between chaos and order. It didn't only make the software better — it made us better.

Thank you Questions? Alessandro Romano

Based on my article The Lost Beauty of Code medium.com/design-bootcamp/the-lost-beauty-of-code-bb4a9b0855aa