/images/_23ba29e4-1877-41f8-a5d6-2ca440ff91ab.jpeg

Testing for Gold

For something as crucial as a financial tool, I want to be sure that plim is always extracting an accurate model of my finances from the data files I’ve download from my financial service providers. So, to ensure that new code never breaks that “ground truth,” I’ve added a simple golden file regression testing system, which gets automatically run every time I check in code changes with git.

By carefully curating a set of testing data that illustrates tricky situations and then hand-verifying that the model built from them is correct, I can ensure that plim will faithfully handle the weird cases, even when they occur in live data.

/images/_0ea3bb3c-1413-4dcc-acaa-4a3a518df36b.jpeg

Refactoring Shadows

Remember that time I said that setting up a git repo is one of the first signs of life in a coding project? Well one of the next signs is when you’ve learned enough about the tools you’re building to see that you’ve been doing it wrong…