Peter Morlion logo

When Not to Refactor

There are cases where it makes sense not to touch a legacy codebase with lots of technical debt. Unlike real debt that must always be repaid, technical debt doesn’t always need to be. But the use cases are more exception than rule. No Need For Change A piece of software that runs fine without the […]

When Should A Startup Refactor?

If you’re working at a startup, chances are things need to go very fast. Faster than business that have a steady income. A product needs to get out the door as fast as possible, so it can be OK to incur some technical debt and create legacy code. But when do you start to clean […]

How Much Refactoring Should I Be Doing?

So you have a working piece of software but you know the quality needs to improve. The team might be saying alarming things like “we need to rewrite this entirely.” Should you halt feature development for weeks or months? Probably not. Keep Producing Features Features are what makes your product attractive to your customers. It’s […]

Refactor or Rebuild

In the land of legacy code, many teams discuss whether they should refactor the existing application or rebuild it from scratch. But the answer to this problem is more nuanced than many would like to admit. What is Refactoring? I’ve previously written about what refactoring is and why it is a valuable investment. In short, […]

Refactoring Explained: What and Why

In any project, there quickly arises a need for what we call refactoring. This is especially true in legacy projects. But what do we mean by refactoring exactly, and why is it so important? Refactoring: New Wine in Old Bottles? Wikipedia defines refactoring as follows: Code refactoring is the process of restructuring existing computer code—changing […]

How to Use Code Coverage to Your Advantage

Code coverage is an interesting tool that has received quite a bit of bad press over the years. In fact, ever since it became easy to see the code coverage of your tests, there have been fanatic supporters and rejectors. As is so often the case, the value lies in how you use it. Many […]


Services What i offer Looking for a speaker on legacy code, technical debt, refactoring and automated tests?Or someone to coach the team? Consultancy & coaching Coaching & teaching Consultancy & coaching Code Assessment and Strategy Are you interested in the current state of your code?Is it high or low quality? Where are the pain points? […]

The Multiteam Monolith

The monolith is an architectural pattern where the software application consists of a single executable that is deployed as a whole. It can be difficult to work with when it is being maintained by a single team. But matters worsen if it is managed by multiple teams. Here’s why. How Monoliths Grow When a company […]

Running Locally

Many legacy applications are difficult to run locally, on the developer’s machine. I always recommend teams make it possible to run their code locally. After automated tests, it’s a powerful enabler for developers to improve the code quality. Here’s why. Working Offline In the past, internet connections weren’t always reliable or, when commuting, not available […]

The Testing Hourglass Is Fine For Legacy Code

I’m a big proponent of automated testing, and so also unit testing. Automated testing is the number one tool in my toolbox to avoid or fix technical debt. But it can also become a force that is blocking you from fixing that technical debt. Here’s why. Two Schools There are two schools in unit testing […]