Value Team Heuristics and use of Story Points when forecasting

When it comes to estimation in Software development, the difficult question to answer is when can we go to market? and when can we release the product or service? These are difficult questions, both from the business perspective as well as the development perspective.

There has been a lot of conversation in the agile community around User Stories and use of Story Points to size the product backlog items. What is often lost when teams adopt this technique is the value of team heuristics, as in team experience and the importance of relative sizing.  These put together and followed with some discipline allow the team with the ability to forecast – as in over discrete periods of time, sprints,  express an ever accurate answer to the questions:

How much by this date?

or

All this by when?

If no one is asking these types of questions at the end of each sprint then you may be in danger of falling into the cargo cult scrum trap, as in following a ritual of sizing product backlog items for ritual sake.

So what does heuristics really mean?

In a nutshell heuristics refers to experience based techniques for problem solving, learning and discovery, one which is good enough approach to finding an answer, where the perfect answer is not knowable or would be too expensive to learn.

So, if you are familiar with how most sciences work, you have probably encountered the use of  heuristics before. For instance, rather than predicting exact ratios of chemicals for a reaction, chemists use heuristics as guidelines in predicting how various chemicals will react. Similarly in engineering for instance aircraft designers use heuristics by considering coefficients of lift and drag to point them in the right direction, with the design empirically refined based on experimental evidence.

In essence to answer either of the questions stated above there is a heuristic alternative to the careful reasoning that occurs in the long cycles of phased approach in gathering requirements, analysis, design, development and test. This heuristic alternative works well for estimation and this is in spite of sometimes serious errors. The key is to ensure the errors are bounded across short time intervals, with frequent pauses assess the outcomes and inform what to do next. Of course Scrum provides for a natural cycle of pauses at the end of each timebox, where the team can take stock of the outcomes as well as assess the steps the team actually took vs. assumed what they took, yes essentially these being the sprint review and end-of-sprint team retrospective.

First Order Estimation

So what is the first order of estimation, well it is something we all do so naturally and effortlessly when it comes to driving a car to riding a bike to walking in a busy mall, else surely we would be running into each other most of the times. I mean when is the last time you got out a measure tape when changing lanes on a freeway or overtaking to ensure you have the most accurate measurement in distance or speed.

In essence the first order estimation I refer to is a relative measure, in this case of work items (user stories) to one another.  To me it is similar to coefficients of lift and drag considered in aircraft or even car design. Its just that in this case these estimates can be now be thought of as being the teams coefficients, one that corresponds to the team that is going to do the work based on their perspective for product backlog items as opposed to anyone elses.

Team’s coefficients

There are teams that only look at their team coefficients, user story points, when planning a sprint. This may well be all that is needed for planning, but in truth this is only the case for a teams that have been together for a long time, have experience of working with each other and have established team heuristics, their rules of thumb.

Teams that are new or new to working as a scrum team often miss out the need to assess the team capacity at a more granular level of planning, one that breaks a product backlog item (user story) into actual tasks that need to be performed in order to get to done!, before making team commitments. So it is best for a team to be mindful and disciplined towards developing the team heuristics and continued reliance on wisdom of the crowd to decipher difficult problems that includes estimation.

To do this start with having a stable team one that takes a disciplined approach in their scrum ritual meetings during the sprint. This includes when refining backlog items and/or sizing using story points to when planning out by defining tasks along with task level time estimates as this is what will help shape the teams commitment to the plan that appears in the form of a sprint backlog.

Eureka!

Daniel Kahneman, in his book Thinking, Fast and Slow, points to how judgement happens, and while it is a complex function of the brain what he points to is what Psychologist have to offer based on their observations supported by what Neurologist tell us about functioning parts of the brain.  In essence we have evolved to with two modes of thinking, called System 1 and System 2 as coined by psychologist Keith Stanovich and Richard West.

Where System 1, evolutionary the oldest, the part that is responsible for fight or flight and ingrained to our survival instinct, operates continuously and generates assessments of various  aspects of the situation with little or no effort. This basic assessments plays a vital role in intuitive judgement, as this routinely substitutes the more difficult question being asked of by System 2, the essence of heuristics.

Where as System 2 thinking considers, only if it must, the difficult to answer questions the one that System 1 doesn’t readily offer an answers to, and it triggers many other computations including basic assessments acting as a mental shotgun according to Kahneman. He points out the word heuristics comes from the same root word as does the word eureka, and is technically defined as a simple procedure that helps find adequate, though imperfect answers, to difficult questions.

What is Technical Debt?

Recently I’ve been hearing people use the term technical debt to describe all sorts of things that are related to system improvement. However, used properly, technical debt is not a catch-all phrase for system improvement work, but a subset of that work.

What is Technical Debt?

Ward Cunningham first described technical debt in an experience report in 1992:

“Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite… The danger occurs when the debt is not repaid. Every minute spent on not-quite-right code counts as interest on that debt. Entire engineering organizations can be brought to a stand-still under the debt load of an unconsolidated implementation, object-oriented or otherwise.”

To better understand technical debt, let’s explore the analogy to financial debt.

Four out of five people buying a home in the United States in 2013 took out a mortgage to do so. For the most common type of mortgage (30 year fixed with 20% down) on the average home price in the U.S. (~\$200k), the total cost of the loan is 175% of the cost of just buying it outright. That’s right, for a \$200,000 house, you’d pay about \$350,000 over the life of the loan, or \$150,000 just in interest. Why would anyone do that? Of course the answer is simple –  it might take you years to accumulate the cash before you could own a home, so people make a decision to accumulate debt in order to get the home sooner, knowing full well that they’ll need to pay more in the long run for that early entry. They are trading an advantage (early entry) for a disadvantage (higher total cost).

Technical debt, then, is the conscious choice to get to market faster by skipping some steps required for long term code sustainability. Just like financial debt, we know that in the long term it is more expensive (we’ll need to pay interest on top of the principle), but we do it because the advantage of getting to market sooner outweighs that cost. And just like financial debt, we need to create a budget for paying it back down.

Are All Bugs Technical Debt?

Let’s use three of example defects to answer this question.

1. Defect A is an error that was reported by a customer a few months after a release. It happens when a specific workflow is followed that the team didn’t anticipate, and causes the program to freeze. The team was using good automated testing, but we didn’t catch this one due to the unusual customer workflow.
2. Defect B is an error that was discovered in a regression test, and was determined to not be a “release-blocking” bug – in other words, we knew about it but decided to release anyway. Now customers are complaining about the bug and the team decides to go ahead and fix it.
3. Defect C is a display problem that happens on a new version of a browser that was released after our software was released. It didn’t occur in previous versions of the browser.

In this example, only Defect B is technical debt, Defects A and C are not because the business never made a conscious choice to ship with those defects. In any moderately full featured software product, the level of complexity involved results in some defects making it through to customers. Some of those may have been known prior to shipping and others weren’t. If we didn’t consciously choose to release with the bug, or were consciously skipping some defect prevention steps in order to get out the door sooner, these are just defects, not technical debt.

Is Refactoring Technical Debt Reduction?

As in the case of defects, it all depends on whether we were making conscious trade-offs on architectural and design approaches in order to release sooner. If we know that there is an area of the code that is a mine field, and no one wants to touch it (except for that one coder that’s an expert), but we chose not to refactor due to the amount of time & effort involved, then we have technical debt. If, on the other hand, new code has been added, the system is becoming more complex, and we just need to do some refactoring as part of the standard craft of software development, that type of refactoring is not reducing technical debt, it is simply the good practice of continuous system improvement. Think of it as entropy reduction, not technical debt reduction.

Test Automation?

Lack of robust test automation is probably one of the most common instances of technical debt. In the craft of software development, using automated tests is equivalent to a surgeon counting the sponges prior to a surgery to make sure we don’t leave anything in the body of the patient. If we’re not doing it, we are really being irresponsible. Now, I’m not stating that we need 100% code coverage for unit tests, or 100% functional coverage for automated regression tests – there is a point of diminishing returns. Again, it comes down to a case of intention – do we want much better coverage but just don’t have time to do it? If we don’t have time, that is just another way of saying it is not as high a priority as shipping the feature. In other words, we are consciously choosing to get to market faster by skipping automation that the team thinks would be helpful. In such a case, we are creating technical debt.

Summing Up

Technical Debt reduction is one important category of system improvement. To lump all system improvement under the banner of technical debt does us a disservice because it seems to imply that any problems or inefficiencies in the code were just a conscious choice by the team. That is not the case. Sometimes we make decisions to ship a less than optimal product in order to get earlier feedback or a market advantage. Even if we aren’t doing that, there will be ongoing improvement required. Separating out Technical Debt as a specific category helps us acknowledge the prioritization decisions we’re making regarding quality vs. speed, and watering that term down by lumping it together with everything else muddies the waters and can lead to disengagement by the team that didn’t “get it right the first time”, an impossible task in a complex domain.

It is critical that Technical Debt be paid down as soon as possible. It follows the rules of compound interest – the longer we wait to pay it off the more it accrues, and if it’s not paid off in time, eventually it leads to a bankrupt code base. It simply needs to be abandoned and started over from scratch, an extremely costly result. Clarifying when we are making a conscious choice to accumulate technical debt needs to have a payment plan associated with it to avoid these risks. Lumping ongoing system improvement into that category makes the payment plan much more difficult to plan for.

10,000 hours not the predictor, but the result

A new meta-analysis of 88 recent studies shows that the famous 10,000 hour rule (see the original study by Ericsson or the popularized version told by Gladwell) for mastery accounts for only a small percentage of variance in expert level performance. Other factors that seem to be at least as important: intrinsic talent, how early in life one is introduced to the area, and, perhaps the most important factor, how much the individual enjoys the activity.

http://www.psychologytoday.com/blog/the-homework-myth/201407/perfect-it-turns-out-is-what-practice-doesnt-make

So, to put this in context, the most likely path to mastery of some topic in life is to explore many different things at an early age, find one that is really enjoyable and that you have some talent at (in other words, you find it much easier than many of your peers do), and then focus on it. You’ll be naturally motivated to spend the 10,000 hour figure, making that figure a result of the real root cause – enjoyment.

Agile adoption failure? You’ve got a cultural mismatch.

Bob wanted to chat. “We can’t seem to make this work”, he said. “I just don’t think scrum works for a team like ours.”

I had provided scrum training and a bit of coaching for his team a few months back to get them going. Their story was pretty common – they had been using kind of an ad hoc, waterfall style process. They weren’t very strict about it, but the traditional phases were all there – Product Managers writing requirements documents, the team building out the requirements, a few months of testing, then release. They had heard about scrum and how other teams had really liked it and after the training, they were pumped up about how it could be a much better process for them.

Now things seemed to be falling apart. The team was cheating on the definition of done to get features into the demo by the end of the sprint. “We’ve got to meet our commitments!” they stated. The daily scrums seemed more about rote reporting to the engineering manager, who was also the scrum master. Product Managers were regularly adding “emergency requirements” in the middle of sprints. Retrospectives had quickly devolved into a disengaged, repetitive finger-pointing session focused on what went wrong in the last sprint.

I handed Bob a copy of the book “Tribal Leadership” and asked him to read it and see if it gave him any insight into solving his problems.

While our first inclination may be to jump in and fix each of these problems, I’ve learned that the problem probably is not about the team or about the process. In short, Scrum and other agile approaches are patterns of a Tribal Stage 4 and 5 culture, and if you’re working in a Tribal Stage 2 or 3, you’re going to struggle to make it work. Hit the break for more about cultural stages and some ideas for how to move the needle.

Using the Fist of Five technique to gauge confidence

In Scrum Training courses, we do a scrum simulation that is pretty fun. Early on in the simulation, teams need to do sprint planning. If you’re familiar with scrum, you’ll know that the primary purpose of the Sprint Planning Meeting is for the team to arrive at a commitment to delivering a Sprint Goal and/or a set of Product Backlog Items during the Sprint. In the simulation, I push the teams pretty hard as far as the amount of time they get to do sprint planning. They usually have not quite enough time to really think through the plan, but I push them to make a commitment anyway. Under this pressure, most teams will smile and make a commitment to a plan in which they’re not very confident. This pattern of commitment with low confidence is a persistent challenge with many of the teams that I work with.

To help highlight this pattern of commitment without confidence, I use a facilitation technique called “Fist of Five”. As soon as the team has their commitment and I’ve looked around the table asking if everyone agrees (typically with everyone nodding, and often with at least one person’s body language screaming “no way” while they nod their head), I’ll ask them to think for a moment about their own personal confidence that the team will meet its commitment. I ask them to think of how confident they are on a scale of one to five, with one meaning not confident at all, and five meaning completely confident that barring some highly unusual circumstance, the team will meet the goal.

I tell them that once they’ve got their one to five number in mind, to simply put their fist in the air without revealing their vote, indicating that they’re ready. When all of the fists are in the air, I ask hem to reveal their votes together on the count of three. It’s always a revealing moment when some people who had passively nodded their heads to the team’s commitment hold up a two or three (or even a one). I then ask anyone with lower than a four to share their concerns about meeting the commitment. Often this results in a quick change to either the plan or the commitment itself to address the concerns of those that were not at a four or five. With the modified plan, we’ll re-vote until everyone is at a four or five.

I’ve found this facilitation technique to be useful in many situations where there might be tacit agreement to a plan without true confidence. I’ve used it in sprint planning meetings, release planning sessions, and even family discussions where we’re deciding what to do.

Splitting stories into small, vertical slices.

One of the biggest challenges for teams that are new to an agile approach is the change from what we call horizontal splitting to a “vertical slice” approach. Teams often aren’t used to thinking about problem decomposition this way, and I’ll hear comments like “well, our system is too complex”, or “we need to build really big features or our users won’t get what they need”. I always tell people that in the eight years I’ve been using this approach with hundreds of teams, I’ve only been stumped once to where we just couldn’t figure out how to slice something small enough to fit into a two week sprint. Well, we could have split it, but it didn’t add any value.

Below I’ll give a quick overview of why we prefer this approach and four simple strategies for splitting stories into small slices.

The Secrets of Successful Agile Development

I’ve compiled all of my experience into what makes agile development successful into the following 14 slides. I hope they’re helpful!

Scrum: the Model-T of Agile?

Several years ago during a break in a scrum training class, a student approached me and asked “what do you think will come after scrum?”. At the time, I had no answer for this question. The several teams that I had worked with that had used scrum had gotten so much benefit from it, and the rest of the organization needed scrum so badly (in my opinion), that I couldn’t imagine the need for anything different for product development.

Our organization, its environment, and my understanding of scrum have all evolved quite a bit since that day. If asked the same question now, I would have several possible ideas to discuss, depending on the team and the situation. Scrum would probably be the starting point for all of those conversations, but in many cases it would be augmented by something else, or a modified version of scrum, or some other agile approach like Kanban might be the right answer. There are still many parts of our organization that will benefit from adopting scrum, and teams that have been using it for years have all evolved their own implementation of scrum that suits them well. I don’t see scrum going away in organization any time soon. But if it did not evolve it would seem a failure to me.

Scrum was invented in the early 90s. We’re approaching its 20 year anniversary. In software terms, that is ancient. That it has survived and in many ways thrives is a testament to its broad applicability.  Most successful scrum adopters will augment the framework with other technical and business practices like XP, Innovation Games, and Lean Startup. Particularly with teams that are taking a Lean Startup approach, I’m beginning to see the need for the way we understand the Product Owner role to evolve. I’m not sure how that evolution will happen, but I wouldn’t be surprised if on such teams, the PO role gets absorbed into the cross-functional team, doing both the idea validation with customers as well as development of the software that results from those discussions. I wouldn’t be surprised to see Product Backlog Items sorted into categories like “working software”, “idea validation”, and “technical validation”, rather than having a single Definition of Done for all product backlog items. While this could be a slippery slope for an org that is not agile in its culture, experienced agile teams can gain significant advantages from such an approach since the learning we need most doesn’t always require us to build working software to get an answer (check out the link to Lean Startup above for more on this idea).

With these thoughts in mind, I started wondering: “Is scrum too much of a sacred cow to evolve?” I’m not sure the answer to that question, but while thinking about it, the idea came to me that Scrum is not a sacred cow as much as  it is the Model-T of agile.

Ford didn’t invent the automobile, that honor goes to Nicolas-Joseph Cugnot, Gottlieb Daimler, Carl Benz, or Wilhelm Maybach, depending on the book you’re reading. What Ford did was figure out a way to mass produce the automobile and sell it to the public at an affordable price such that it became an integral part of the lives of nearly everyone on the planet today.

Similarly, Jeff Sutherland and Ken Schwaber didn’t invent agile. The ideas of agile go back to at least the 1950s and probably before that, and are part of a family of new approaches to doing business that also includes movements like Lean, Theory of Constraints, and Six Sigma in manufacturing, Leadership Agility and Radical Management in management theory, and Lean Startup and Innovation Games for learning about customer needs. What Jeff and Ken did was figure out a way to mass produce Agile and sell it to the software industry in a way that has put agile on the map all the way up the C level of nearly every organization where software is important. Gartner famously predicted that by this 2012, 80% of software development will be done with an agile approach. The focusing of agile principles into a broadly applicable framework like scrum was a major innovation, just as the development of the Model-T assembly line was a major innovation in manufacturing.

The Ford assembly line was the exact innovation needed in its day. It persisted as the primary innovation in the auto industry until the 1970s when companies like Toyota evolved a newer approach that was more fit to customer’s evolving needs and provided higher quality products. It took decades for Ford to adopt similar approaches to catch up to Toyota. The question for me is this: at 20 years old, will Scrum see the need to evolve, and if so, how?

I have heard something multiple times this week, something that has me a bit concerned. The gist of the sentiment is something like this: “Oh, we discourage the developers from talking to customers; we don’t want them to be distracted from their work or to build a bunch of stuff that’s not in the plan”.

If you are working in an agile environment, this sentiment is outdated and harmful. We want developers to understand the customers and have empathy for them, and there is no substitute for direct interaction for building that understanding.Let me start by discussing the agile mindset regarding developer-customer interaction, then address the concerns expressed in the statement.

Cross Functional Teams

Agile, and specifically scrum, relies heavily on the idea that cross functional teams build better stuff. While product managers, sales people, and similar roles have responsibility for understanding the customer problem space and communicating it to developers, and agile teams typically have a Product Owner for a similar purpose, agile teams see that expertise as a part of their team, not a separate group. The most effective development teams try to learn as much about the customer problem space as possible. They make multiple small decisions every day about how to solve customer problems. Requiring all knowledge about those problems to be siloed in one person or group, and separating that group from the team creates an unnecessary bottleneck to the system. Once developers understand the Why of what they are developing, they become much more engaged, championing solutions that they think will best help their users.

Empathy

Great products emerge from experimenting in the overlap between the customer problem space and the technical possibility space. Developers know the second space well, but can only know the first space through experience either as an actual customer or through talking to customers. In my experience, great products are rarely built without the developers having a good idea of how their customers think, and more importantly, empathy for their problems. Chip and Dan Heath give a great example of this in their book Switch. They describe a Microsoft team full of brilliant developers. They were certain they were writing brilliant software, but when the usability group tested it with users, six out of 10 customers couldn’t figure out how to use the new features. When they told the programmers, their response was, “Where did you find six dumb people?” To increase empathy, Microsoft brought the programmers into a usability-testing lab and put them behind a two-way mirror. When the programmers watched a real customer struggle with the software they designed, the programmers immediately started thinking about ways of changing it. They were developing empathy for the users, and instead of contempt for their ineptitude, they developed an intrinsic desire to improve the software to better meet the needs of the customers.

“…we don’t want them to be distracted from their work…”

In his book Radical Management, Steve Denning describes a shift in the way that we describe the high level goals of everyone at a company. He proposes that the primary goal of every employee is to “Delight Customers”, and that companies should set measurable goals for the company, executives, and employees related to this purpose. In this light, the idea that a developer’s work can be summarized as “writing code” feels almost insulting. Great software teams tend to spend the vast majority of their time figuring out what problems their users are facing, potential solutions to those problems, and the best technical approach to solving those problems. A small percentage of their time is spent actually typing code. In this environment, “their work” is not just writing code, but delighting customers.

“…we don’t want them to build a bunch of stuff that’s not in the plan…”

This one’s pretty easy to address in an agile environment. One of the simple rules of scrum is this: “if it’s not in the product backlog, we don’t work on it”. This provides transparency to the system.

Another potential concern:

“…developers will promise customers stuff that we can’t deliver…”

Sales people have been doing this for decades, so this isn’t much different <grin>. At least if developers promise something, they get to experience a direct consequence of their action, so the behavior is likely to improve.

So get out of the building, talk to customers, find out what’s driving them crazy. Scrum says that developers should spend 10% of their time on forward looking backlog refinement. What if they spent an additional 10% of their time talking to customers? Would we have a higher chance of delighting customers? It’s an interesting hypothesis. Anyone care to test it?

Premiere Pro Agile Adoption Experience Report from Agile 2012

Hi all,

I had the opportunity to present an experience report about the Adobe Premiere Pro team’s adoption of scrum at the Agile 2012 conference today. I’ve uploaded the 10 page paper here, as well as the slides from the presentation. If you have any questions or comments, add them below and I’ll be happy to share more!