Test First as a Habit

I am not a TDD zealot (or even really a practitioner), but on The App Guy podcast, Paul Kemp asked me if I had any habits to share as an app developer.  I said:

My app developing habit … is get a new passing unit test every day.  […] that new green dot is my indication that I’ve at least added a little bit to the application.

This is a habit I started in earnest when I took B. J. Fogg’s Tiny Habits course. My tiny habit was to just run the simulator, and the best way I found of doing that was to run the tests through it. Then, writing a new test for whatever functionality I was planning next just seemed to be the perfect way to extend it.

Once I write that first test, I don’t TDD the rest of the way, but I’ve found that first test to be a good way to warm up.