June 2009

CONWIP systems

Part 2 of Patterns of Software Engineering Workflow

The simplest kind of kanban system is the CONWIP system, for CONstant Work In Process.  The simplest kind of CONWIP system is no more than our fundamental kanban element:

kanban

The simplest CONWIP cardwall is a classic Agile cardwall with a limit on work-in-process:

conwip

An equally intuitive interpretation of CONWIP defines capacity simply as the number of people available to work, so that each person is the kanban:

manban

CONWIP is a rule about work items, not a rule about workflow.  We are free to define any workflow we like as long as we observe the global limit.  This can be a helpful approach when we want to observe the flow of work, but expect a lot cycling between states, perhaps in an exploratory design mode:

conwipworkflow

The earliest Scrumban design was just such a CONWIP workflow, which we can represent directly in a simple cardwall.  Here we have no limits on any specific column, but the total number of work items is limited by the yellow kanban cards, which are returned to the “Free” box when the task they contained is complete:

conwip_workflow

Breaking out a workflow implies a sense of sequence.  If there is no real sequence, we could define a global “busy” state and reduce specific activities to a checklist.  Exposing the workflow to visual control might suggest a need to level resource utilization or that we value reducing backflows as an improvement goal.  Pooling the WIP limit suggests that the visual control is enough feedback to help the team achieve leveling.  My personal preference is to work in this way where possible.

If a person can be the kanban, then how about a pair? If we combine pairing and kanban with a workflow or checklist, then we get something like Arlo Belshee’s Naked Planning:

I think the most interesting kind of CONWIP system is the Bucket Brigade. Everybody is allowed one card at a time, which can either be moving upstream or downstream. People can either pair (at the cost of some queueing) or work solo as much as they prefer. Constant WIP, zero queueing, full utilization, soft specialization, balanced workflow…what’s not to love?

The model can be edited and simulated in PIPE2.

If we can assign tasks and limit work by pairs, then why not do this with whole teams? That is essentially the approach of Microsoft’s Feature Crews with their quality gates.

Some value streams are too long or too complex to effectively manage with a single WIP limit.  Many development teams exist within some larger organization that requires coordination between teams and competition for resources.

Where do features come from?  Smaller shops may interact directly with the customer, but larger shops may have a more complex process for dealing with a large number of customers or with highly sensitive customers. If we peer inside the black box of the Product Owner, we might discover a whole team of people working to understand customers and define requirements: business analysts, product managers, usability researchers, product designers. Work-in-process on the business analysis side can just as easily go off the rails as development work.  Have you ever seen an epic requirements specification or a bottomless product backlog and wondered where it came from?  Your product owner might represent another group of people who feel pressure to produce and look busy.  Value stream thinking encourages us to take an interest in what those people are up to and why.

Where do features go after we’ve built them? A large enterprise may have complex deployment requirements that involve integrating code into a manufacturing process or provisioning a datacenter. This work probably involves a different team than the development team, but they are still part of the value stream and their throughput affects everybody.  Operations teams often have to deal with long lead times and different natural batch sizes than the development teams that feed them.  Each group can benefit from understanding the status and availability of the other.

A small team may be able to self-regulate with visual control, but a long value stream may need more explicit control. Kanban gives us an easy solution by chaining together pooled segments. Within each segment, we manage by visual control, but between segments, we manage by kanban:

pooled_wip_pn

CONWIP systems allow us to regulate team workflow with a lighter touch.  Pooling kanban across closely related functions and zooming out by one level of scale makes it easier to think about using kanban to manage large systems.

Comments (3)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Guest articles at Shaping Software

J.D. Meier is hosting a couple of introductory articles on Lean software development on his Shaping Software blog.  I admire J.D. not only for his prodigious writing and encyclopedic knowledge, but also for his insatiable curiosity and practical wisdom.  A true methodologist.

Introduction to Lean Software Development

Patterns and Practices of Lean Software Development

Comments (2)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Daily nuggets

Domain knowledge (problem and solution) is the raw material from which information systems are constructed–the source of the value stream.  Well, that and computers.

The software development pull system representations we have seen so far are not the end.  There will be a good deal more evolution of that line of thinking.

Comments (0)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Patterns of software engineering workflow (part 1)

Part 1 of a three-part series

Any kanban-controlled workflow system can be described by combinations and variations1 of a basic pattern:

kanban

Sometimes we can simplify the diagram by replacing the kanban backflow with a simple capacity parameter2, but often it is better to show the flow of kanban explicitly.  Many of the software development kanban systems we’ve seen are simple workflow systems composed by chaining this basic element:

workflow

I would like to think that any professional software engineer would be able to think up more interesting workflows than just a linear cascade.  Then again, I would also like to think that any professional software engineer would understand the value of keeping things simple.  I have personally come to prefer a more symmetrical call-stack style of flow for software development, because I believe that any person who requests custom work should also be responsible for approving the completion of that work. Consumers pull value from producers, not the other way around:

symmetric-workflow

Petri nets are ideal for describing workflow systems because they are a) concurrent; b) formal, simulable, and sometimes even verifiable; and c) relatively easy to read by humans.  Any Petri net that can be drawn without crossing edges can easily be made into a “card wall” for visual control3:

cardwall

Sometimes a different workflow is needed, depending on the kind of thing being made:

or-branch

Some tasks can be done in parallel by specialized resources:

and-branch

When we split tokens, we may need to keep track of their common ancestor so that we can merge them again.  Colored Petri nets let us associate composite work items across branches:

color

Sometimes a large work item can be decomposed into smaller work items of a similar type.  We might think of a branching workflow to model this, but that is hard to do if we don’t know how many component work items will be created.  Petri nets allow us to take another approach by generating new tokens in-place and then executing them concurrently on the same workflow branch:

decompose

When all of the unit work items are complete, they are integrated into their parent work item:

compose

While that might look a little complicated, in practice it’s as simple as the “2-tier” style (or n-tier) cardwall that is often used for project management:

cardwall2

A state transition is a black box that may have some internal process.  We might expose that process with a hierarchical model.  Alternately, we might want to collapse extraneous diagram detail into a single supertransition.  Hierarchy is a simple syntax extension to any workflow model.

Feedback should be considered implicit to any creative process, but it can complicate these models without much benefit to understanding4.  In practice, kanban systems regulate feedback very well, because the limits serve as a ratchet function that gracefully responds to feedback and damps oscillation.  A process operating at capacity will not accept new work, and a process operating over capacity will also not accept new work.  Again, it’s awkward to model “over capacity” so we have to be mindful to treat our models for what they are: models.

Once we understand some of these basic design elements, we can use them to describe or design a wide variety of product development processes.  A computer scientist armed with Petri nets and a bit of knowledge about queueing, networks, and processor scheduling has some wicked tools at his disposal for Value Stream Analysis.


1. Some variations involve rules about queue placement and timing of the kanban backflow. GKCS and EKCS are examples in the literature. I wrote about some of that here.
2. Whether or not you can simplify in this way depends on which queuing rules are used.
3. I debated using the blink tag for this point.
4. You can usually cheat by adding an “escape” transition to send all feedback to the beginning of the model and allow it to repropagate downstream without friction.  Feedback is easier to account for in matrix representations than in graphic representations.  Feedback in a dependency matrix looks like row elements or “rabbit ears” on the “wrong” side of the diagonal.

Comments (18)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Make a place for good things to happen

Motherhood and apple pie

A staple of software engineering research is the effectiveness of design reviews and code inspections for discovering defects.  Methodologists love inspections, but they seem to be difficult to sustain in practice. I’ve seen a few typical reasons for this:

  1. Inspection is a specific skill that requires training and discipline.  Naive, unstructured “code review” is worse than useless and eventually self-destructs.
  2. Inspection is quick to be dropped under acute schedule pressure, and slow to restart as a habit once it has been broken.
  3. Inspection works well for frequent small batches and badly for infrequent large batches.

Reason 1 is a matter of skill, and can be solved with education.  Reasons 2 and 3 are process issues.

The “inspection gap” illustrates a curious aspect of human nature.  There are certain behaviors that a group of people will agree should be practiced by its members.  Individual members of the group, when asked, will say that they believe that members of the group should practice the behavior.  But then, in practice, those same individuals do not practice that behavior or practice it inconsistently.  If you point this out to them, they may agree that they should do it, or even apologize for not doing it, and then continue to not do it anyway.

In my mind, this is a good part of what Lean thinking has to offer.  Lean methods like Visual Control recognize this aspect of human nature and provide people with enough structure and context to act in a way that is consistent with their own beliefs.  If people using a Lean process agree that code inspections are a good idea, then it will not be hard to get them to agree to incorporate inspections into the process in a way that is hard to neglect.  Lean strives to make it easier to do the right thing than do the wrong thing.  Lean helps people align their actions with their values.

Checklists

One practice that works well in most workflow systems is the simple checklist.  Human attention is a delicate thing.  People get distracted, make mistakes, and overlook things even when they know better. A checklist is a simple device to keep your intentions aligned with your actions. Doctors who use checklists deliver dramatically improved patient outcomes.  Would you get on an airliner with a pilot who didn’t use a pre-flight checklist?  Would you get on an airliner controlled by software that was written without using checklists?

Checklists and kanban are highly complementary because you can attach a checklist directly to a kanban ticket and make the checklist part of the completion transaction.  Checklists improve confidence and trust, and expose tacit knowledge.  Checklists relieve anxiety and reduce fear.  Can you think of any part of your development process where you’d sleep better at night knowing that all of the important questions were answered correctly by somebody you trust?

Workflow

Checklists work well for individual activities that do not require specific sequencing, but they don’t work as well for activities that require collaboration from people who have competing commitments.  We can raise the stakes for everybody if we elevate our checklist item to the workflow and subject it to the pull discipline.  That makes your problem everybody’s problem and gives your peers sufficient incentive to collaborate.

Inspections are a typical example at the scale of a single developer, but there are other practices and scales that we might consider.  Failure Mode and Effects Analysis (FMEA) is another highly effective technique that many people agree with in principle but find difficult to implement in practice.  FMEA is a systemic method and often targets components or subsystems that are much larger than “user story” scope .  Security lifecycle and regulatory compliance activities may also fall into this category.  An advantage of using composite workflow is that you can schedule activities that apply to different scales of work.

Process retrospectives can also be attached to workflow in this way.  Compared to a more open-ended periodic retrospective, a workflow-bound retrospective asks a more specific question:  How could we have created this work product more effectively? Such a workflow-based retrospective directly implements Deming’s Plan-Do-Study-Act cycle.

Are there any practices you would like to see your team use consistently, but have trouble fitting in to your schedule?

Comments (3)

Print This Post Print This Post

Email This Post Email This Post

Permalink

Close
E-mail It
Socialized through Gregarious 42