Thursday, 5 July 2012

A Man With A Plan

This painting of Sun Tzu has been slightly edited...

"If you fail to plan then you plan to fail" goes the old adage, and so, not unexpectedly the Art of War starts with a chapter on planning. Sun Tzu makes very clear however, that a good plan, perfectly executed, is no guarantee of victory, a fact that lies at the heart of the Agile philosophy.
"According as circumstances are favourable, one should modify ones plans" 
is how The General puts it.
Sun Tzu was a practical soldier, in the same way that Agile is a practical way of developing. He has no time for too much "bookish theoric" and cautions us not to pin our faith in abstract principles. This may seem to be an odd tack for him to take at the beginning of a big book, but it’s an important point that applies equally here and now: Anything we say here will be guidelines, not rules.
An important rule of thumb for Agile development is that you should do what delivers quality working code quickly.
So if something works for you, don’t panic just because you haven't seen it in a book, or heard it on a Scrum Master course, just get on and do it.
..but this photo of Paris Hilton is apparently real.
In our analogy between warfare and development, the enemy represents the problem that the developer is trying to solve, while victory is a successful go live, satisfied clients or working software. One of the commentators on the Art of War, Chang Yu, agrees with Sun Tzu on the importance of adaptability in attaining the #win.
"While the main laws of strategy can be stated clearly enough for the benefit of all and sundry you must be guided by the actions of the enemy in attempting to secure a favourable position in actual warfare"
No-one will read it. Seriously.
In our development terms this means: do what it takes to solve the problem at hand, don’t just follow a process blindly. Plans are important but not infallible and you must be prepared to change them, because the enemy will undoubtedly do something unexpected. This may seem fairly obvious but the tendency in development, and something viewed as a necessity on waterfall projects, is to produce in reams of documentation at the start of the project. These are essential detailed plans and given our lack of knowledge about the actual problem, our enemy, at this stage, in our team we call this process “documenting your ignorance”.

A Wellington Boot
The coolest story to illustrate this point comes from one of our own, rubber footwear namer extraordinaire, the Duke of Wellington. On the eve of the Battle of Waterloo, were Napoleon had his tiny Gallic behind handed to him, Wellington was visited by Lord Uxbridge, commander of the cavalry. He wanted to find out Wellington’s plans for the following day, in case, upon the Duke’s death, he found himself Commander-in-Chief and would be unable to frame new plans in the heat of battle.
The Duke, painted by Goya
After listening quietly Wellington asked, "Who will attack the first tomorrow - I or Bonaparte?"
"Bonaparte" replied Uxbridge.
“Well," continued the Duke,
"Bonaparte has not given me any idea of his projects; and as my plans will depend on his, how can you expect me to tell you what mine are?" [1]

Lord Uxbridge. With both legs.
Now this seems a little harsh on the poor Lord, my guess is that he was a bit of a bore, and Wellington just wanted to get rid of him so that he could kick back and get in the zone. However, if Uxbridge wasn't able to adapt his tactics to the problem in hand, the French Army's manoeuvres, then he wasn't well suited for the role of Commander-In-Chief. It is lucky that Wellington didn't get shot, as the fate of Europe may have then depended on the significantly less Agile leadership of Lord Uxbridge (He was literally less agile after the battle, as he unfortunately lost a leg. He did a good job before that though, leading a number of important cavalry charges and his leg went on to become a tourist attraction at Waterloo) 

So, the old adage is right, that no planning can lead to failure, but also remember that over planning and sticking too rigidly to your plans can also end badly, as Sun Tzu and Wellington have pointed out.

[1] From "Words on Wellington" by Sir W. Fraser