I’ve been a SOLID1 fan of TDD over many years and have spent a lot of time drilling myself in writing tests first to drive applications forward. I truly believe I have been at a place where my BIT has been FLIPPED. There are occasions though when attempting to write tests first have just been hard and completing a feature with test-first has been a record in will power and what felt like an eternity to deliver a feature. But if it was easy then everyone would be doing it.
I originally posted this on the dolittle blog.
There’s a new task waiting for you in your inbox… a bug in production! Maybe the bug is completely unrelated to code, you’ve created, but the report is there waiting for you. It’s critical, and has to be fixed “today” or “ASAP”! And with a number of consequences, like “this feature is vital!”, “support center is being called down by angry customers”, “we’re losing millions!”.