3 ms·
Some people use tests as a design tool, and as a way to repeatedly execute code in a known state while developing it. In that regard, it improves upon print sta
by gavmor 2y ago
Some people use tests as a design tool, and as a way to repeatedly execute code in a known state while developing it. In that regard, it improves upon print statements and, frankly, step-through debuggers. That it leaves behind a harness for triangulating bugs in pull requests is, of course, an invaluable side-effect.
- yakshaving_jgt 2y agoThat’s exactly my approach. I learned it from watching the Destroy All Software screencast series a decade ago. While the screencast demonstrates this with Ruby and RoR, it’s still applicable to all my work in Haskell and Yesod, despite some ideologues arguing that there is some dichotomy between types and tests.