“Do The Simplest Thing That Can Possibly Work” – that’s what. Now, what does that mean?
The actual expression comes out of the XP camp. Supposedly it was originally a reminder to ask what is the simplest thing that could be done, but I actually prefer the active version.
I’ve been asked questions like this recently at work, and thought I’d take a moment out to write up my thoughts. That’s what this is for, after all… me. 🙂
Let’s break the statement down into component parts, shall we?
This one is easy: you have to do it. Talking about it won’t help. Drawing up pretty pictures won’t help. Anything that isn’t actually doing the solution won’t help.
A good way to break this down is to invert it. What’s the opposite of simplicity? Complexity. Thus, asking us to do the simplest thing is to ask us to do the least complex thing. This is good; software is already complex, and natural complexities will creep in without us adding unnecessary complexity into the picture. Adding unnecessary complexity has a very good description: over-engineering. Over-engineering is wasteful. Note that reducing complexity is hard; asking someone to produce the simplest design is to ask them to spend a lot of effort coming up with a better way.
This is the caveat clause. A lot of detractors of this statement focus on the “simplest” statement and invent ridiculous strawman arguments. This clause demolishes them. If the solution doesn’t “work”, then it doesn’t meet the necessary conditions. If it does work, you don’t need to complicate it any further, do you? My personal definition of “work” is “passes all the tests”; this naturally puts the burden of proof onto testcases.
So, to rephrase this: DTSTTCPW asks us to use the least complicated solution that actually solves the problem at hand. Put it like this, it makes a lot of intrinsic sense.
Also: remember that XP is a “holistic” process. Slogans are like sound-bites: they are usually taken out of context. DTSTTCPW requires a lot of enablers, which a full XP process “just happens” to put into place. Above all, you need the ability to put in a more complex solution should the simplest thing turn out to not work after all.