The Art of War: How it Applies to Software
Join the DZone community and get the full member experience.Join For Free
in our modern world, software is of vital importance to your organization. if you can build software consistently and reliably you will gain a tremendous advantage over your competition. if developing software is like waging war then who is the enemy?
sun tzu wrote:
war is of vital importance to the state; hence it is a subject of inquiry which can on no account be neglected .
laying plans , p. 1
the enemy is complexity . complexity comes from having to make dozens of decisions correctly for your software project to even have a chance of succeeding. for every thing that you know at the outset of the project, there will be at least ten things that you don't know. complexity is compounded by having to make those decisions on a deadline, especially if that deadline is not well chosen.
unlike a conventional war this enemy does not sleep, has no obvious weaknesses, and can not be deceived. once you engage the enemy your success will depend on correctly estimating the magnitude of complexity and making excellent decisions.
sources of uncertainty
if you know the enemy and know yourself, you need not fear the result of a hundred battles. if you know yourself but not the enemy, for every victory gained you will also suffer a defeat. if you know neither the enemy nor yourself, you will succumb in every battle.
attack by stratagem , p. 18
uncertainty comes from a few main sources:
- team resources unfamiliar with the technologies to be used
- requirements that are incomplete or inconsistent
- technical requirements that turn out to be infeasible
- inability to understand project dependencies
- inability to formulate a correct and understandable plan
unlike fighting a conventional enemy, complexity will find all your weaknesses . the only way to defeat complexity is through understanding the requirements, having well trained teams, building a solid project plan, and executing well.
in that battle about 400 men on horses attacked 20 battalions of infantry supported by 50 artillery pieces.
needless to say it was a slaughter .
the art of war ( online )
several principles outlined by sun tzu apply to software development as well:
- leading to advantage
- using spies
- strengths and weaknesses
- winning whole
since the enemy is complexity we can not deceive it. rather the problem is that we allow ourselves to be deceived by complexity. how often do you see developer's say that they can code anything over a weekend over a case of red bull ?
people generally do not launch software projects because they want to fail ; but when only 3 out of 10 projects succeed, it shows that people have been deceived about the complexity of building software.
this statistic has haunted us for 50 years.
senior management should really pause and consider if all their ducks are lined up in a row before embarking on a software project. unfortunately senior management is still underestimating complexity and sending teams to face virtually impossible projects.
leading to advantage
thus it is that in war the victorious strategist seeks battle after the victory has been won, whereas he who is destined to defeat first fights and afterwards looks for victory in the midst of the fight.
tactical dispositions , p. 15
complexity emerges from the sources of uncertainty mentioned above. successful organizations plan to remove known uncertainties and have a plan to handle the ones that will emerge. getting into a project before understanding the magnitude of the uncertainty is a recipe for failure.
that the impact of your army may be like a grindstone dashed against an egg-this is effected by the science of weak points and strong
energy , p. 4
the team's energy needs to be directed against uncertainty with appropriate force at the appropriate time. when this happens uncertainty will be minimized and the chances for success will increase.
it is imperative to create a table of all risks that might affect your software project. if you aggressively minimize the probability of risks triggering you will reduce uncertainty and increase your chances of success.
software projects succeed when there is a rhythm to the attack on complexity. high intensity problem solving needs to be followed by lower intensity stability building. the team must move at a sustainable pace or risk burning out. software teams do not succeed when they are working 10+ hours a day; they become like dull swords -- unable to do anything.
foreknowledge cannot be elicited from ghosts and spirits; it cannot be inferred from comparison of previous events, or from the calculations of the heavens, but must be obtained from people who have knowledge of the enemy's situation.
using spies , 5 -6
your business analysts will work with the business to define the scope of the complexity. ask for anything you want, but commit to build what you ask!
remember that all large complex systems that work are built from small simple systems that work, so aim to build the smallest usable product initially. asking for too much and providing insufficient resources and/or time will lead to a failed project.
the architects provide checks and balances on the business analysts to make sure that the project is feasible . the architects will provide key dependency information to the project managers who make sure that a proper execution plan is created and followed.
each of these spies sees a different aspect of complexity that is not visible to other people. unless the reports of three types is combined effectively you risk not knowing the extent of the software that you are trying to build. if you go into battle without proper intelligence you are back to the scenario of the charge of the light brigade .
strengths and weaknesses
military tactics are like unto water; for water in its natural course runs away from high places and hastens downwards. so in war, the way is to avoid what is strong and to strike at what is weak.
weak points and strong , p. 29-30
water exhibits ordered flexibility . it is ordered because it seeks to flow downhill; however, it is flexible and will go around rocks and other obstacles. a software project needs to make continual progress without getting sandbagged with obstacles. methodologies like rup or agile software development can make sure that you exhibit ordered flexibility.
winning whole in a software project means delivering the software on time and on budget without destroying the health and reputations of your team (including management). failed projects extend their effects to every member of the team and everyone's resume.
when you engage in actual fighting, if victory is long in coming, then men's weapons will grow dull and their ardor will be damped.
waging war , p. 3
when organizations bite off more than they can chew they exert tremendous pressures on the team resources to work extended hours to make deadlines that areoften unrealistic . in the pressure cooker you can expect key personnel to defect and put you into a worse position. how many times have you found yourself on a death march ?
both waging war and software development are serious topics that involve important struggles. if software development is a war against ignorance , uncertainty , and complexity then many of the strategies and tactics outlined in the art of war give us direction on how to execute a successful project.
in a subsequent article we will show that agile software development isa project methodology that meets all the criteria of sun tzu.
Published at DZone with permission of Dalip Mahal, DZone MVB. See the original article here.
Opinions expressed by DZone contributors are their own.