At some point on your journey to Releasing Relentlessly, an engineer on your team will demand a rewrite.
They will present their case with a sense of urgency. Without a rewrite, we can’t deploy frequently. The code is holding us back. We need to just rewrite the code. Please.
I should know. That engineer was me.
Our Laravel API felt like a mess. We had no automated testing and experienced a stream of regressions with any change. Our code was brittle and tightly coupling made change difficult. This was no environment for frequent deployments.
Maybe we should just rewrite our API, I thought. Start from scratch and gradually move API endpoints over to the new system. Eventually the old system would be fully deprecated. We can even try a new language!
I felt butterflies in my stomach thinking of a well-tested and clean codebase. I was convinced – we needed a rewrite.
Then I talked with a technical mentor about the problem. He had a simpler solution. Just start a clean area in your existing codebase. Hold the clean workspace to higher standards for code quality and testing.
We called it v5 and started adding code. We had a few agreements for v5:
In v5, we applied the clean code approaches that we discussed in our Engineering Book Club. This clean code gave me butterflies without the burden of a massive rewrite.
The underlying problem wasn’t the code after all. The problem was our low standards.
After 2 years, over 90% of our API code lives in v5. I’m thankful everyday that we didn’t enter into the boondoggle of a rewrite.