Testing Habit - Box Breathing
A blank page in front of you, the blinking cursor staring you down. Where do you begin? That feature isn’t going to build itself. I know that feeling of overwhelm all too well.
When we’re outside the code, and anxiety hits, we’re told to breathe. Find a rhythm; intentionally shift your awareness. In for four, out for four, hold for four 1.
Test Driven Development (TDD) gives me a similar rhythm for my work. It follows a simple, predictable cycle - Red, Green, Refactor. Each phase, a breath.
We start with a failing test. It isn’t a failure - quite the opposite - it’s a deliberate inhale. A focusing of the awareness on something you can control. All the complexity fades away, and you have one goal - make it pass.
When the test passes - that flash of green - it’s an exhale. The tension releases. A quick win. A dopamine hit. Obvious, tangible progress, right there in front of you.
The refactor is the pause after the exhale. With the safe wall at your back2, you can clean up. Improve a variable name, simplify an algorithm. It’s a moment of peace before the next breath.
Next time you’re feeling that familiar anxiety creep in, don’t worry about “writing tests.” (That sounds like more work 😉) Instead, take one, single breath in. Find something you can control, the simplest piece of your problem. Write that test, make it pass, and exhale.
It’s no panacea, but it’s a start. Incremental progress can move mountains - one breath at a time.
-
This is a riff on the standard box breathing technique ↩
-
This is common quote by Sandi Metz. I first read it in Practical Object Oriented Design in Ruby. ↩