Saturday, February 8, 2014

Trying to Understand Why Kanban Works

Recently, I came across a book chapter explaining Little's Law; published by Massachusetts Institute of Technology. This chapter is an excellent read which is simple and yet digs into the heart of Little's Law. Reading about queuing theory is provocative and makes me relate many of the already established ideas to Lean software and Kanban.

One of the issues which I found this book chapter explaining very well is the difference between Little's law in its original formulation (which considers the Arrival Rate as one of the formula parameters) and its application in manufacturing systems (which replaces arrival rate with throughput). Here is an explanation:

Little’s Law
Little's Law state that:
L = λ W
where
L = average number of items in the queueing system
λ = arrival rate of new items to the system
W = average wait time for an item in the system
John Little argues that this law is robust and generic and holds exactly to any queuing system given an essential condition; which is "to have a finite window of observation that starts [when the system is empty] and stops when the system is empty" (p.88). Moreover, Little provides a mathematical proof for the law along with many applications in reality.

Little’s Law in Software Systems
Let's jump into software and map these concepts to Kanban. In Kanban, this is how Little's Law is stated:
WIP = Th * CT
where
WIP (average Work In Process) = average amount of unfinished items (bugs, user stories, change requests, etc.) in the development system
Th (Throughput) = Team output in unit of time
CT (Cycle Time) = Average time it takes the team to finish one item
Two basic differences between the two formulas: The first one talks about input or arrival rate, whereas the latter talks about output rate or throughput. The second issue is the condition which Little stated: that the system should start with 0 items and end at 0 items. In software, we rarely witness a system which has no maintenance requests.

To resolve these differences, Little indicated a more subtle condition of the Law to hold, which is no items to go inside the system and get lost or do not get finished, which he calls “conservation of flow” (p. 93). If we apply this condition to the system, we can easily show that the input rate = output rate, and therefore, we can relate Lambda (λ) with throughout (th).

For the second condition (system should start and end in 0 items), Little argues that the law “still applies, at least as an approximation, as long as we select a time interval that is long enough”. (p. 93)

What’s useful about this Law?
Little’s Law is a very powerful tool to use for managers. If we have two parts, and we can instantly calculate the third.

Increase team throughput
If your capabilities are fixed and want to increase throughput, the only solution is to increase WIP, and increase the team size. If this is not doable, and your input rate is high and getting higher, you may decide to decrease the cycle time instead of increasing the WIP and this may involve automating the deployment process.

Stabilize Cycle time
If you are struggling to stabilize the process so that to meet some SLA, Little’s Law gives insight about what to change in the system. You may either increase/decrease with WIP or empower your team to meet a specific SLA.

Study behavior of specific request types
Little’s Law works for a sample of item in the system as well. You may zoom into the items in the system and study the dynamics of a specific segment (like high severity bugs, for instance).

Monday, February 3, 2014

Interesting quotes

Quotes that deeply influenced how I think!

“I hear, and I forget
I see, and I remember
I do, and I understand”
-- Ancient Chinese Proverb

“Leadership is the process of creating an environment in which people become empowered”
-- Gerald M. Weinberg

"When projects fail, it's rarely technical"
-- Jim Johnson, the Standish Group

Parkinson’s Law:
“Work expands so that to fill the time available for its completion"

"An approximate answer to the right problem is worth a great deal more time than a precise answer to the wrong problem" 
-- John W. Tukey

“Insanity is doing the same thing, over and over again, but expecting different results.”
-- Albert Einstein

“Two things are infinite: the universe and human stupidity; and I'm not sure about the universe.”
-- Albert Einstein

“If you can't explain it to a six year old, you don't understand it yourself.”
-- Albert Einstein

“Anyone who has never made a mistake has never tried anything new.”
-- Albert Einstein

“A clever person solves a problem. A wise person avoids it.”
-- Albert Einstein

“Everything must be made as simple as possible. But not simpler.”
-- Albert Einstein

“Failure at an organizational level seems to come  from the inability to customize processes and  make them their own. Trying to apply someone  else’s template to your organization directly  doesn’t work well. It leaves out too many  important details of the previous successes and  ignores your company’s specific situation. ”
-- Kent Beck Extreme Programming founder in a 2006 interview with InfoQ.com

"Nothing in this world was so powerful as an idea whose time has come"
-- Victor Hugo

"He who is good with a hammer thinks everything is a nail"
-- Maslow

"It seems that perfection is attained, not when there is nothing more to add, but when there is nothing more to take away."
-- Antoine de Saint-Exupery

"Leadership is the process of creating an environment in which people become empowered"
-- Gerald M. Weinberg

"We are being ruined by the best efforts of people who are doing the wrong thing."
-- Edward Demming