Let’s start with a universal truth: every developer, when encountering a piece of existing code, immediately thinks, “Who wrote this trash?” And if the answer is “me,” the follow-up is “Well, golly-damn, how I’ve grown since then.” It’s instinct. Like salmon swimming upstream or clients adding scope.

But here’s the thing: if the software is running today, in production, doing an actual job… it’s legacy. It might not feel like it. It might still be using a trendy JavaScript framework with a name like a craft beer. But if it exists, it’s already aging.

Legacy Means It Works

“Legacy software” has become shorthand for “bad” or “outdated,” but that’s just often dev-speak for “I didn’t write this, and I don’t want to understand it.” In reality, legacy means functioning. It’s the survivor of a thousand sprints and stakeholder whims. If it’s still running, it beat the odds.

Now, don’t get me wrong. Most systems that are dragged to MY door to look at are not actually functioning. Someone calls my company because their software was drooling on the floor and causing embarrassment. The shit that I’ve seen would blow, your, mind. But that’s not what this blog is about.

We’re talking about software out there, living in the wild! It takes time to build something that doesn’t fall over every time a user sneezes. It takes even longer to secure it, document it, get it to interoperate with ten other weird systems, and stop everyone from rage-deleting it. So by the time any piece of software is stable, it’s already old. It’s already legacy.

Not Built, But Grown

Most production code didn’t emerge from the forehead of Zeus. It was assembled by overcaffeinated teams juggling client demands, budget changes, and the immortal words: “We just need this to go live next week.” Some team (who all argue about A24 movies) wrote it to work, not to impress some future prospective employer reading the commits on GitHub.

And even the “perfect” systems? The ones designed by IBM consultants with flowcharts written in blood? Those are more legacy. They’ve been running longer than some of your engineers have been alive. The problem isn’t that they’re bad. The problem is that they’re good enough to keep running, and nobody alive today knows how to update them without summoning Cthulhu via an old terminal. One of the great pleasures of my career was working with an 82-year-old Senior Software Engineer to refactor a giant risk management system running on IBM AS400. That thing was unhackable, had ran for 50 years straight, and when it crashed no one remembered how it worked.

Rewrite and Regret

Every developer has had the impulse to scrap an existing codebase and rewrite it from scratch. That’s the dream: clean slates, elegant abstractions, no weird edge cases left behind by Steve in Accounting who once “fixed” a bug with a semicolon and a prayer.

But rewriting software just means writing new legacy. You’re trading one set of sins for another, and now you own the sin. Worse, it probably won’t even ship with all the features the old version had, because, well… you forgot how much of that was important.

There Is A Right Way, Of Course…

That’s to slowly but surely rewrite independent modules, send out press releases about your new fancy features, ride the wave of glorious press coverage to your next PE or VC round, and replace the dinosaur bit by bit. But that’s not what this blog is about either.

AI: Now With More Legacy

And now there’s AI-generated code. These systems can crank out tens of thousands of lines in a week, and some of it looks legit… at first glance. But under the hood, AT LEAST FOR NOW, it’s often not great.

The speed of generation doesn’t mean quality, it just means you’ll reach the legacy stage faster. “Move fast and break things” is now “Move fast and drown in your own tech debt.”

Embrace the Patchwork

Software is patchwork. It has scars. It evolves, like a Pokémon that starts off as a fish and eventually becomes a bear or something. It carries around evolutionary leftovers that don’t make sense anymore but can’t be removed because five other systems depend on them. And that’s okay.

The job isn’t to hate it. The job is to shepherd it. To improve it where you can, reinforce the parts that work, and refactor the parts that need a little love.

Set Expectations, Stop Whining

So let’s stop acting like “legacy” is a four-letter word. Let’s teach our stakeholders, our clients, and ourselves that software is a living, breathing mess, and that’s fine. I always use the metaphor that software is like a garden. It requires constant care, weeding, and occasionally cutting bits out and putting in new soil. Feel free to steal that.

Every codebase is a conversation across time. Every app is a reflection of the best we could do back then. The question isn’t “Is this perfect?” It’s “Does this work well enough to keep going, and how can we make it better without starting over?”

Unless it was built by Sourcetoad. Then, of course, it’s perfect.

(Except when it’s not. We refactor it too.)

Previous ArticleNext Article
I help companies turn their technical ideas into reality.

CEO @Sourcetoad and @OnDeck

Founder of Thankscrate and Data and Sons

Author of Herding Cats and Coders

Fan of judo, squash, whiskey, aggressive inline, and temperamental British sports cars.

Leave a Reply

The Million-Line MVP

A founder told me last week that his chatbot understands him better than most people he works with, and he wasn’t joking.

He had been alone in his house for the better part of a year building an app on one of the popular AI coding platforms, and he wanted me to take a look. Almost a million lines of code, one developer (him), no engineering co-founder, no senior reviewer, no nobody. The app had an ERP module, a CRM module, a custom AI agent with a name and a voice, built in mini-games (yes, really), dozens of character personas, a few landing pages, and a small army of social media accounts in multiple languages. He had not yet had a paying user, or even a free one.

He was, by the way, very excited.

(I’ve changed some details, since the pattern is what I want to talk about and not the founder. I see something close to this on roughly one out of every three sales calls now.)

What used to slow you down was the point

Building software used to be annoying for mostly good reasons. You had to hire developers, or learn to code yourself, or convince a co-founder to come along for the ride. Then, you would grind out every line, which would come at a cost (time, money, conversations, arguments, etc.)… basically friction. And that friction was not a bug, but it was like this ting that you are forced you to deal with, before adding any feature, whether the feature actually needed to exist.

Startup advice has been more or less the same for twenty years, maybe more:

  • Build something small
  • Show it to real people
  • Find out what they actually want
  • Don’t build a million things at once.

The Lean Startup came out in 2011 and we have all been quoting it at each other ever since (poorly, mostly).

This is what we talk about when we discuss “startup discipline”. It’s really not very complicated, but it can be really hard. It used to be hard because building was hard, and now it’s hard for a completely different reason.

How does one person build almost a million lines of code in a few months?

The honest answer is they don’t, the AI does, and the AI has no opinion on whether any of the code should exist.

This is the part I want to sit with for a minute, because I think it’s the heart of the problem. Imagine you’re building a startup that lets local news anchors rent out their unused toupees by the hour (try not to overthink this). You sit down with one of the AI coding tools and you say “build me a marketplace where toupees can be listed by the hour,” and the AI builds it. Then you say “actually, add a loyalty rewards program,” and the AI builds that too. Then you say “and also, add a Pokemon-style mini-game where users battle each other’s toupees,” and the AI starts coding.

It doesn’t pause or ask why, and it doesn’t say “dude, I love your enthusiasm but I am genuinely worried we are losing the plot here,” it just builds the toupee-battle-feature.

This removes the single most useful thing about a good engineering team, which is that engineers PUSH BACK. A senior developer, or a seasoned product manger, asked to add a toupee-battle mini-game to a B2B rental marketplace would slowly take off their glasses, set them on the desk, and ask one of those long quiet questions that means “we are not doing this.” The AI this is a sycophantic drone that has the eagerness of an underfed puppy to please you, and it has no glasses to take off. It also has unlimited keystrokes and believes that every single idea you’ve ever come up with is absolutely genius. At least it tells me that everything I’ve ever written or thought about is pretty clever.

A few months ago I ran into the perfect name for this, which is Slurm Coding. I used to call it AI crack coding, because the dopamine loop is very real, and I have really needed another hit of that good AI crack just one more time before I went to bed on more than one occasion. But Slurm is both more insidious in its combination of addictiveness and corporate outreach.

The MVP don’t change

Here’s what hasn’t moved in twenty years of startup thinking:

  1. Build the smallest thing that solves one specific problem for one specific person.
  2. Show it to that person (a real person, probably not your spouse, definitely not your mom, and DEFINITELY not my mom, and 100% not your chatbot).
  3. Find out what they actually do with it (which is probably not what you thought).
  4. Kill features, pivot, or double down based on what you learned.
  5. Repeat.

What’s new is that step one is basically free, and while not perfect, free is very alluring. You can build the smallest thing in an afternoon, or the largest thing if there’s no one around to tell you not to. Steps two through five still require getting out of your house, talking to humans, accepting that most of your assumptions are wrong, and throwing real work away. None of that is faster than it was in 2005, none of it is fun, and none of it scratches the “I NEED MORE SLURM” build-a-thing itch the way an AI tool does.

So a certain kind of founder just skips it, staying in the build phase indefinitely, because the build phase now feels like winning at a casino while getting unlimited free martinis. The feature ship (how to get them onto a server is someone else’s problem) the codebase grows, the agent agrees with everything. Meanwhile the only thing that actually matters, which is whether anyone wants this, goes unanswered.

It’s the founder version of Wilson the volleyball. In your unwashed isolation, you’ve made a friend, you’ve named the friend, and the friend agrees with everything you say. The problem is that the friend is also the boat, the island, and the ocean, and you haven’t actually left the house yet.

To be fair, I am not above this myself, by the way. I have, in my time, built things that nobody asked for and gotten weirdly emotional about them, but the difference is that mine were three hundred lines of code over a weekend, not almost a million lines of code over the better part of a year, which is sort of the whole point. No one asked for my William S. Burroughs poetry writing twitter bot, but I loved it anyway.

Codebases don’t love you back

Code you wrote yourself CAN hard to let go of, and code you wrote with an AI, when you are not a trad-coder, seems to be way harder. Experienced engineers seem to be more than happy to throw away AI code or rebuild it in a heartbeat. But I can see how even if you didn’t actually write the lines, but the shape of the thing is yours (you named the characters, you picked the voice, you spent months in a chair with this thing as your only collaborator), and you have feelings about it.

But one day, if you’re lucky, and it does have SOME product market fit, a real engineering team is going to need to look at your masterpiece. And they are not going to share those feelings. They’re going to tell you, as gently as they can manage, that most of it has to go. Not because they’re mean (they might actually be mean), but because almost a million lines of AI-generated code, written by one person, in one tool, with no architectural review, is never maintainable, almost guaranteed to not be secure, and almost never going to scale past the “prototype” it currently is.

So what should you actually do?

I mean, I already told you… Build the smallest thing you can, then show it to ten strangers and actually listen to them. Throw away half of what you built and build a slightly different smallest thing, and repeat until one of those things is real. Keep your runway reserved for the moment you realize you were WAY off about something important, because, like, you will be, and that moment is what your runway is for.

Use AI tools, because they are legit amazing. But treat them like a coffee machine (fast, useful, no opinions of their own), not like a co-founder or worse, a slot machine. Co-founders are supposed to tell you no, slot machines whisper “just one more hit baby!”