Introducing Kanban, Flow, and Cadence
Learn a little about Kanban, Cadence, and Flow.
Join the DZone community and get the full member experience.Join For Free
there has been some noticeable increase in interest in kanban recently, with a number of people asking for more basic info, and more people writing new blogs and articles. this is my attempt to describe in more detail my take on it all, which i refer to as kanban, flow and cadence.
- kanban – controlled work
- flow – effective work
- cadence – reliable work
a kanban system is a mechanism for controlling the work in the software development system. kanban can be defined as “visual card”, as shown below – kindly written for me by kenji hiranabe at agile 2008.
the origin of kanban is the toyota production system. taiichi ohno, in his book toyota production system, wrote:
“the two pillars of the toyota production system are just-in-time and automation with a human touch, or autonomation. the tool used to operate the system is kanban.”
kanban is what enables a pull system for just-in-time work.
what does a kanban system look like for software development? very simply, there is a queue of work, which goes through a number of stages of development until its done. when work is completed in a stage, it goes into a downstream queue for the next stage. when someone needs new work to do, they pull it from their upstream queue. this can be depicted as below.
that looks very like a typical agile task board, with maybe a few more steps, although there is nothing to say there can’t be a single development stage. however, there is one more important element which really defines a kanban system – limits. there are two basic limits – queue limits and wip limits.
queue limits are designed to avoid premature work. this how just-in-time is achieved. the limit should be large enough to keep the team busy (i.e. there is always something in it for the team to start work on), but small enough to avoid premature prioritisation (i.e. having things sitting in the queue for too long before they are begun). ideally the queue should be fifo, although this is a guideline rather than a hard rule, as sometimes available skills or other resources mean that it is not always possible.
work in progress limits are designed to reduce multi-tasking, maximise throughput, and enhance teamwork.
reducing multitasking is beneficial for two primary reasons.
1) 20% time is lost to context switching per ‘task’, so fewer tasks means less time lost (from gerald weinberg, quality software management: systems thinking)
2) performing tasks sequentially yields results sooner. as the diagram below shows, multi-tasking a, b and c (on the top), delivers a much later, and even c slightly later, than sequentially (on the bottom).
a great exercise to demonstrate the effects of multi-tasking was described by clarke ching .
throughput is also maximised by decreasing wip. simple examples of this effect are traffic jams, where traffic speed reduces as more traffic builds up, and cpu load, where application performance goes down as cpu load increases. the effect can be be explained by looking at little’s law for queuing theory:
total cycle time = number of things in progress / average completion rate
therefore, to improve cycle time there are two options; reduce the number of things in process or improve the average completion rate. of the two, reducing the number of things in progress is the easier, and once that is under control, then the more challenging changes to improve completion rate can be applied.
finally, by having fewer work items in progress, then the team is able to focus more on the larger goals, and less on individual tasks, thus encouraging a swarming effect, and enhancing teamwork.
limiting work in progress like this can seem unusual for teams, and there is often a worry that team members will be idle because they having no work to do, but are unable to pull any new work. the following guidelines can be useful to help in this situation.
- can you help progress an existing kanban? work on that.
- don’t have the right skills? find the bottleneck and work to release it.
- don’t have the right skills? pull in work from the queue.
- can’t start anything in the queue? is there any lower priority to start investigating?
- there is nothing lower priority? find other interesting work.
they key question here are what constitutes lower priority investigative work or other interesting work. essentially it is work which won’t create any work downstream, will improve future throughput and can be paused as soon as existing kanban related work is available. lower priority work could be spikes or analysis for known impending work. other interesting work could be refactoring, tool automation, personal development or innovation.
wip limit sizes can depend on type of work and size of team and should be adjusted to achieve maximum flow. one approach is to start small (e.g. a limit of 1) and increase as necessary. another is to start larger (e.g. a limit of half the team size) and reduce until the sweetspot is achieved.
the consequences of using a kanban system are that the product backlog can be eliminated, because the immediate queue is the only work of interest, timeboxed iterations (i.e.sprints) can be eliminated, because work is pulled as necessary, and estimation can be eliminated, because work is not planned into iterations.
flow describes how the work in the system can delivery maximum value. as mary and tom poppendieck write,
“in lean enterprises, traditional organizational structures give way to new team-oriented organizations which are centred on the flow of value, not on functional expertise.”
in particular, lean emphasises ‘one piece flow’. this means moving one piece at a time between stages in a workflow as opposed to moving batches of work between stages in a workflow. the ‘one piece’ in a kanban system for software development can be thought as the minimal marketable feature, as described by m denne & h cleland-huang in software by numbers.
“a minimal marketable feature is a chunk of functionality that delivers a subset of the customer’s requirements, and that is capable of returning value to the customer when released as an independent entity”.
the kanbans should be minimal so that they are as small as possible in order to enable progressive delivery to realise the product sooner, reduce feature bloat and focus on the the core features which are the most important, and minimise complexity because each feature has a cost to a user.
the kanbans should be marketable in a number of ways.
- table stakes – these delivery parity to the competition and are the minimum needed to be in the game
- differentiators – these differentiate the product from the competition and delight the user
- spoilers – these nullify a competitors differentiator and raise the bar for parity
- cost reducers – these reduce cost and improves the profit margin
a useful guideline is that an mmf is marketable if it is something that could be written about on a product blog.
the kanbans should be features which are distinct, deliverable and observable. the invest acronym (independent, negotiable, valuable, estimable, small, testable) as described by bill wake , can also be useful for applying to mmfs.
the marketable element of mmfs means that they may sometimes be larger than typical user stories, which often break work down such that while they can be incrementally delivered, and show some element of value, they are not marketable in their own right. therefore, it is important to understand an mmfs value stream in order to deliver the whole mmf as quickly as possible. a value stream describes the steps, delays and information required to deliver a product, and can often be used to decide the steps in an initial kanban system. with large mmfs, the user stories become more of an analysis technique in order to enable incremental delivery of an mmf, without losing sight of the overarching mmf. i describe how a continuous flow can be achieved with mmfs in the anatomy of an mmf .
a number of techniques can help manage the relationships between mmfs and user stories in order to realise the benefits of both. one is user story mapping, as descried by jeff patton .
i have also recently been working in a regulated environment where user case goals and sub goals have provided the mmfs, with the detailed scenario paths and steps providing the additional details.
a further enhancement is to use two-tier kanbans, with one tier for the mmfs, and another for the user stories.
the consequence of applying the concept of flow is that emphasis is placed on using larger, value-focussed mmfs, rather than smaller, more incremental stories.
cadence is the approach to achieving commitment and reliability with a kanban system. i often get a question something along the lines of,
“if the team isn’t estimating or planning with fixed time-boxes, how can it make reliable commitments?”
to quote mary and tom poppendieck again,
“a regular cadence, or ‘heartbeat,’ establishes the capability of a team to reliably deliver working software at a dependable velocity. an organization that delivers at a regular cadence has established its process capability and can easily measure its capacity.”
the time-boxed iteration is one form of cadence, which couples planning, review and release together. a kanban system de-couples these events and allows them to have separate cadences, as well as adding two additional ones. throughput is the amount of output of a process in a given period of time, and cycle time is the length of time to complete a process. the relationship between the two is:
throughput = wip / cycle time
throughput allows forecasting of future capability, without needing to specify what might be delivered. cycle time allows commitment by becoming an sla with the business (see kanban commitment ). where the size of work varies, from large new features to small fixes and change requests, then a classification of mmfs can enable a range of cycle-times. both throughput and cycle time can be charted and trended, in a similar way to xp’s velocity, as a means to encourage the team to improve. a cumulative flow diagram can also make visible how the work is flowing through the system and highlight bottlenecks.
for longer term forecasting, a quarterly planning cadence focusses on quarterly goals and objectives. mmfs can subsequently prioritised to meet those goals and objectives. a regular release cadence will build up trust that the team will work to its full capacity and throughput.
other cadences, are daily stand-up meetings, and regular retrospectives and operations reviews as described by david anderson . some teams are using a retrospective kanban to signal when a retrospective is necessary, and i have already blogged briefly about kanban and retrospectives .
the consequence of cadence is that commitment and reliability is achieved though measurement as opposed to planning.
they key points of kanban, flow and cadence are:
- a kanban system manages the workflow in a way which allows the product backlog, timeboxed iterations and estimations to be eliminated.
- flow is about effectively delivering maximum value by focussing on optimising the value stream of larger mmfs
- cadence allows iteration input and output to be de-coupled and achieves commitment and reliability via measurement rather than planning.
further resources and information can be on my kanban page , including most of the material which has influenced and directed my thinking.
Published at DZone with permission of Karl Scotland. See the original article here.
Opinions expressed by DZone contributors are their own.