How do you decide what you're going to do (or drink) first?

How do you decide what you’re going to do (or drink) first?

Deciding which piece of work should be done first is a vexing question of any organization. Every organization finds a set of tools to help sift through the portfolio of possible projects. In organizations without some form of central portfolio control, each department or team may have its own set of criteria to decide which job to do first. Techniques for prioritization that I have seen in action range from ‘the squeaky wheel’ to a highly detailed cost-benefit analysis. One method that I was initially exposed during SAFe training was the weighted shortest job first (WSJF).

WSJF begins with the cost of delay. Cost of delay (CoD) is a method of placing a value on the waste inherent in delay. There are any number of factors that can (and often should) be included in the cost of delay. These include wait times, inventory costs and opportunity costs. Once the CoD has been estimated, the time to complete the work (also known as duration) is used as a weighting mechanism to differentiate between projects.

Donald Reinertsen, in his book The Principles of Product Development Flow: Second Generation Lean Product Development, provided an example that showed that if the cost of delay was the same for two jobs, you should do the shortest job first. One way to conceptualize this is that by doing the shortest job first you would avoid at least some cost of delay and deliver value sooner. Here is an example:

CoD per day                          Time to Complete

Work Item 1                          $100                                          1 Days

Work Item 2                          $100                                          2 Days

Work Item 3                          $100                                          5 Days

Doing the work item 1, then 2 and then 3 (shortest to longest) would mean 0 cost of delay for item one, $100 CoD (1 day X $100 ) for item 2 and $300 CoD (1 day +2 days X $100). A total of $400 in CoD would be incurred. Compare the doing the earliest job first to the doing the work in the opposite order (longest to shortest).

Work Item 3 – Zero CoD Accrued

Work Item 2 – $500 CoD (5 days x $100)

Work Item 1 – $700 CoD (5 days + 2 days x $100)

$1,200 in CoD versus $400 . . . I know which order I would choose.

Obviously things are typically messier with estimates of CoD and time to complete. SAFe uses the size/time to complete attribute as a weighting factor to identify the weighted smallest job (so that it can be done first). The calculation for weighted shortest job first (WSJF) is CoD/Duration. Her is an example:

CoD per day                          Time to Complete             Weight

Work Item 1                          $100                                          25 Days                            4

Work Item 2                          $ 75                                            30 Days                           2.5

Work Item 3                          $600                                          3 days                               200

The order of completion would be work item 3, then 1 and then work item 2. The total CoD accrued would be $2,428.

Prioritization is difficult, and as a result there are any number of techniques to approach prioritization. WSJF allows you to prioritize units of work using the lean concept of cost of delay and duration/time to complete, giving you a consistent economic framework. Consistency and repeatability means that logic and fairness drive which work is done in what order. Without a framework it is often the squeaky wheel that gets the grease, and who knows what is squeaky will deliver the most value.

 

Aging is good for scotch, not for software development.

Aging is good for scotch, not for software development.

Lean is the systematic removal of waste within a process, known as muda in Japanese.  Delay is often one of the predominant forms of waste in any process. Cost of delay (CoD) is a method of placing a value on the waste inherent in delay. In manufacturing or other industries, the cost of delay is often obvious. Simple examples of the CoD might include the cost of warehousing incomplete items or holding stock in that room of a store that is waiting where it can’t be sold. In software development the concept CoD is not as easy to see, but no less real. In software development (including development, enhancements and maintenance) CoD is generally conceived as a measure of the reduction in value caused as work sits when it is not completed. Delay is the time a unit of work is not being actively being worked on. For example, if it takes a day to write and unit test a piece of code and then that piece of code has to wait a month to be tested then delay is measured as one month. The total delay can be determined by summing total time the unit of work spends sitting around until it gets to a point where the final user of the software can actually use the it! Conceptually CoD is similar to financial techniques like Return on Investment and Net Present Value (NPV). NPV normalizes benefits and costs in the future based on a discount rate (such as the presumed interest rate over the period or the organization’s internal rate of return). Simply put, a dollar invested at ten percent interest today will be worth more in a year than the dollar that sat waiting to be approved to be invested for 364 days. The difference in value is the cost of delay. Delay can generate cost many ways including:

Delay to gaining value: Until a unit of work is delivered, it can’t be used. For example, when we discussed Test Driven Development we define the following user story:

As a beer logo glass collector, I want to be able to log a logo glass into my collection so I do not recollect the same glass!

If this story was completed, but implementation of the story was delayed a week and I bought a duplicate glass for$5.35 (including sales tax) during the delay, the tangible cost of delay would be $5.35.

Opportunity costs: In the example above, if I had the $5.35 in my pocket I could have done something else with it. While this might be considered an intangible cost, if the $5.35 had been invested in another value generating asset or feature, the cost of delay can be quite real.

Value of a feature decays over time: In most organizations being first to market with an app or feature is viewed as valuable. The value is often couched in terms of market share or the ability to charge a premium. Being late to market can often be difference between success and failure.

The concepts of delay and the cost of delay generates a focus on queues (where work sits while waiting to be worked on) and speed to delivery. In general, the faster a story or feature can be delivered, the faster the organization can begin to accrue the inherent value. Understanding the CoD provides data to understand the trade-offs between starting one thing and then waiting to deliver and starting and completing something else instead. If we assume that the work we are doing has value if it is completed then then letting it sit around and age generally doesn’t make sense unless we are making cheese or wine.