A Field Guide to Technical Debt

If you take only one thing from this post, let it be this: make the problem visible first. Logs, metrics, a simple counter on a dashboard. You cannot fix what you cannot see, and you will be amazed how many problems disappear once someone is watching them.

Common pitfalls

By the end of the week we had a fix we were proud of, a test that would catch the problem if it ever came back, and a short write-up for the rest of the team. That last part is the one most people skip, and it is often the most valuable.

Small pull requests get reviewed faster, get better feedback and are far easier to roll back when something goes wrong. If a change is too big to review in one sitting, it is probably too big to merge safely.

Most performance problems are not mysterious. They come from doing work you do not need to do, doing it more often than necessary, or doing it at the wrong moment. Once you start looking for those three patterns, you find them everywhere.

Make it work, make it right, make it fast.

Kent Beck

Putting it all together

It started, as these things usually do, with a bug report that made no sense. The page loaded fine for everyone on the team, but a handful of customers were seeing a blank screen. It took two days and one very patient support engineer to work out that the problem only appeared on older phones with a particular browser extension installed.

Writing tests for the happy path is easy and mostly pointless. The tests that earn their keep are the ones that cover the strange edge cases you discovered in production, because those are the bugs that will come back if nobody is watching.

Posted in

jamie

Leave a Reply

Your email address will not be published. Required fields are marked *