Why AI Is Bad at Software Design

The smartest AI on Earth can write you a ten-thousand-line app before your coffee gets cold, and it will still end up a disaster. Not because it does not work. It works. The tests pass, the demo is beautiful and your customers are excited. It is a disaster because nobody, not you, not the AI and not the smartest engineer alive, can change it without breaking it. It is a big ball of mud, and the AI built it in forty seconds.

This is not a bug that gets fixed next month. Humans have had this problem for fifty years, and the AI learned it from us, perfectly. Here is the one idea that explains all of it: a single, precise definition of good software design that you can use in the next five minutes. It explains why AI makes mud, why most of the books on your shelf are useless, and why you can still build products that win when everyone has the same AI you do. It pairs with the workflow side of the story in 9 AI workflow mistakes teams keep making.

The word everybody gets wrong

Ask any programmer, human or machine: what is abstraction? Usually you will hear that it is hiding the details, putting an interface in front of something, making something more general purpose, or hiding complexity.

Every one of those answers is sometimes true and sometimes false, and that is the whole problem. When a definition can be both true and false, every conversation built on it ends in the same place: it depends, it is context dependent. So we argue about it all day, and we have for decades.

Dijkstra, one of the most renowned computer scientists in history, said it back in 1972: the purpose of abstracting is not to be vague, but to create a new semantic level in which one can be absolutely precise.

The words that matter are absolutely precise. Not clean. Not tidy. Not hidden. Precise. You rarely see that in everyday software, but you see it all the time in mathematics. Group theory treats adding numbers, rotating a cube, folding paper and the hands of a clock as the same thing. It does not hide the details of those operations, it removes them entirely, so it can talk about all of them as one idea: symmetry. That is what a real abstraction is, and once you see it you cannot unsee it.

The definition

The essence of software design, and the thing AI is not trained to do, is abstraction, and abstraction is easy to define.

Abstraction is the removal of a relationship.

That is it. Something used to depend on something else, and now it does not. A logical connection was cut.

It is always relative to something. I can say my keyboard interface is abstracted from the port the keyboard uses, Bluetooth or USB, meaning the code no longer depends on the port being USB. I cannot say the keyboard interface is abstracted from the winner of the NBA finals, because there was never a relationship to cut. That is not abstraction, that is just two unrelated things.

So one design is better than another when both do the same thing but one does not care whether the keyboard is plugged in over USB or Bluetooth. That is the entire game.

Now try the usual definition, hiding details, and see what happens. Take your keyboard code and chop it into a hundred tiny functions of two or three lines each. Every function hides the details of what it calls, so by the hiding definition you just made it far more abstract. But the code does exactly the same thing, and every dependency is still there. Nothing was removed. You hid things, you did not cut anything.

That is encapsulation, and encapsulation is not abstraction. They are different things, and the industry has mixed them up for decades. The code and writing that models learn from mix them up too, so we make no progress.

The cut test

If good design is removing relationships, then bad design is introducing relationships you did not need. That gives you an empirical test you can apply to any software to decide whether it is better or worse.

Ask your coding assistant to show you a piece of code with a relationship in it, then ask one question: can you produce a refactor with the same behavior and that relationship gone? If yes, that relationship was unnecessary, and that is bad design. Full stop.

There is a common misconception that this means predicting the future, or writing more code, or doing more complicated work. It is the opposite. Removing relationships almost always means less code. Every unnecessary relationship creates workarounds, and you end up with more code about the workarounds than about the actual problem.

Why the books are useless

There are two parts to making software. AI is superhuman at one of them: asking how a specific function changed from version 2 to version 3, or when something throws an error. That part of software is documented with extreme precision.

The other part is design. Because design is more abstract, many people conflate it with being vague or impossible to verify, and the way we talk about it does make it that way. We say rule of thumb, it tends to be, usually better, this is preferred.

There are simple statements, which are true or false, and complex statements, which are sometimes true and sometimes false until you know the context. A statement built out of complex statements is itself complex. Software design is not the only field talked about this way. In economics, saying that the central bank issues more money, so the money supply goes up, is simply true. Saying that increasing the money supply makes unemployment go down is complex, because it depends on a series of things that tend to happen but not always.

We all know that correlation does not imply causation, and yet we build whole fields of study as if it does. People are far more likely to end their life in a hospital, but that does not mean avoiding hospitals makes you live longer. Software design is no different. We built the field on broad generalizations instead of true or false statements, and when you do that you are running on a hamster wheel.

The machine that builds mud

When AI works in a field made mostly of statements that are sometimes false, its training data is unreliable and it will not perform well.

There is a simple reason autonomous code generation keeps producing mud. When humans write code, they accumulate complexity until it is too much to handle. Every example in the training data, from starting something to making incremental progress on it, adds complexity over time. Weeks later comes a big refactor, but the data holds very few examples of real abstractions, because programmers by and large do not know the meaning of the word.

Humans with AI assistants are not getting better at design. They are doing the same design they always did, only faster. Without active effort put into design, a codebase converges on worse and worse design over time.

The unfair advantage

Now flip it. If you are a founder, this is the best news you will hear all year. If you want to build better solutions than people can get from their own AI assistants, ask yourself one question: is this the kind of thing people talk about with simple statements or with complex statements? That is the only litmus test for whether AI will replace it.

Everyone is terrified of being disrupted by vibe coding because the features are easy. Anybody can clone your features, and most people think of the features as the product. But building well-designed software is going to become more of a competitive advantage over time, because people will not grasp the distinction between the features and the design of the system. More and more people will create software with less and less design applied, so well-designed software will be rarer than ever until the way we write about it changes, and that will not happen without a software engineering renaissance. If everybody on the planet woke up tomorrow speaking with simple language about software design, I would concede the argument. Until then, it holds.

Applying this to your product means you keep going faster while your competition is on a treadmill. They feel like they are moving forward but they keep backtracking, and you are always moving forward.

Notice how often people change their products when a new AI tool comes out. If your product is well designed, every one of those tools only benefits you. The feeling of exponential progress everyone has in this age, the disruption, is really an age of progress for the people who have good design. The advantage is not who is moving fastest on the treadmill. It is the people who got off the treadmill entirely.

What to do next

The next big opportunity in the AI era is not a new model. It is every place where humans talk in platitudes. Wherever people speak in claims that are sometimes true and sometimes false, whoever speaks precisely wins.

When it comes to building SaaS products, the machines can write the code just fine, but they cannot decide what should depend on what. That is your job, and it is the most valuable job in the room.

Get the next one in your inbox.

Practical notes on running a business with AI agents.

Subscribe