I'm an avid proponent of test-driven development. It's about addressing the what if scenarios before you are faced with them in production.