Don’t Unit Test? Start Counting Your “Oh Shits!”Filed Under Software Process
I have heard every excuse of why not to unit test. The most common excuse is “it takes too much of my time”. I can sympathize, but I give you one simple challenge – start counting your “Oh Shit” moments.
There are many moments you can start counting.
Oh Shit I …
- didn’t code that right (the very first time)
- just broke previously working functionality
- fixed a bug, but created another bug (or two)
How many “Oh Shit” moments would you have in a day? In a week? On a project? They can really add up. Most importantly, you can measure how much time you spent fixing things you didn’t need to.
Obviously you can also measure time spent building unit tests, but the time saved not spent on “Oh Shit” moments now becomes transparent and immeasurable.
Simple challenge – count the number of times you think “Oh Shit”. Hopefully, this small act will give you a more aware perspective of wasted time and the time investment of unit testing.