Jul
28

Faster. Faster, faster, faster!

Faster. Faster, faster, faster! as David Byrne sings manically in “Air”.

In previous entries we saw how an XP team is doomed to be on a mad treadmill that spins ever faster: the team commits to delivering as much work as the previous release (the team’s velocity). They try to improve their velocity to deliver a little more than promised. If they succeed, their velocity has gone up and they commit to delivering that much in the next release. And they try to improve their velocity again… And on and on.

Does it ever stop? If they fail to deliver all the promised stories by the end of the release, their velocity is lowered: only finished and accepted stories are counted. Next iteration they commit to a little less work, which should give them some time to analyze what happened and try some improvements. If they planned by business value only the lowest value stories are not delivered; the value of the release will still be near the expected value.

influencevelocity.png

In my experience, working faster or working more hours does not increase the number of stories that get accepted. On the contrary, it is the surest way to reduce your velocity.

Use Velocity to evaluate investments

How yo you increase velocity? By investing in working better:

  • Writing unit tests to design better and to guard against regressions
  • Refactoring code to make the design better and the code easier to change
  • Pairing to spread knowledge, techniques and conventions
  • Regular reflection in “Retrospectives” or “Kaizen events to review and improve the process, tools and techniques
  • Holding reviews, either formally or by pairing to improve code quality and spread knowledge
  • Writing automated acceptance and performance tests
  • Involving customers in defining and testing the software
  • Buying better tools (but only reliable, thoroughly tested technology, that serves your people and process)
  • Harvesting usable code
  • Go get some training, go to a seminar, go to a conference
  • Do something fun, relax
  • Perform an experiment, try out a wacky idea

And how do you know you investment worked? Your velocity goes up. That’s one more reason to have short releases: you get quick feedback on whether your investment. If it doesn’t work, stop and try something else.

Micro-investements

Typical for agile methods is that they use micro-investments: make a small investment, see what the effect is, decide on your next investment. Unit testing, pairing, refactoring, acceptance testing… require some daily effort, some discipline. Regular retrospectives evaluate the results of the investements and decide where to invest next. Thus, if you make a “wrong” investment, you haven’t lost much effort and you at least gain some knowledge.

Another advantage of micro-investements is that they can be taken at a much lower level than major investments: many of the decisions above can be taken by individuals or the team itself, without having to go through formal investment procedures.

Of course, the danger with micro-investments and local improvements is that local optimizations worsen global performance unless you use a “whole system” approach like Systems Thinking, the Theory of Constraints or Lean Thinking.

Big investments

“Classical” approaches tend to go for larger investments, in more upfront (analysis, design, architecture) work, frameworks, product lines… in an effort to look at the whole system and to avoid rework. In my experience, as long as you don’t get it completely wrong at the start, you will get where you need to be, in a timely and cost-effective way by building in and using regular feedback.

There is one area where it’s not wise to invest too little: in determining the real needs of the users/customers. What is the real problem? What is the best way of solving the problem? Software typically is only a small part of the solution, if it’s part of the solution at all. What else do you need? Is there value to created? Does the expected value exceed the expected cost? What is the required investement? Is the return justified? These questions should be asked before the project starts, and throughout the project. That’s what the “Find high value/low cost stories” in the systems diagram is all about.

Remember:

  • A system that is not used has no value
  • The cheapest system is the one not built

The wish to improve Velocity must be motivated by a drive internal to the team. It can’t be mandated from the outside. If you try to push velocity up, you might achieve that at the expense of your real goal: creating more value.

Who’s satisfied by achieving a ‘repeatable’ process? The only process worth having is an optimizing one. We need people who always want to do better. Because better is more fun

Jul
26

Reward by Value

If we reward people based on how high their velocity is, we’re in fact rewarding people who work hard. Or who game the the system. Assuming we trust the developers to be honest with their estimates (and there are plenty of forces helping them stay honest), what’s wrong with rewarding people who work hard?

Well, working hard is not The Goal of our team. Our goal is to create value for the people who pay for our hard work. If we want to optimize our system, we should be very clear about our goal and keep it firmly in mind.

Fortunately, value is pretty easy to measure and track IF each story has a value estimate by the customer. Just like we can measure the effort we put into the release by counting the story points of accepted stories, we can count the business value points of the accepted stories. And that’s exactly what we track on the burn up/down chart. As this chart is displayed where everyone can see it, we’re always reminded of our goal. Our goal is to:

  1. Create the highest possible business value in each release…
  2. …for the lowest possible cost per release

Therefore, we should be rewarded on the amount of value we release. As long as it isn’t released and used, the software’s value is zero.


Hey, that’s not fair! We’re being rewarded based on value estimates made by the customer? What if the customers don’t know the value? What if they’re wrong? What if they game the system to lower the value? What if…?” Well… you do trust your customer to do a good job, to be honest, to be competent and to make an honest mistake from time to time, don’t you? If not, stop reading this blog and do something about it!

Like story point estimates, business value estimates should be consistent. Developers are allowed and encouraged to ask for the reasoning behind the value estimate. This nicely balances with the way the customer asks for the reasoning behind the story points estimates of the developers. But it’s ultimately the customer’s reponsibility to get the value right.

Customers and developers work together to maximize story value, like they do to minimize story cost. Before and during the planning game they should look critically at all the stories. Can we do this in a simpler way? Is there a way to get more value out of this story or to get the value sooner?


rewardvalue.png

In this diagram we see that increasing velocity no longer makes you look good. Instead, producing more business value makes you look good. One of the ways to produce more business value is to genuinely increase the team’s velocity. Inflating story costs will not bring more value.

As in the previous diagram, if the team can deliver on time, their velocity will be a bit higher than planned. This means they will take on a little more work, commensurate with their increased velocity. But this reduces the odds that they will deliver on time next time, unless they find creative ways to increase their velocity.

We’ll see more about velocity in the next entry.

Jul
26

Gaming the points system

The previous entry described how to estimate using points and velocity. Can’t this system be mis-used by developers?

Yes…. Developers could assign artificially high estimates to stories, thereby making it seem as if they improved their velocity. Well, developers always could do this if they made estimates. There are some forces countering this:

  • Are you going to give all your stories 5 points? You aren’t allowed to assign more points: if 5 is not enough you have to break down the story into smaller stories. Don’t you think the customer is going to ask questions if each story costs 5 points?
  • A customer is allowed (and expected) to question the estimates: if stories A and B seem to have the same difficulty to the customer, but the developers assign a higher cost to B, the developers had better have a good explanation. If the explanation is based on the difficulty of the feature itself, the customer can only accept it. If the explanation is based on the technicalities of implementing the stories, this might be a “smell” that the design of the code is in need of refactoring. If the developers can’t explain the difference, they should re-estimate. Stories should be estimated consistently. A customer can verify this consistency.
  • Story estimates are made by the team. The whole team would have to agree to “gaming the system”. Or at least, all of the most prominent and vocal members of the team. That’s quite difficult to keep up in the open, communication-rich environment of an agile team.

storyinflation.png

This system diagram shows how we can game the system to get a higher velocity, by working faster and more sloppily or by inflating our cost estimates. Sloppy work is kept in check by the acceptance tests the customer performs. Remember: only accepted stories count when calculating velocity.

Inflation can be kept under control by:

  • The customer asking for the reasoning behind the estimates
  • The customer and developers looking for lower-cost ways to get the same result
  • The development team as a whole is accountable for the estimates
  • Cost estimates are capped at 5

However, we still see a pernicious loop (in purple): if we inflate our estimates, we increase our velocity. If our velocity increases, the team has to commit to doing more work, which makes it unlikely to easily meet the deadline. Unless the estimates are inflated again…

We’ll see in the next entry how to break this loop.

Jul
16

XP 2005 TOC Poster 1

Theory of Constraints session at XP2005, participants were given an experiential crash course in the Theory of Constraints. They then had to apply their new knowledge to solve real world problems.

They did this in 3 groups. Each group had a “customer”, the others played “TOC consultant” to help the customer to understand and improve their system.

XP2005_TOC_poster1_small This is the output of one of the groups: it gives an overview of the whole process from requirements, over analysis, development, testing, writing manuals, training and finally putting “stuff” into production.
Click to enlarge the image
(picture courtesy of Marc Evers)

Remarks about the poster

The goal of the system is to “Put stuff into production“. An IT system can only generate value when it’s put into production use and users are actually using it (well). Hence the User Guide and training before releasing. Part of the value in releasing a system is the feedback and ideas you receive to improve the system, hence the loop back to project initiation.

The bottleneck of this system was actually two bottlenecks (indicated as [1] and [2]), which ocurred at different times during the project. Bottleneck [1] holds the system back at the beginning of the project; bottleneck[2] holds the system back near the end of the project. It’s not as bad as a “constantly shifting constraint”, but we need to focus in different areas depending on the phase of the project.

Notice how the part marked with “XP” is between two bottlenecks. This is something that has been observed in many (if not most) XP projects: XP has very effective techniques to exploit, subordinate to and elevate a development team bottleneck. If you apply the techniques, the development team’s throughput improves a lot and it’s no longer the bottleneck. The bottleneck shifts. And who’s the bottleneck then? Usually the Customer (role) becomes the bottleneck, either in keeping the team fed with stories or in accepting the stream of finished features. Or both, as in this case.

XP in a nutshell, from a Theory of Constraints perspective:

  • XP assumes that the development team is the bottleneck
  • IF this is correct, XP increases the throughput of the development team and thereby shifts the bottleneck to the Customer
  • If this assumption is not correct…

In the session we chose one bottleneck to concentrate on, the one the customer wanted to remove the most.

Our newly graduated “TOC consultants” suggested several ways to exploit, subordinate and elevate these bottlenecks, coming up with some novel ideas that their customer could apply to this situation. What are some of the interventions we could suggest here?

  • We have two bottlenecks, before and after “XP”. They are bottlenecks at different times in the project. If they are different resources, they could help each other out: bottleneck [2] resources can help (subordinate to) bottleneck [1] resources at the beginning of the project; and vice-versa at the end of the project. E.g. testers can help analysts at the start of the project by devising acceptance tests; analysts can help testers to perform and analyze acceptance tests.
  • We have a non-bottleneck resource, the “XP” team. They could subordinate to both bottlenecks, by spending some of their slack time in helping the bottlenecks. One way of doing is to assign one person from the development team to “follow the release”. This developer helps the analysts to write stories and clarify acceptance tests. They also help the testers during acceptance, the writers writing manuals, the operators installing the software. Their primary job is to smooth the interface between the development team and the world outside the team. They have a good overview of both the functional and technical content of the release. While this developer works at the end of the release, another developer starts preparing the next release and follows that release through to the end. This is a “rolling wave” planning, which is great for continuity and is a good way of “leveling the load” (One of the 14 principles of the Toyota Way). You do need people in the development team who are skilled at interfacing with other teams, who understand both the functional and technical side of a project…
Jul
16

Business Value for beginners

This previous blog entry exhorted you to go out and talk to your friendly neighbourhood business person.

What will you talk about? A good place to start is to discuss the cost and value of what you’re doing. One of the most powerful tools of XP is “The Planning Game”. You sit down with your customer(s) and decide which features you’re going to implement in the next release. To do this you need:

  • Index cards with a “story” each. The card contains a brief description of a feature, just enough to remind developers and customers of the important points of the feature, which they have discussed before and both understand.
  • Each card contains an estimate of the required effort to implement the story. Different teams use different units for their estimates: mandays, hours, “ideal days”, gummibears… I just use a scale from 1-6 “story points

The index cards are easy to lay out on a big table, you get an good overview, it’s easy to move them around. The aim of the game is to define an implementation plan that will generate the highest possible value with the least cost. How do we do this? We already know the cost (albeit in “points”. What’s that in the “real world”?). What is the value of a story? Well, that’s a question for the business people to answer.

Business people have to estimate the potential business value they can gain by putting this story into production use. How do they do that? I use a very simple process, the same one I use to estimate the cost of the story:

  1. Sort all stories from low to high value, by taking them one by one and comparing them with the stories that have already been sorted.
  2. When all stories have been sorted, check if the ordering seems correct.
  3. Give the lowest value story 1 point. Give the highest value story 5-6 points (or whatever maximum you set on value estimations). Don’t use a range that’s too big:
    • It might give an impression of precision where there is none
    • If some stories are really worth 100 times more than others, why are you wasting time on those stories with ludicrously low value?
  4. Group the remaining stories in groups with roughly equal value and give them values between 1 and 5. Each story now has an estimated “business value point“.
  5. Done!

And now planning becomes very easy… Just pick the stories with a good value/cost ratio.

How long does that take? I just did one for a 2-month release with 4 developers and about 30 stories. Estimating costs took two sessions of almost an hour. Estimating value and planning the release took a little over an hour. Let’s say 3-4 hours to estimate and plan a 2-month release. YMMV.


It doesn’t cost a lot of effort to estimate your stories’ business value, but it has some interesting advantages:

  • Planning becomes a lot easier
  • It makes everybody think hard about the value of each story.
    • Some features turn out of to have little or no value. Why should we waste our precious time on them?
    • Some features turn out to have a lot more value than technical people would expect.
  • Tracking value sends a powerful positive message: we are adding value to the organisation. IT is not a bottomless pit where you pour resources in. IT is a system that generates value for a given investment.
  • It clearly delineates the responsibilities of developers and business people
    • The developers are responsible for keeping the cost of the stories low
    • The business people are responsible for finding and selecting high value stories
  • You will know it’s time to stop the project when the added value of the next release is low.