“Don’t Repeat Yourself.”
For years, this was sacred. Every software engineer has heard it drilled into their head like a mantra. If you duplicated code, you were either lazy, inexperienced, or on a deadline that should’ve been managed better.
But then AI showed up.
And suddenly, we’re watching an entire generation of developers intentionally repeating patterns, snippets, and even logic — because the machine told them to. And here’s the wild part: it’s not always wrong.
Let’s unpack how AI quietly broke one of software engineering’s core principles — and why that might be the evolution we didn’t know we needed.
The DRY principle in a nutshell
The DRY principle is simple: avoid duplication.
Every piece of knowledge in a system should have a single, unambiguous representation. It was a safeguard against chaos — if you change logic in one place, it shouldn’t break ten other places that had a copy of it.
It made sense in the human world.
Humans forget. Humans make inconsistent edits. Humans don’t like debugging spaghetti code.
So DRY kept our sanity intact. Until AI entered the room.
The rise of pattern repetition
AI systems like ChatGPT, GitHub Copilot, or Cody don’t actually understand code.
They predict it.
When they generate a function, they’re not thinking, “Ah, this logic is already encapsulated elsewhere.”
They’re thinking, “This pattern looks similar to something that worked before. Let’s repeat it.”
That’s where the shift happens: AI doesn’t see duplication as a flaw — it sees it as a probability of success. If something has worked before in a similar context, reusing or repeating it increases reliability in its statistical model.
To us, that looks like copy-paste.
To the AI, it’s optimization.
Why “copy-paste intelligence” can be good
Let’s be honest: most developers don’t need perfect abstraction — they need reliable, maintainable, and fast code.
And that’s where repetition can shine.
When AI duplicates a common pattern, it’s often because that pattern is proven. It has survived thousands of open-source repositories, code reviews, and Stack Overflow debates. So when an AI reuses that pattern, it’s not being lazy — it’s leveraging collective experience.
Here’s a small but crucial insight: AI doesn’t care about elegance it cares about utility.
That’s why its solutions often look repetitive yet work flawlessly.
And honestly, maybe that’s what modern software needs more of — working code, not philosophical purity.
When DRY becomes over-engineering
Every senior developer has seen this: someone over-applies DRY, building abstract layers so flexible and reusable that no one understands them six months later.
Abstraction is great — until it’s not.
When you’re chasing the ideal of “one source of truth,” you sometimes end up with indirection hell: factories of factories, classes that extend classes that extend… you get the idea.
AI doesn’t fall into that trap. It doesn’t over-abstract.
It produces what’s necessary for this moment, this problem, and this input. That’s refreshingly pragmatic.
The new principle: “Repeat until it makes sense”
Maybe it’s time to replace DRY with something more flexible — call it “Repeat until it makes sense.”
In an AI-assisted world, duplication isn’t evil. It’s a temporary solution waiting for context.
AI can produce multiple variants of the same logic until a human steps in and decides what to merge, what to generalize, and what to keep separate.
The collaboration becomes symbiotic:
- The AI provides breadth — multiple working solutions fast.
- The human provides depth — judgment, context, and long-term structure.
That balance beats any rigid principle.
Why embracing repetition might make us better engineers
AI didn’t “break” DRY to be rebellious.
It broke it because our coding philosophy was designed for humans — and now, part of our team isn’t human anymore.
Maybe it’s time to stop forcing machines to think like us and instead learn what their logic teaches us about efficiency.
Because sometimes, a little repetition isn’t a waste — it’s resilience.
So go ahead: copy, paste, iterate.
Let the AI repeat itself. You can always refactor later.