Larry Myers

Daily Note

January 9, 2024

I’m not a huge test driven development proponent, except when it comes to fixing bugs. If you are fixing a bug the first step is to write a failing test case that proves the bug exists. That test asserts you actually know what the correct behavior of the system should be. It also gives you a place to set a break point when debugging so you can figure out exactly where the bug is if it’s not obvious. If every bug fix came with a test case more codebases would be resilient against regressions and wouldn’t have so many bug fix commits based on hope.