Why Code Quality Matters

Recently the discussion of code quality has come up with a couple of different people. With the main question:

“If the app does what it’s supposed to do, why does code quality matter?”

In one instance an application that was bringing in over a £1m in revenues a month had one of the worst code bases a friend had ever seen. And I totally agree that there is no correlation between code quality and the earnings/growth potential of an application. Then a few days ago I was reading the brilliant Zed Shaw article “Products For People Who Make Products For People” which completely crystalised why code quality is important:

“… the frontend product is what brings your revenue stream in, but your backend operations quality is what keeps your costs down as you grow. If your backend costs get out of control because of technical debt then you won’t make a profit, or someone who can keep them down will just copy you and wipe you out with less.”

Perfect! That’s it exactly. Code quality matters as that’s what allows you to grow the system beyond your v1. If you never plan/or want to get past v1, then perhaps you can get away with being a lot more lieniet in your “quality”. I know that’s what I do, if it’s a quick app then normally I have only the most basic of tests and cut corners where I wouldn’t normally. Maybe in a sense, code quality is a reflection of technical debt. The lower the quality, the higher the debt and sooner or later you’re going to have to pay that back (Unless you’re fortunate enough to close up shop before that time comes). I’ve worked on projects where the technical debt is so high that you’re paralysed and just can’t do anything. Simple changes become huge problems as you’ve been painted into a corner, and the fear of breaking something is so huge that new feature requests are shied away from.

If you want/expect to be able to grow your business then keep the bar high. Code quality matters a hell of a lot.