Home / Articles

Technical debt · Architecture

Technical debt never happens by chance

It isn't the result of bad code, but of a series of reasonable decisions, made at the wrong time or never revisited. Looking back on 17 years of evolving a SaaS product.

David RenaudNovember 20267 min read

For a long time, I believed technical debt was about poorly written code, and that "coding better" would be enough to avoid it. Seventeen years spent evolving the same SaaS product taught me the opposite: debt builds up mostly through decisions that, taken one by one, made sense.

In the beginning, sensible choices

In 2009, I wrote the first lines of an HR platform for time management. I was alone, with no specifications, working from needs explained verbally and adjusted along the way. I chose PHP, the language I knew best, and started without a framework, writing procedural code.

Looking back, that choice wasn't a mistake. It fit my knowledge and the constraints of the time: we had to ship a working product, fast. But it taught me something essential:

An architecture decision made when a product launches can shape its evolution for decades.

The real sources of debt

When I look back, I rarely see "bad code". I see a context that produced debt day after day:

The day the product changes scale

Debt stays manageable as long as the product evolves in the direction it was designed for. It becomes a wall the day large customers ask for structural changes: topics nobody thought of at the start, which require rewriting pillars of the code that had been stable for years.

Without tests, every change to a pillar weakens dozens of features that depend on it. Regressions multiply, user trust erodes, and the team spends more time fixing than building.

The temptation to rewrite everything

In 2020, we did what many teams consider one day: start over from a blank page to wipe out the debt. Three developers from my team worked on it for almost three years. The project was eventually stopped.

That failure taught me more than many successes:

What worked: modernizing step by step

After that attempt, we changed approach. Rather than rewriting everything, we gradually introduced modern building blocks inside the legacy code. Adding Slim, a lightweight framework, to structure routing and expose REST APIs was the most significant improvement of recent years: it fits perfectly into the existing code without calling everything into question.

We complemented this with tools that make debt visible: Sentry for error monitoring, SonarQube for code quality analysis, and stricter code reviews before each release.

How I manage debt today

My conviction is simple: technical debt isn't eliminated, it's managed. In practice:

Key takeaways

  • Debt comes from reasonable decisions, rarely from negligence.
  • Day-one choices weigh for years, so make them consciously.
  • A full rewrite often fails for lack of backing, not lack of skills.
  • Modernizing progressively, at the heart of the existing code, is often safer than starting over.

I don't regret the choices of 2009. I only regret not questioning them sooner, and too often saying yes without explaining what each "yes" cost the product. It is probably the most useful lesson I can pass on to a team.