Value Over Tests
I am a fan of tests, but my testing journey was long and fraught.
One of the hardest ideas for me to understand was where do you draw the line. How much is enough?
I tried many different ways to understand this, but it wasn’t until I read this quote from Kent Beck that a key idea crystalized.
I get paid for code that works, not for tests, so my philosophy is to test as little as possible to reach a given level of confidence 1
It sounds glib, but it’s quite elegant. The right thing to optimize for is confidence and value.
It can be hard to put into practice as well. Answering the question - are you confident in the code you are shipping - requires time and effort to answer. As long as you’re focused on delivering value and how you feel about the code, overtime you gain a sense of confidence.
You are often caught by surprise as well. Those are moments to learn from.