Category: Lean


Too Much Work in Process?

credit: Richard Smith via Flickr

Creative Commons  Credit: Richard Smith via Flickr

Does your team’s burndown chart look like one below, where a small number of stories accepted during the first part of the Sprint and then acceptance rate hockey sticks towards the end of the Sprint?  In the graph, you can see that acceptance rate is less than 10 story points (the green bar) for the first 14 days of a 21 days Sprint.  And then it gradually rises to 20 and rockets up in the last 3 days.  This graph  is for a Scrum team that follows a 3-week Sprint duration.

 

Iteration Burndown Chart

Iteration Burndown Chart

 

 

Or represented a different way, here is team’s cumulative flow diagram from the same Sprint.  Note, the team, within first 3 days of a 3-week Sprint, has put 46 out of 66 story points in play?

Cumulative Flow

Cumulative Flow

Does your team see any ill-effects with taking on too much work in process?  Does the testers on the team get squeezed trying to jam through 40-60 hours work effort into the last 1-2  Sprint days?  Are they compelled to make risk-based testing decisions?  Does your team, despite its best intention end up cutting corners by writing crappy code, carrying over defects and accumulating technical debt?

Does your team put in overtime to complete all the in-flight stories during the end of the Sprint?  During your story demonstrations, does your team leave your Product Owner disappointed, because it can’t accomodate simplest changes and force her to write new stories in the backlog to cover minor changes?

If your team activity resembles these charts, or encounters some of these symptoms, it is possible that it is taking on too much work in process (WiP).

 

Little’s Law and Queuing Theory

Let’s do a quick review of queuing theory and something called Little’s Law as formulated by John Little.  Little’s Law is expressed using a simple formula:

L = λW

Here,

L =average number of items in the queuing system,

W = average waiting time in the system for an item, and

λ =average number of items arriving per unit time

 

Sometimes, Little’s Law is also restated as: CT = WIP/TH.

Where, CT = λ = cycle time, for the average time when an item enters a system to the time it exists a system; WIP = L = work in process, the number of items in a queue and TH = W = throughput or the average output of a process.

It follows from this that the size of your queue is directly proportional to your throughput.

So, if you are trying to improve your cycle time, like how fast a story is accepted, then you have two options:

a)     Improve the throughput of your process/system

b)    Decrease the average number of stories you work on simultaneously (the WIP in the equation – the queue)

Typically, throughput is a measure of productivity and may largely depend on a team’s skillset or on the system the team operates in.  To make productivity or structural changes take time.  For example, a team might realize they can get more efficient by putting in place test automation and save time as compared to manual testing.  However, a team may not have anyone on the team with test automation skills.  So, it will need to acquire those skills, which means, a team member will need training, and then learn to implement test automation.  These activities take time.

Or say, your team needs to promote code to the staging environment as a part of your story acceptance criteria.  But, to promote code you need a deployment resource from the release team.  And if this resource is shared between few teams, as is typical, it would mean systemic wait time, till the resoruce is available to complete the task.  You can decrease this wait time by: 1) get a deployment resource dedicated to your team, who can do code promotion; 2) have a team member acquire those skills; or, 3) if you have someone with those skills on the team, lobby for changes to department policy that requires that only a deployment engineer can do deployments to staging environment.  To implement any of these  options will take some time to put in place.

So the best lever a team has, to decrease cycle time, is to decrease the average number of stories they work on at any given time.

 

 Why is Less WiP Better?

Queues are all around us: traffic during morning and evening commute, waiting for a restroom at a ballpark during half-time, a doctor’s office, waiting at a grocery checkout counter, and many more.  In lean terms, queues are considered inventory and inventory represents waste.  And I am sure when impateintly wait in a line, we can attest that it is a waste of time.

With Scrum, you are already working in delivering working software more frequently compared to traditional methods.  So, many Scrum teams may not even care that within the Sprint boundary, there is too much WiP.  Besides, Agile principle only states, “deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale”.  But, nowhere does it say, reduce your WiP even further.

Or it could also be that teams prefer higher WiP to provide them with that extra impetus to complete their work as the  Sprint-end deadline approaches.  Or a team doesn’t mind putting in extra overtime during the last week or last few days of the Sprint.

But, I suspect many teams and team members want to achieve realistic and sustainable pace in meeting their Sprint goals.  They are motivated in getting constant feedback with their business partners or POa by showing working software, early and often.  And they don’t want to systematically sucuumb to bad quality or crappy code.

As a matter of fact, Rally Software (Disclosure: I am Rally user), which conducted empirical analysis on teams and summarized their findings in The Impact of Agile Quantified (Note the paper is behind an free access wall).  They found that teams that aggressively control WiP, cut their time in process in half.  And those that control their WiP, have 4 times better quality compare to teams with the highest WiP.  So if faster feedback (or faster time to market) or higher quality is desired, it pays to lower your WiP.

But, note that there is an optimal WiP for your team.  If you push your WiP too low, you can lower your productivity.  It was found that teams with very low WiP (0-2 WiP) had lower throughput.  So there is certainly a balance that needs to be struck between too much and too little WiP.

 

Ways to Decrease WiP.

Generally, if your team uses some Agile Management software, they probably have a built in report that can show your team’s Cycle/Lead Time.  Once you know the Cycle/Lead time, you can start setting up targets to decrease the WiP.  So for example, if your team’s cycle time is 10 days, and your Sprint backlog is 10 stories.  Your team might decide to set a target of starting with only 5 stories, get them designed, analyzed, developed and tested.  Review the stories with the PO, get feedback, and get them accepted and move on to next set of stories.  This is the basic concept of Scrumban, melding the Kanban practice of controlling WiP within the Scrum framework.

In order to lower your WiP, each team will have to experiment to see what works best.  Here are some potential things to try:

  • Work with the PO to de-construct features into smaller stories during Backlog Refinement meetings so that they can be potentially completed within a week.
  • Set a team agreement on having only X number of stories in-progress.
  • Set general guidelines on how to “swarm” when team WiP limit is met.  For example, if WiP limits are met, an idle team member could: 1) help take up task on existing WiP story 2) pair up with someone to learn skills of a constraint skillset 3) Refactor code or test automation code 4) Swat down defects, 5) improve autoamted test coverage.  Have team members “swarm” on a few stories, instead of trying to put all work in play.

As you try to limit WiP, even with the above swarming guidelines, you will find that some team members might idle.  And it will feel counter-intutive.  But, you are not trying to achieve optimal efficiency at an individual level, but at a team level.  If you manage to lower WiP, the team will see that it cycle time is improved, quality is better, feedback loops are tighther,  there is less risk in meeting Sprint goals, and potentially a team will acheive more sustainable pace, experience less volatile team velocity.

Reduced to soundbites the lower WiP mantras are:

Don’t WiP it, Ship it.

Stop Starting, Start Finishing.

 

References:

Paper on Little’s Law with few examples:  http://web.mit.edu/sgraves/www/papers/Little’s%20Law-Published.pdf

Poppendieck, Tom and Mary, 2007, Implementing Lean Software Development: From Concept to Cash,  Addison-Wesley Professional.

 

Advertisements

I have been revisiting the Popendiecks’ 2003 book: Lean Software Development: An Agile Toolkit.  One of the tools in the book is Set-Based Versus Point-Based approach.  This tool is based on Lean principle of amplifying learning. 

Point-Based approach is based on choices.  The authors represent this via the following an illustration:

 

 

Whereas, Set-Based approach is described as one about “constraints, not choices” and that it requires “significantly less data to convey far more information.”

I inadvertently stumbled on an opportunity to try out this tool, exactly in the way it is described in the book.  While facilitating a community of practice which has 9 team members, I had a need to schedule a meeting.  But, since we all work on different teams, coordinating simple schedules for this part-time effort is usually a challenge.  It would be simple to see everyone’s calendars and schedule a meeting.  However, many people don’t keep their calendars up to date.  Or they have blocked off time, but are actually available.

Even during face-to-face meeting, since people don’t have their schedules in front of them, they are reluctant to commit.  So it becomes hard to converge on a time.

My initial instinct was to use the point-based approach by letting everyone know the best time that worked for me.  But I decided to try the set-based approach.

Here is how I communicated the constraints via email to all the team members:

  • Apart from me, one particular team member needed to be present, as she had the key information on the topic
  • Additionally we needed 2-3 more team members
  • I provided 2 blocks of 2 hours each that I could meet for an hour long meeting

And lo and behold, within few minutes, I got the needed response.  What had in similar circumstances took a flurry of emails, and still no convergence; with this approach, we converged on time with just 1 email each from the team members.  Few let me know which time worked, others let me know they weren’t available.  And I was able to quickly pick a common hour that worked for half the team to meet.

It was great to see the tool in action.  Next, I am keeping my eyes open to use this on a development project.

%d bloggers like this: