Comprehensive Tests Between Ecstasy and Agony
Only a short email as I'm deep in the weeds of debugging...
Throughout a big client project, a comprehensive suite of tests—both small-scale unit tests and more extensive integration/functional tests—has saved my bacon countless times and ultimately accelerated development. Good tests let you pinpoint exactly where something went wrong, like where a new feature messed up existing functionality. This is the ecstasy. You can confidently make big strides and sweeping improvements to your code all in the confidence that you have a solid safety net.
But today, I spent agonizing hours fighting with tests that work locally but don't work when running on the GitHub server, where the code gets checked before being integrated into the mainline. The issue is related to arcane details about what you can and cannot do with GitHub Actions, Docker, and network calls, and it's still not solved 🤷♂️.
The lesson: There's a tradeoff in everything, nothing is purely good, and nothing ever works the way you'd hope it would. Our job as software engineers is to find a satisfying path through these tradeoffs that lets us make steady progress.
In my current testing conundrum, I've decided that pragmatism beats purity. A simple "hack" lets me circumvent the issues, but it's not the purist's way.
Anyway, thanks for listening to my rant. Enjoy your weekend and Monday we're hopefully back to our regularly scheduled content :)