Monday 30 May 2011

Kanban


Kanban is a Japanese word that loosely translated means “signal card.”  Kanban’s underlying thesis is that by using signal cards at various points in the production process to indicate the amount of work completed, you can limit the amount of work in progress (WIP) and thus keep the system very “lean” and agile. Work in Progress (WIP) represents inventory and inventory is expensive to keep.
Kanban was originally developed at Toyota as part of the Lean manufacturing movement to facilitate pull systems in a just in time (JIT) production manufacturing process. Work is pulled through the system in single units by demand, instead of pushed in batches. Think Dell computer’s JIT assembly of your laptop as you order it; Dell is pulling a single unit through its production process on demand as opposed to pushing through a batch of computers and selling them pre-configured.
What is Best, Scrum or Kanban?
I have been thinking from some time now that what is best, Kanban or Scrum?. I can't make up my mind so I decided to write an article in two parts, one where I wear the "I love Kanban" hat and one where I'm wearing an "I love Scrum" T-shirt.


SCRUM
Scrum is about getting back to the time when the company was small, everything seems easy and run smoothly. Back then projects were small, teams were small, releases were small and communication was easy. Best of all, we were efficient.

In Scrum we split our big project into small projects as we work on time boxed iterations called sprints. We split our big team into small teams (still with all the skills we need) and launch often. If we are more than 20 employees we probably have a problem knowing what the other departments and customers are needing so let's bring someone into the team that can represent them. To help communications from the team to the rest of the company we have our plan and current status visible. The plan is called the sprint backlog and the status is shown on the scrum board. Here is an example:

The person we brought in to represent all stakeholders is called product owner and is responsible for prioritizing a list with features that will be developed for the product in the future. This list is called the product backlog.
To make Scrum a process we add some small but necessary meetings: a planning meeting, daily synchronizing meeting and meetings to improve product and process.  We decide the length of our iterations and aim to deliver something valuable after each iteration.


KANBAN
Scrum is simple but Kanban is even simpler. Just visualizing your workflow and limiting demand to capacity is enough to call it Kanban.

Let's start by looking at the roots of Kanban. It's a way, invented and used by Toyota, to get a good flow of parts to their plants. Kanban is just a card attached to the part and when the part is used the Kanban is sent as a request to the supplier for more parts. The physical card is actually sent to the supplier who is attaching it to the next pert sent. Since the cards are re-used and no new cards are entered in the circulation, Toyota limits the number of parts in stock and at the same time makes sure new parts are ordered as soon as they are needed.
In software development Kanban is a limited promise of work. A Kanban board is a number of placeholders for work to be done. A typical Kanban board can look like this. 
Each team has decided their limit and drawn as many squares as the limit allows them to. Whenever a task is done it will be moved to the next group if and only if they have free Kanban squares. Else the task is stuck. If there is nothing more to do we have a problem with the flow and we need to work together to solve what is stopping us.
While Scrum is focusing on delivering on commitment Kanban is focusing on getting a smooth flow.

In common for Scrum and Kanban
There are a lot of similarities between Scum and Kanban. Some examples are:
  • A strict prioritization (it's obvious what to do next)
  • Self-organizing teams (see below)
  • Transparency (show what you've done, your current status and what's next to do)
  • Inspect & adapt (improve your product and process based on facts)
  • Pull scheduling (see below)
  • Good communication and collaboration
Self-organizing teams is when the team themselves are supposed to figure out how to solve problems, remove impediments and optimize their process. They should base their decisions on facts to inspect and adapt accordingly.
Pull scheduling means the team is pulling work instead of having it pushed. This will limit work to capacity and lower stress, which is bad for both health and quality.

This is why I prefer Scrum
So, now that you know what Kanban and Scrum is, it's time to decide which is best. 

I start by putting the Scrum T-shirt on. Look further down if you like to read the part where I love Kanban.
I concentrate on some areas where Scrum and Kanban differ:
  • Iterations - In Scrum you work in iterations. Kanban sees development as a forever ongoing flow of things to do.
  • Commitment - In Scrum a team commits to what they will do during a sprint.
  • Estimations - In Scrum you need to estimate to be able to have a velocity. In Kanban it's optional since focus is on time-to-market.
  • Cross-functional teams - That's one of the pillars of Scrum. For Kanban it's optional.
Efficiency driven by commitment
By asking a team for a commitment they will get a positive stress knowing that people from outside will see if they can do what they committed to. It also gives an energy boost at the end of the sprint when the team has the goal within reachable distance. After the sprint, the team can feel relaxed and gather some new energy for the next sprint. It's psychologically nice to not feel you are in the middle of a never-ending stream of things to do. Instead Scrum concentrates on one sprint at a time and allows you to focus only on those things you have decided to take on in the sprint. By working in fixed length iteration you get a nice rhythm the whole company can feel and adapt to.

The value of estimating

Estimating is not a waste of time since valuable information is transferred from the product owner while the team asks what they need to know to be able to estimate. The same thing applies to commitment. To be able to commit team members need to know what they are committing to. They simply have more interest in getting information from the product owner so they listen more carefully. And they are just asking for the information they need which makes the meeting very efficient.

Even though you can predict when a project is done, just by counting stories left, it is more precise if each story is estimated as well. Prediction is important when more departments, like marketing, are dependent on your work. It gives a more serious feeling.

Slack at end of sprints
If there are some time at the end of a sprint that's valuable even if the time is not big enough to start developing new features. This is time developers can use to improve code quality or the development environment. Both will give better efficiency in the long run.

Build teams with cross-functionality

Working together in a cross-functional team is a psychological thing. You are able to go the whole way from concept to released product together as a team without dependencies. You are not just a cog in the machinery. It's also fun and helps you grow as a person. By helping each other, knowledge is spread which lessens dependencies on each person. It also helps prioritize since features can be built without considering which knowledge is available. To coordinate between people with the same skills who are sitting in different teams you can have virtual team meetings as often as needed.

Scrum is best for beginners

I know, you can do all those things even when doing Kanban but they are optional and since they are optional you might just not do them just because you are too lazy to challenge the usual procedures or structures of your company. If you are new to Agile development it's better to have a method guiding you to do the right things. Just read the book and implement it. Later when you get used to it you can start experimenting and eventually get better performance. If you start experimenting too early you might end up with waterfall or chaos but still calling it Agile. Kanban is more advanced because you need to make a lot of decisions without having many facts.

This is why I prefer Kanban
Now it's time to take off the Scrum-T-shirt and put on my "I love Kanban"-hat.

Kanban is based on Lean principles
Kanban is Lean and has been around for 50 years and has shown to be successful. Things are seen as a flow without iterations. Not many rules. It's just a focus on reducing work in progress, strict prioritization and limiting demand after capacity. Besides that you have the normal Lean principles of:
  • Quality
  • Just-in-time (decisions and facts just when they are needed)
  • Short lead-time (quickly from concept to cash),
  • Kaizen (continuous improvement)
  • Minimizing waste (everything that is not adding value to the customer)
No meetings if it's not adding value to the customer. Most of those things are fine with Scrum but I can sometimes think Scrum has some waste. Here I will mention some areas where Scrum practices might be waste.

Estimations might be waste
If a product owner knows what needs to be done and the only goal is to have it done as soon as possible, why spend time on estimating? In Scrum, estimations are needed for a team to know how much to commit, to calculate velocity and for the product owner to decide on prioritization. If none of this is needed, it's waste and we shouldn't do it. If you like to measure velocity you can instead count the number of stories done per week or month. While talking about measurement why not look at something the customers are interested in, lead-time. That is, the time it takes for the customer to get what he or she ordered.

Constant flow

If the team is done with a story and there is not enough time left in the sprint to complete the next, it's likely no one works hard the remaining time and that's waste. Kanban is trying to get a steady and non-stressed but high flow of work running through development.

Sitting with people that can help you
In Scrum a team is cross-functional and sits together with the people working with the same project and not with the ones with the same knowledge. Let's say you work with sound effects for a computer game. Then it's not much help to have a java-programmer beside you. It would be more valuable to sit with people doing the same things as you do who can help you with tools and practices.

No possibility to commit

In Scrum, the team commits which does not work very well for a team with support issues. They get a lot of disturbance and commitment is not worth anything since the ones disturbing them don't care about commitment. A commitment you can't control gives either frustration and stress or demotivation.

Kanban for support and operation teams

Support and operation teams are often interrupted. It's part of their job. Frustration comes when interruptions are happening just because there were no times for pre-emptive work. Just by having the pre-emptive work on the board gives focus to fix the hardest problems one-by-one, which gives less interruptions and more time to work pre-emptively. It becomes a good circle.

A Kanban board for an operation team can look like this:

Most important are the urgent problems that arise. Secondly, daily duties must be done. Then the team members can take care of other projects, usually to improve stability in the operation environment. The limitation on the number of parallel tasks gives focus to be done working on improvements, not just starting them.

Many options gives freedom
Kanban is simple with few constraints, which gives you freedom to change your process step by step. Either you go from waterfall or chaos, your first step is to visualize and limit your flow with a Kanban board. When you have your flow visualized you add whatever work is needed to thrill your customers. Your improvements might be decided during a monthly retrospective meeting or on a daily meeting.

The workflow

A direct consequence of this difference in rules is the way the work items are handled across time.
In Scrum, you select the work you'll be doing for the next sprint beforehand. You then lock the sprint, do all the work, and after a couple of weeks - the usual sprint duration - your queue is empty.
Typical flow of a Scrum process

In Kanban, all that's limited is the size of the queues, called the Work In Progress limit. This means that you can change the items in the queues at any time, and that there's no "sprint end". The work just keeps flowing.
Kanban flow, with a WIP limit of 3 for the Todo, and 2 for the Ongoing.

No comments:

Post a Comment