What is defensive development?
Defensive development is both a philosophy and a collection of techniques that can be used to allow a project to reach the finish line, even if you encounter a few unexpected turns in the road. Defensive development is about checking assumptions and knowing that the only constant is change. It’s about making sure the code written today earns us points on the scoreboard even when the goalposts move.
Keep it modular
A large part of defensive development is being aware that the thing you’re building today might end up being used in ways you never considered. The more you focus on making interchangeable parts that work well independently, the better the whole will work in the end. Similar to how cars are engineered to serve a variety of models and packages, software can be written to be forward thinking. It may not ship with a button for heated seats, but you should make sure that there’s a place for that button to go if someone asks for it.
Embrace complexity
As the often misquoted phrase goes: “there is always a well-known solution to every human problem — neat, plausible, and wrong”.
Simple solutions can be found for practically anything. They can even generally earn the nominal appellation of “good enough for now.” They almost never, however, stand the test of time. Invariably someone will have to clean up the bailing wire and chewing gum, and solve the problem the right way. The principles of defensive development say that you do the work today, and reap the benefits in the long run.
What does this have to do with Agile development?
First, we recommend you read this: The Many Faces of Agile.
Defensive development is a key component to making sure that an agile software development process can be successful. It’s knowing that you might hit dead-ends, and making sure that there are multiple routes before you start on the journey. Defensive development is how we navigate an uncertain path, and pave the way to a concrete future.