# Slop, taste, and principles

Alfonso Campodonico · 2026-10-26 · https://alfonsocampodonico.com/posts/slop-taste-and-principles

> AI made code cheap. The hard part now is choosing where the seams go.

## Slop

More than a year ago, the slow part of a change was writing it. Now an agent writes in minutes. What didn't get cheaper is deciding what to write: whether this belongs in its own piece or inside the thing that uses it, whether it should handle every case or just this one.

Leave that decision to nobody and you get slop. 

Slop is what happens when you don't care. The agent solves the problem in front of it, in place, and it does that well. Then the next problem gets solved in place too, on top of the first. Shipping is quick at first. A few weeks later each change touches five places, and everybody is scared something may break.

Slop isn't new. It's what any codebase becomes when nobody steers. AI just gets you there faster, because it never gets tired of patching.

The obvious fix is the wrong one: design everything up front. Ask an agent for a general solution on day one and it will happily build one, with options for cases you've never seen. Clean, configurable, and slow to ship. Half the options never get used. And you end with code you didn't actually need.

*Interactive diagram on the page: Two ways to get it wrong.*

Those two are easy to reach. The corner you want, code with clean edges that still ships quickly, takes two things the agent doesn't bring: taste and principles.

## Taste

Taste is seeing where the seams go. It's noticing that the last few changes never touched the core, that this function is really two functions, or that this "general" option has exactly one caller.

The way I use AI: write the specific thing first, in the place that needs it. No options, no abstraction, no "what if we also need". Ship it, metric (yes as a verb) the shit out of it, and iterate it. Every iteration shows you which parts keep moving and which never do. After a few rounds it stop touching the core, and that's when it has earned a name and a home of its own. Pull it out then, on purpose.

That sounds like slop, but it isn't. Slop is ad hoc code that never gets pulled out. And then other agents keeps repeating the same pattern. The pulling out is the step teams skip, because it doesn't ship a feature and never feels urgent.

AI makes each round nearly free, which is good: you learn the shape from real use instead of guessing. But it makes the next patch just as free, and nothing in the tool tells you to step back. Knowing when to step back is the taste.

You build taste by reading a lot of code, yours and other people's, and by living with your own decisions long enough to see how they aged. There's no shortcut. But there is a way to keep what you learn.

## Principles

Principles are taste written down, so you don't re-argue the same call every week, and so someone else can make it the way you would. [The Twelve-Factor App](https://12factor.net) is the classic example: twelve rules for building services, so every team doesn't have to rediscover that config belongs in the environment or that processes should be disposable. Mine are smaller. A few I keep coming back to:

- Write it for this case first. Generalize once it stops changing shape, not before. Sandi Metz's [The Wrong Abstraction](https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction) and Kent C. Dodds's [AHA Programming](https://kentcdodds.com/blog/aha-programming) make this case better than I can.
- A part should do one job and be deletable without surgery. That's the [Unix philosophy](https://en.wikipedia.org/wiki/Unix_philosophy), applied to code instead of programs.
- Measure before making something fast, and keep the fast path boring. Knuth's line about [premature optimization](https://en.wikipedia.org/wiki/Program_optimization#When_to_optimize) is quoted to death, but the rest of the passage is the useful part: find the critical 3% first, and measure to find it.
- Prefer one obvious way over a configurable one, which I stole from the [Zen of Python](https://peps.python.org/pep-0020/).

Principles matter more with AI, not less. An agent follows the patterns it sees. If the codebase has clear seams and a few written rules, it fills in parts that already have a shape. If it doesn't, it's fast at making more slop. So write them down where the agent will read them, in the repo, next to the code.

Slop is the default. Taste is how you see past it. Principles are how you keep seeing it when you're not the one typing.
