Chris Barry / Blog

The Senior Engineer Who Deleted Everything

June 2, 2025

She joined the team and spent her first two weeks reading code and working out what it did, without writing any. She asked questions that made people uncomfortable, like "What does this do?" and "Does anyone use this?"

Then she started deleting things: entire modules, features that had been in the product for years, code that people had spent months building.

The first reaction was panic. Someone had mass deleted code, so surely this was a mistake. But the tests still passed, the product still worked and users didn't notice.

Most of what she deleted wasn't being used. Some of it never had been, some had been used once, years ago, and then forgotten, and some was half-finished experiments that nobody had the heart to remove.

The codebase got smaller and builds got faster. New engineers stopped asking about mysterious folders that nobody could explain. It was the most useful thing anyone did that quarter.

We celebrate creation: lines of code added, features shipped, systems built. Deletion feels like failure, an admission that something shouldn't have existed in the first place.

But code has a carrying cost. Every line might break, has to be understood by someone, and slows down everyone who comes after, so the more code you have, the harder everything becomes.

Junior engineers add code and senior engineers remove it. That's an oversimplification, but it's not entirely wrong.

Deleting the code is easy once you're confident nothing needs it. Getting that confident requires understanding the whole system, which means talking to people, reading logs and tracing dependencies. It also requires being willing to be wrong, and most people aren't, so they leave the code alone just in case. The codebase grows and grows, and eventually nobody understands it anymore.

She left after a year. By then the codebase was half the size it had been when she arrived, the team was faster and the product was simpler.

Everyone who worked with her remembered what she did, but nobody gave her an award for it. Most performance reviews have no metric for "code removed".