agile

Division of Labor in Lean Software Development Workflows

Imagine we have team of three people, each working as generalists in an agile-style process. They are all qualified and competent workers, and correctly execute the process that they intend to follow. They break their work up into customer-valued features that each take a few days to complete through integration.

One developer is a true generalist. It takes her a couple of days to produce a testable functional specification and high-level design. It takes her a couple of days to produce a detailed design and working code. And it takes her a couple of days to verify and validate everything, from code correctness to functional acceptance.

Another developer is basically competent at all of these things, but he is a more stereotypically geeky programmer who can crank out high-quality code for most product features in a day, on average. It takes him a bit longer than the others to do the customer-facing part, usually about 4 days for analysis and high-level design. He’s also a bit slower with the validation, because again, if it ain’t writing code, he’s just not that excited about it. And for all the time he spends on specs, they are still mediocre, which results in rework in spite of his good coding skills.

The third developer, by contrast, has a sharp eye for design and is very friendly and sympathetic to the business and the customers. He knows the business so well that most of his specs only take a day to write. He’s a competent coder, but a bit old-school in his style and it takes him a bit longer with the current technology. Plus, his heart isn’t quite in it the way it used to be. It takes him three days to develop good code that everybody will feel comfortable with. On the other hand, since his specs are so clean and thorough, and he has a good rapport with the business, the testing usually goes very smoothly in about two days, also (tied for) the best on the team.

The team, on average, produces features with a cycle time of 6.67 days per feature. Overall, each team member produces at a similar rate.

2d + 2d + 2d = 6d
4d + 1d + 3d = 8d
1d + 3d + 2d = 6d
-----------------
               20 days / 3 features = 6.67 days/feature

It is a one-piece flow (per developer), and everybody is always busy with his or her feature. Nobody ever has to wait to start a new feature. Other than the personal slack built into the task times, capacity utilization is high.

But imagine if this team of generalists were allowed to focus only on the skills that they were best at:

1d + 1d + 2d = 4d
1d + 1d + 2d = 4d
1d + 1d + 2d = 4d
-----------------
               12 days / 3 features = 4 days/feature

Same people, same features, 40% improvement in productivity…

…if only it were that simple, because there is also a cost here. If they organize themselves as a pipeline, then that pipeline becomes subject to the Theory of Constraints. If they apply Drum-Buffer-Rope, then the testing task sets the pace at 2 days. That means the total cycle time per feature is:

2d + 2d + 2d = 6d

…still an improvement over the generalists, but only by 10% (!). On the other hand, capacity utilization is now low, because two people now spend half of their time idle, waiting for the drum. Since they are the same people who were cross-trained enough to work as generalists in the first example, is there anything that they can do to speed up the testing process which has been otherwise unimproved? Surely the answer must be yes.

Suppose each of the first two developers spends an extra half of a day doing additional work to optimize the testing process, so that testing only takes 1.5 days to complete instead of two. Introducing a pipeline might also introduce a new communication cost, but imagine that the extra half-day spent by each of the first two developers is in collaboration on the two features they have in process, both communicating and optimizing testability.

The total labor expended is now 4.5 days per feature, but all of the idle time has been stripped out, so that the total cycle time per feature is also 4.5 days. That is a real 33% improvement in throughput. Same people, same features, same skills, 33% faster. It is only an example, but is it not a realistic example?

What about training?

An enthusiastic and observant Agilist might, by this point, object that we could improve the productivity of the team in the first example by improving their skills with training. That is indeed true. We could provide such training, and it may very well yield improvement.

We could also provide training to the team in the second example, which might also yield improvement. What sort of improvement might we expect in each example?

The generalist model suggests that we help each team member improve their weak skills to bring them up to par with the rest of the team. In any model, there is something to be said for cross-training because it facilitates communication and allows the business to adapt to change. But investing in training to overcome weaknesses is a classic management mistake.

In First, Break All the Rules, Buckingham and Coffman make a compelling and well-researched case that the best return on investment in training comes from enhancing a worker’s strengths, rather than overcoming his weaknesses. The geeky coder may have a lack of charm or graphic design sensibility that no amount of training can ever overcome, but picking up a new coding technique or web application framework might pay immediate dividends.

The more specialized team has another built-in advantage in training because they simply get more practice with their currently deployed skills. The analyst gets more training on analysis, which he already has an aptitude for *and* then gets to spend all of his time practicing.

Back to our first team, imagine that we invest in generalist training, so that our

2 + 2 + 2 = 6
1 + 3 + 2 = 6
4 + 1 + 3 = 8

becomes

2 + 2 + 1 = 5
1 + 2 + 2 = 5
3 + 1 + 3 = 7

…for an improved average cycle time of (5+5+7)/3 = 5.67 days per feature. A generous result in training, for a significant outcome.

What about our “invest in strengths” scenario for the first team?

2   + 2   + 1 = 5
0.5 + 3   + 2 = 5.5
4   + 0.5 + 3 = 7.5

…not as good! Even with a very generous 50% improvement for all, we only get 6 days per feature. But what about the specialized team? If our original:

1 + 1 + 2 = 4

becomes

0.5 + 0.5 + 1 = 2

…and then we add back some collaboration overhead:

1 + 1 + 1 = 3

…well, then we are just smoking the generalist team. These are contrived examples, but they should still illustrate some of the advantages that go to small lean teams over small craft teams. The most effective teams have complementary skills and personalities, not homogeneous ones. Otherwise, why organize into teams at all?

Still not that simple? Enter the kanban

A problem with both examples is that they deal with average features. But nobody ever actually works on an average feature. They work on real features that can be averaged over time. Those features have variation, and sometimes a lot of it.

For this reason (and others), we don’t organize our workflow by role. We organize it by task or process, and let team members apply themselves to the workflow in the most efficient manner. They may even hand off the work at different transitions depending on the feature or the state of the pipeline. Such a soft division of labor preserves the efficiency advantage of each worker, while also allowing for variation and changes in circumstance. What matters most is that the work is done in the right order by the best resource available at the time, not who does what.

Pooling work-in-process according to the kind of asynchronous kanban system we’ve been discussing smooths out the flow of variable-duration work items, so that some of the variation in cycle times between processes is traded off for variation in inventory. Such a pooling strategy works better with more people than our examples, and also more people than the current common practice for agile teams. For a pipelined kanban system, we think that about 20 people is the sweet spot.

Comments (10)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Hundreds of people can’t check directly into main every day

This is part 5 of 10 Pitfalls of Agility on Large Projects. In part 4, we talked about how the customer doesn’t want a release every month, and what to do about it.

Chris Seiwald and Laura Wingerd have had a great paper that’s been out for almost a decade which describe best practices for branching on large projects.

Here’s a similar (but ugly, hand-drawn) take on the key diagram in that article which shows the key criteria for branching and checkins — creating separate branches whenever the risks or goals of a set of checkins deviate significantly from the standards of the current main codeline.

Branching Model

The model requires a source code control system with good branch/merge support. Chris’ Perforce has been the best commercial choice for some time (because of its simplicity and scalability), but open source alternatives have been getting better. Subversion is a great open source choice, but has had subpar merging. This is slated to get better in upcoming version 1.5. And the whole Distributed SCM family of tools (git) makes this their forte.

In a future continuation of this post, we’ll look at tying branching best practices into the larger picture of robust continuous integration.

Comments (1)

Print This Post Print This Post

Email This Post Email This Post

Permalink

The customer doesn’t want a release every month

This is part 4 of 10 Pitfalls of Agility on Large Projects. In part 3, we talked about how we can’t afford to trust everyone on large teams, and what to do about it.

Frequent releases, which are central to both agile and lean methods, sometimes draw a visceral reaction because people fear we can’t keep the product that close to release quality at all times, while still delivering as much innovation.

That is a real challenge of agile/lean methods. But making this argument against short cycles is difficult, so the most common argument ends up being “the customer doesn’t want a release every month (or every 6 months, or every year …) anyway.”

Unfortunately on any project with many customers, while no customer wants a release every month, there is always one wanting a release right now.

We can deal with that to some extent by having tiers of releases: the single-customer quick fix, the multi-customer patch, the service release, and maybe minor and major releases. But each of these tiers involves extraordinary cost and waste from duplicate efforts — waste that can often be avoided if the main release cycle is short enough that customers can get their needs met.

It’s better to embrace the challenge and compelling benefits of feedback on short cycles. Here’s a rough diagram of a typical three-tier set of daily, weekly, and monthly release cycles.

Release Early and Often

The heart of it is a per-change or, at worst, a daily build (continuous integration). This build is picked up only by people who are in close contact with the project. This discipline keeps everyone in sync, and keeps the project from wandering into a broken state.

The weekly build (or some equivalent) is important whether at a large organization (where many remote teams share dependencies) or at a smaller startup (where the salespeople and management interact with the product daily). Tightening up the feedback loop of these internal customer proxies creates transparency, builds trust, and keeps the product from evolving off-track feature-wise.

Releasing something to customers every month can seem daunting in some large organizations. The biggest of the software beasts (Microsoft) has had challenges but also great benefits in doing so. And if you think you have a great plan set in stone (a very detailed set of requirements), all the feedback these releases will generate would seem to be just a source of endless distraction.

Don’t be foolish. Unless you’re delivering a 1-1 functional replacement for some existing product (and how often do we do that?), you desperately need that feedback. It keeps the team connected with the customer, motivated by the customer, doing right by the customer. Concerned about opening your kimono to competitors? Limit your audience to a trusted subset, like Apple’s AppleSeed program and most others do.

Once the team gets used to a cadence of regular releases, the practice becomes the heartbeat of the organization, keeping everyone on track, in touch with reality, and constantly learning.

Comments (2)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Tom Gilb’s “evolutionary delivery,” a great improvement over its successors

Why is it that the popularity of Agile processes appears to be in reverse order of their usefulness?

Tom Gilb’s ‘evolutionary delivery’ or Evo, dates back to the 1980′s and is more comprehensive and powerful than most of its imitators. But who uses Evo? Who is talking about it today?

There’s something odd about a software culture that is so obsessed with novelty and technological determinism that it perpetually loses the knowledge of the past in an endless pursuit of the reinvention of the wheel. The race in the 2000′s to “out-agile” each other and distance ourselves as far as possible from any crusty old notions of “software engineering” in the flight from some phantom bogeyman of the “waterfall” has resulted in the neglect of a great deal of hard-fought knowledge and wisdom from the great systems engineers of the 1960′s-1980′s. It’s our loss. We’re forgetting things that are better than what we think we know now.

There seems to be an uneasy feeling amongst parts of the Agile community that they’re running out of steam, that there aren’t enough new ideas. I think that’s true, and that there’s a simple reason for it: they bet on the wrong horse. XP is the weakest of the name-brand Agile processes, and it’s a dead end.

I don’t know if the Kanban idea will prove to be important or not, but I don’t think it is a coincidence that the strongest expression of that practice is coming from the FDD community rather than the Scrum/XP community. FDD is a better process than Scrum/XP, it appeals to a higher caliber of developers, and it never had the luxury of complacency.

But if you really want to take a step up, you should read Tom Gilb. The ideas expressed in Principles of Software Engineering Management aren’t quite fully baked into the ADD-sized nuggets that today’s developers might be used to, but make no mistake, Gilb’s thinking on requirements definition, reliability, design generation, code inspection, and project metrics are beyond most current practice. And I sort of like the quirky presentation, because it forces you to put together the pieces for yourself, which you really ought to learn to do anyway. It’s more of a “patterns and practices of evolutionary delivery” book than a how-to.

Tom and Kai Gilb also have an excellent website over at http://www.gilb.com.

Comments (7)

Print This Post Print This Post

Email This Post Email This Post

Permalink

We can’t afford to trust everyone on larger teams

This is part 3 of 10 Pitfalls of Agility on Large Projects. In part 2, we talked about how effective small teams need coordination to make an effective large organization, and what to do about it.

When cycles get shorter and our teams become more empowered to react to change, one fear is that accountability will get lost in all those changes.

Specifically, when something goes wrong, what is the root cause? Are my people failing? our processes failing? our plans unrealistic? How can management learn how to head off these failures in the future, if we aren’t making commitments and measuring progress against them?

Step one is to take some of this pressure off — in fact, to embrace failure as a path to learning, and taking a statistical approach to making the most of it.

Like a pharmaceutical firm screening new compounds, or venture capitalist building a portfolio of investments — a manager in a high-risk domain needs strategies to spread the bets to maximize opportunity while minimizing overall risk. This is basically Set-Based Design (Toyota’s Set-Based Concurrent Engineering).

Software development, in particular, is a research and development activity suited more to this approach, and much less of a traditional production activity.

Step two is creating an environment with much more transparency — it’s not about trusting people to execute to plan, rather it’s about trusting people to be transparent about the true progress and status of the project, so that everyone can adjust accordingly.

One mechanism is a public kanban board like the kind Corey has been exploring on this blog (from work with David Anderson at Corbis). By watching the board over time, throughput of the team and bottlenecks within the team become clear.

An electronic version is important if there are people (dependent teams, remote teams, or upper management) that can’t huddle around the board.

 

Cumulative Flow DiagramA Cumulative Flow Diagram is an electronic alternative that can be a great way to both summarize the flow of value, gain visibility into the history, and see important management events (like estimation troubles, or WIP getting out of hand, or new priorities causing the plan to grow out of control). This CFD is again from David Anderson, as described in his 2004 BorCon presentation.

In a future post, we’ll look at a way to create and manage by CFDs, even when each kanban (or feature) is not similarly sized — this involves also collecting time data (which then has other uses).

And, of course, if rework and bugs are tracked separately (as they usually are today), then traditional bug charts are critical to management.

Should a small team of 4-6 developers with a strong process like Extreme Programming layer this kind of data collection on to their process? Probably not. But as teams grow to 15, 50, or beyond — this kind of transparency is critical glue to keep management and teams coordinated, even while allowing each individual and each small group to work on short cycles and be highly responsive to change.

On your projects, have you seen other forms of data collection that are both lightweight, keep everyone in touch with reality, and help build trust?

Comments (6)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Close
E-mail It
Socialized through Gregarious 42