← All articles

“Code Is Cheap”: The Modern Fallacy That Could Cost a Fortune

9 min readsoftware-developmenttechnical-debtsoftware-architecturesoftware-designsoftware-engineering

Machine-translated from Spanish. Read the original

ByFederico Sawady O'ConnorRagnagrok Academy

A few months ago I watched a senior dev spend hours fighting with Claude to get it to fix a bug in a handful of not-very-long functions. The problem wasn't in any of them; the trouble was that they lived in a module that imported from seven others, each with its own idea of what a “user” was. The language model, however advanced it may seem, understood nothing, because, honestly, there was nothing there that could be understood.

That scene sums up the misunderstanding of the moment. The idea that code is cheap has caught on, according to which LLMs generate thousands of lines in seconds, so the cost of production tends toward zero. It's a half-truth, and in engineering, half-truths are the most expensive of all.

As Matt Pocock says in a recent video:

Code may be cheap to generate, but today bad code is more expensive than ever.

And AI, the very thing that's supposed to save us, is the first to pay the price.

The entropy we're automating

In The Pragmatic Programmer, Hunt and Thomas talk about software entropy, the idea that the disorder of a system tends to increase unless we constantly invest energy (usually in design). Generating code with AI without a solid design framework doesn't stop entropy; it accelerates it.

And here's the paradox. An AI is only as useful as the codebase it's trying to understand. In a dirty, fragmented repo with toy abstractions, the model burns tokens looking for context and starts hallucinating with more confidence. We ask it to fix the chaos that the chaos itself keeps it from seeing.

That entropy has a concrete name in day-to-day work, technical debt. And it isn't one amorphous thing. There's structural debt (modules that no longer scale), testing debt (what you can't verify), observability debt (what you can't see), process debt (what depends on someone remembering). Each one weighs differently and gets paid off differently. Lumping them into a single mental drawer — “we need to refactor” — is exactly what guarantees they never get tackled.

And before going further, something important is worth saying, which is that a system is much more than its code. It's the code, yes, but also the design, the names we use, the domain model, the documentation, the tests, the infrastructure, the business flows, and even the way the team building it is organized. When we talk about “working with AI” we tend to think only about the code, but AI operates — well or badly — on that whole fabric. That's why writing better isn't enough, and we also have to design better, name better, separate better, and make visible what today lives only in the team's heads. The rest of the article is basically that, seen from four angles, which are how we modularize, how we close the feedback loop, how we decide between tactics and strategy, and how we manage the debt we inevitably generate along the way.

Deep modules, or design as token economics

The first angle, how we divide the system into pieces, is the most structural. John Ousterhout, in A Philosophy of Software Design, proposes a distinction, that of deep modules vs. shallow modules, that has aged incredibly well in the era of LLMs.

Deep modules are those that define simple interfaces hiding a great deal of internal complexity. Conversely, we can call shallow the ones that define small pieces with complex interfaces that expose their guts (internal state, implementation details that would be better hidden, etc.).

For a language model, navigating a system of shallow modules is a context nightmare. Every call drags along details it shouldn't know about; every change touches several places. Deep modularization is no longer just an aesthetic principle, and today it's an economic optimization. Less context, more robust suggestions, fewer hallucinations.

If your interface needs a twenty-line docstring to explain itself, you're not helping your team or your copilot.

AI doesn't set the speed limit

But modularizing well isn't enough if you then can't see what's going on. That's where the second dimension, feedback, comes in.

A team's real speed isn't defined by how fast the model writes. It's defined by the feedback loop. The Pragmatic Programmer calls it not outrunning your headlights, because if you take steps that are too big, you lose track of the logic and end up debugging blind.

But the feedback loop isn't just tests, CI/CD pipelines, or manual review, which are all processes at the end of the day. Good codebases are easy to test precisely because they're designed to give fast, cheap feedback. The other kind of feedback, the most invisible one, is semantic. And that's the problem, because whatever lives only in the team's heads doesn't exist for the AI. That's why DDD's ubiquitous language is no longer just for humans to understand each other, but is the semantic bridge that ensures you and the model are building the same domain concept. If in your code Order, Pedido (Spanish for order), and Cart are the same thing depending on the file, don't expect the LLM to figure it out for you.

Tactics vs. strategy

Modularizing well and closing the feedback loop well have in common that neither happens in a day. They're decisions that get made — or postponed — every day, and that's where the third dimension comes in.

Ousterhout also separates two modes of programming, the tactical (patching things so they work today) and the strategic (investing in the design for the future). Kent Beck put it more briefly, “Invest in the design of the system every day.”

LLMs are exceptional at pattern recognition — local refactors, boilerplate, translations between frameworks — and quite a bit worse at complex logic sustained over many steps, because their compute per token is fixed. They can be a brilliant sergeant executing tactics, but they're clearly not the strategist.

That role, at least for now, is still ours. Keeping the system coherent, deciding where to put the seams, which abstraction deserves to exist and which one is debt disguised as elegance. That doesn't get delegated.

Making the invisible visible

But being strategic doesn't mean not getting your hands dirty. Every tactical decision leaves a trail, and that trail is the fourth dimension, that of how we manage what we leave behind.

In this sense, it's important to understand that what doesn't get named doesn't get managed. And what doesn't get managed piles up until it blows up in production at six o'clock on a Friday evening.

The strategy isn't to write perfect code — that doesn't exist — but to capture debt as a first-class artifact in the backlog, on the same level as features. Every decision you make “just to get by” is a mortgage; the problem isn't taking it out, it's not writing it down. Undocumented debt doesn't disappear, but becomes team folklore, that thing “we all know is wrong” but nobody has the time — or the implicit permission — to fix.

Classifying it by type (architecture, testing, data, observability, dependencies, processes) isn't bureaucracy. It's what lets you prioritize honestly, because a security debt doesn't compete with a readability debt. And it's what gives the business a grown-up conversation about why the next sprint isn't just features.

In the age of AI this isn't optional; it's survival. Because the debt that used to cost you developer hours now also costs you in tokens, in hallucinations, and in suggestions that seem reasonable and aren't.

Slow the game down

Developing software is a lot like a soccer match. We take the field eager to score one goal after another (features, releases, value). But when the match gets complicated, or you're even coming off a bad run, the worst thing you can do is keep chasing the ball. And just like in soccer, sometimes the smartest move is to slow the game down, which means settling the ball, getting your head up, and looking at the field.

The winning plays come out of that pause. The ones that don't show up in the highlights but win matches, such as the module you decided not to write, the abstraction you pulled out in time or the debt you wrote down before it turned into folklore.

Code isn't cheap. Its real cost was never in writing it, but always in keeping it coherent, in making the invisible visible, in designing a system — not just a repository — that makes sense to us and to the machines we build it with.

And there's one last reason, perhaps the most uncomfortable one. Conway's Law says that organizations design systems that mirror their own communication structure. What usually gets overlooked is that the arrow also points the other way, and a badly designed system ends up deforming the organization that maintains it. Teams that avoid certain services because “nobody understands them.” Squads that become owners of accidental complexity. Meetings that exist only to synchronize what a good module would have decoupled. Software entropy doesn't stay in the repository, but seeps into the rituals, into the org charts, into who asks whom what.

In the whirlwind of AI-driven code production, slowing the game down feels like wasting time. But it's exactly the opposite, because it's the only way not to end up buried under the entropy we ourselves are automating — in the code, and in everything the code ends up dragging along with it.

  • Software Fundamentals Matter More Than Ever — Matt Pocock (AI Engineer Europe, 2026)
  • A Philosophy of Software Design — John Ousterhout (Yaknyam Press, 2nd edition, 2021)
  • The Pragmatic Programmer: Your Journey to Mastery — David Thomas & Andrew Hunt (Addison-Wesley, 20th anniversary edition, 2019)
  • Extreme Programming Explained: Embrace Change — Kent Beck with Cynthia Andres (Addison-Wesley, 2nd edition, 2004)
  • How Do Committees Invent? — Melvin E. Conway (Datamation, April 1968)

Correction (November 25, 2026). The first version dated Pocock's talk to 2025 and cited the first editions, from 1999, of The Pragmatic Programmer and Extreme Programming Explained. The talk is from AI Engineer Europe 2026. Not outrunning your headlights only appears in the 20th anniversary edition, from 2019, and Beck's line is from the 2nd edition, from 2004. The ideas don't change, and I found this in a review of the series.

Support the blog

If this article was useful to you, you can sponsor the blog on GitHub. It helps me keep writing.