"Deleting Code" Culture
When we talk about software improvement, we often talk about what we can add: new features, new tools, new abstractions. But sometimes, the most impactful thing you can do is delete code.
Hello, developers! đ
Welcome back to the Learn Agile Practices newsletter, your weekly dose of insights to power up your software development journey through Agile Technical Practices and Methodologies!5t
Before starting, I quickly remind you that my brand new Test-Driven Development 101 5-day Email Course is available: it is the introduction to TDD I wish I had when I started learning it, so I think you will find it very useful!
As a subscriber to my newsletter, you can have it with a 10EUR discount! đ
Now, let's dive into today's micro-topic!
In short
đ§č Many teams equate productivity with writing more code, but high-performing teams know that the cleanest, most maintainable code is the one that doesnât exist.
â ïž Unused or outdated code becomes noise, introducing bugs and cognitive overhead. Instead of holding onto logic âjust in case,â teams should evaluate whether it actively helps or hinders todayâs goalsâand delete accordingly.
đ§ As our understanding of the system improves, some code becomes obsolete. Smart teams integrate code removal into their workflows through cleanup sprints, thoughtful PRs, and a culture that celebrates subtraction as much as addition.
đ ïž Removing unnecessary code fosters a culture of continuous improvement and experimentation. The goal should always be to build the simplest system possible to satisfy our needs, and part of that simplicity comes from unwritten/deleted code.
The less code we have, the better
When we talk about software improvement, we often talk about what we can add: new features, new tools, new abstractions.
But sometimes, the most impactful thing you can do is delete code.
Not rewrite.
Not refactor.
Not comment out.
Just⊠delete. đź
It may sound counterintuitiveâespecially in cultures that associate productivity with producing more. But in reality, high-performing teams understand that less is more when it comes to code. The cleanest code is the code that doesnât exist - and embracing a culture of code deletion accelerate development, reduce complexity, and keep your system agile and healthy.
đ Code Is a Liability, Not an Asset
Every line of code carries a cost.
It needs to be read, understood, maintained, tested, secured, and eventually replaced. Code that sits untouched for months becomes an unknown. Code that nobody uses becomes a trap. Code that was written âjust in caseâ becomes technical debt before anyone realizes it.
And yet, many teams hesitate to delete anythingâbecause someone might use it, or because âwe spent so much time writing it.â
Face the truth: Unused or obsolete code slows you down.
It creates noise. It increases the cognitive load. It becomes a source of bugs, regressions, and fear. Instead of hoarding old logic âjust in case,â we should ask: âIs this helping or hurting our ability to change this system today?â
If the answer isnât a clear yes, itâs time to let it go.
Great engineers donât just write elegant codeâthey remove everything that no longer serves a purpose.
đ§ Deletion as a Learning Practice
Deleting code isnât a loss of knowledge. Itâs a sign of learning.
When we first write a piece of software, weâre doing our best with the knowledge we have. As our understanding evolves, some of that early code becomes obsolete. Thatâs normal. Thatâs growth.
A good developer builds.
A great developer knows what to tear down.
In fact, making code deletion part of your regular rhythm helps build a culture of continuous improvement and safe experimentation:
Use deletion as a natural part of refactoringâdonât just move code around, challenge whether it should exist.
Document why youâre deleting something in your commit message or PRâthis reinforces clarity.
Run internal âdeletion daysâ or âcode cleanup sprintsâ focused purely on removing legacy code, unused features, and old abstractions.
Celebrate deletion PRs the same way you celebrate feature PRs. Because they both move you forward.
As Dan North brilliantly puts it in The Best Simple System Money Can Buy, the goal is to build the simplest system that worksâfor now. That âfor nowâ part is crucial: it means weâre allowed to evolve, simplify, and prune our system as we go. And deletion is how we stay lean enough to respond to change.
Until next timeâhappy coding! đ€đ©âđ»đšâđ»