Code Like a Fighter Pilot, Design Like an Engineer — and Measure What?
Join the DZone community and get the full member experience.Join For Free
- how do you measure 'agility'?
- who should be worrying about 'agility' in a given project -- developers or managers?
both questions have easy, unsatisfactory answers (1: cycle time; 2: both). but i'd like to probe a little deeper than bean-counter level and think about these questions from the point of view of design.
now maybe too much up-front design is a bad thing -- at least for certain kinds of software (e.g. consumer-facing & small-scale). but engineering involves design at every stage of development. the question is just how much and where.
and in fact some of the most extreme cases of up-front design – large-scale military, manufacturing, aerospace – jumped on 'agility' almost before anyone else. if this seems counter-intuitive ('how can factories fail early any often??'), read on.
agile in 1991: responding to uncertainty
well, of course the 'agile' buzzword is a lot older than the agile manifesto. government and industry have been bloviating about 'agile' since at least 1991, when the iacocca institute compiled and discussed vast swaths of research under a us navy contract, publishing the results as 21st century manufacturing enterprise strategy: an industry-led view .
this 1992 paper by rick dove summarizes the state of the buzzword one year later. even the briefest glance at the bottom of page 1 will show you that swirling buzz-talk about 'the agile enterprise' pre-dates the agile manifesto by a decade. dove observes that 'the agile enterprise' must contain systems that:
"..must be structured to allow decisions at the point of knowledge, to encourage the flow of information, to foster concurrent cooperative activity, and to localize the side-effects of sub-system change."
sound familiar? sure, these principles flow naturally from good software practices (separation of concerns! modularity! robust namespaces!). but the basic motivator for this early, manufacturing-and-military-centric concept of 'agility' was the astonishing success of 'lean' manufacturing in 1980s japan. the basic need for enterprise agility comes from the same features of the modern world that modern software itself is designed to respond to: unpredictability, uncertainty, risk, and variation.
the history of the importation of the enterprise-centric picture 'agile' into the world of software development -- and the deep early conceptual rifts between (1980s japanese) 'lean' and (1990s american-as-planned) 'agile' manufacturing -- is fascinating in itself . (basically: lean is mean and agile is forgiving. which you probably knew already.)
but agility -- in the sense of 'responding to uncertainty', not 'shortening cycle times' -- didn't deeply affect the enterprise until software developers led the way.
government and manufacturing developed the concept, and yet developers often feel -- and in so, so many cases, this feeling is obviously spot-on -- that their non-technical managers don't really get it (however much they buzz the word). why?
this is (partly) what i was trying to figure out in seattle.
i have a few initial thoughts. for one thing, it seems to me that the early manufacturing-level literature on 'agile' doesn't articulate iteration nearly as explicitly as developers do. (this is understandable -- military and manufacturing can't pivot very quickly, because ships and factories are gigantic and incredibly expensive.)
but even royce's classic 'waterfall' paper strongly emphasized the need for iteration between successive steps (and was written from experience building software for massive aeronautical projects at lockheed). [royce was saying that iterative-free, purely linear development doesn't work.] that's over two decades before scrum . but royce introduced iteration to avoid from-scratch redesign in the face of failure to meet external requirements -- not specifically to respond to uncertainty.
contrarwise, consider the famously iterative
, also developed by the military, with the aid of software, specifically for fighter pilots, in order to deal with the radical environmental uncertainty generated by enemies trying to shoot you out of the sky.
agile in the 1970s: closing the ooda loop
you've probably heard about the ooda loop -- o bserve, o rient, d ecide, a ct -- and how it was developed (partly by computer simulation), who it was developed for (fighter pilots and designers), why it was developed (because soviet-built fighters were surprisingly effective against 'more advanced' american fighters in vietnam), and maybe some of its immediate effects (revivification of the f15 program; development of the f16).
you may also have read some of boyd's musings on the philosophical underpinnings of the concept (note the considerable conceptual overlap with ken schwaber's initial paper on scrum -- and the centrality of uncertainty). a bit further afield, you might find a bunch of exciting thoughts in boyd's massively influential patterns of conflict . (briefly: rapid pivoting confuses enemies; you can win by getting 'inside' the enemy's ooda loop.)
like the early pictures of the agile enterprise, boyd and schwaber both focus on uncertainty. but uncertainty is a feature of the environment. given an uncertain environment, the most important factor on the part of the agile enterprise/developer/pilot is time . if you can't predict how the environment will change, then you better be able to respond quickly when it does.
as a result, boyd's preferred fighter was the f16 (for its maneuverability), and metrics like cycle time have received a great deal of well-justified attention in the world of alm.
agility vs. speed - the line strikes back?
but speed isn't quite what the fighter pilot needs. more important than straight-line speed is the rate of change of direction. agile jets and agile codebases change direction quickly; they don't just move fast. the distinction is straightforward in concept, of course, but all too easy to miss in practice.
the reason is partly a function of technical psychology: flow is good , and immensely satisfying. and the whole point of a flow is that boyd's o and o are completely invisible. there's just d and a, and of course you're ding and aing correctly every time.
but every part of a laminar flow moves in one direction. a speed-maxed laminar flow needs to slow down in order to avoid turbulence during unexpected shifts in direction. to me this feels like a certain kind of coding. anyone who has buzzed their way through a cowboy-dev session knows the feeling. the code is flowing thrillingly, but the momentum vector is getting too big to change.
even assuming no technical debt (because you're totally in the zone, you're not taking shortcuts, everything is coming out just perfect), the straight-line productivity might be advancing too fast. at least, too fast to respond to uncertainty -- maybe fast enough to skip the first to o's. maybe 'hurtling' is a good word.
( paul virilio thinks that the failure to distinguish straight-line speed from rate of change of direction is endemic to the entire modern world. i don't know how true that is, but i do understand the feeling, especially while 'in the zone'.)
what do you think?
so i wonder whether too much emphasis on cycle time, or time to market, or other purely straight-line-speed-focused metrics are perhaps offering 'straight line' thinking a little revenge over our lovely scrum iterations. cycles let you reorient; retrospectives close your ooda loop and prepare to open the next. and if you don't ever close the loop, then you're just in one huge loop and your enemy will shoot you down...
we'll talk more about methods and solutions later. devops is a start, but ops considerations aren't the same as good design-level engineering (which needs all four stages of the loop). smarter user acceptance testing is probably another; and static analysis needs to fit in somewhere, because the real driver of software agility is the code itself. (i also have a feeling that trees are going to prove annoyingly helpful..but i'm not sure.)
but right now i'm trying to figure out what metrics can really be used to measure your agility rather than speed -- that is, the rate at which software developers (and projects) change direction to respond to the unexpected and uncertain.
and i'd love to hear what you think.
are pure-speed metrics harmful, neutral, helpful, meaningless, and if so how and why? let's assume (unrealistically) that there is no technical debt -- because we're trying to measure degree of agility, not degree of perfection.
how would you measure software agility in the sense described here -- as the rate at which software developers (and projects) change direction to respond to the unexpected and uncertain?
Opinions expressed by DZone contributors are their own.