Thursday, March 5, 2009

Story Points

Hours, story points

Story points are a measure of relativeness and cannot be used right out of the box. They’re typically used in terms of duration and they have to be calibrated over time. The difficulty with story points is that they are put together in terms of numbers and people like to use numbers for statistics.

For example, does it take you more time or less time to drive from Atlanta to Charlotte than to drive from Cleveland OH to Akron, OH - certainly less. Does it take you more time or less time to drive from Seattle to Miami, probably more since it’s a longer distance. Story points are all about putting a stake in the sand and comparing other work to that reference point.

So let’s take example. I’m going to use the scale 1, 2, 3, 5, 8, 13, 20, 40, 80 as my story points for driving – roughly based on the Fibonacci sequence. We’ll call driving from Raleigh to Charlotte a 5. I’ve done that a number of times and know about how long it takes. I picked 5 as a starting point just to get a number in the middle of the pack. The relationship of the numbers is a factor of 2. What this means is that when compared to a 5, a 3 is ½ the duration, an 8 is twice the duration. 13 is twice the duration of 8 and so forth.

So as you estimate, compare everything you can to the base story – in our case driving from Raleigh to Charlotte. When an argument arises about a story being, say, an 8 or a 13, compare the story being estimated to others that have already been completed. Is the story in hand similar to the 13 we did last week or closer to the 8 we did? In the end remember that precision isn’t the goal, consistency is. A story that’s underestimated in the long run will balance another story that was over estimated. If you’re using story points to determine what can be accomplished in two week iterations, chances are you will only make a week’s worth of error.

Now we’ll story point driving from from Emporia KS to Guymon OK, Trinidad CO to Pueblo CO, Rome GA to Arab MS, Cleveland MS to Cleveland OH? Let’s look at google maps and order them by distance and side roads. I’ll just list the starting points: Trinidad, Rome, Raleigh, Emporia, Cleveland. Now we can start to story point. Is the Rome trip ½ the time as the Raleigh trip? Probably so we’ll point it as a 3. Is Trinidad ½ the time as Rome? It’s close but more likely not ½ the time so we’ll point is as 3. Is Emporia twice as long as Raleigh? I think so and that makes the time a point of 8. How about Cleveland? Twice as long as Emporia? Certainly. Even more? Yes, so a 13 doesn’t cut it. Is it as long as a 40 (in other words more than 4 times as long as Emporia)? Perhaps, but not more than that so we’ll estimate at 40.

Notice for story points of 3 I can estimate the duration down to how many in a given day. For story points in the double digits, my estimate is much rougher.


Now how many times can I drive from Raleigh to Charlotte in a day? Probably twice. So my velocity is two 5 point stories in a day = 10 points. Can I drive the Cleveland route in a day? Nope, but maybe in 4 days. Can I drive the Trinidad route in a day? Yes probably about 3 times.

The next step is to go out and do the work for a fixed amount of time. The first iteration of this type of work is going to be a guess. For example, I’d assume we can do all of the trips except Cleveland in a given week. That’s 19 story points.

Monday, March 2, 2009

Stories, use cases, and traditional requirements

Comparing user stories, use cases, and traditional requirements.

Comparison example
The client has requested the ability to search for providers by provider specialty.

Traditional Style:
The provider search screen shall provide the ability to search for providers by provider specialty.

Use Case Style:
The client selects the provider search screen.
The system retrieves a predefined list of provider specialties and populates the specialty drop down list. The system displays the provider search screen.

The client selects a provider specialty and clicks search.
The system retrieves a list of providers that match the provider specialty search. [Alt 1]
The system displays the provider list result screen with the matching providers. [Alt 2]
End use case

Alt 1: If there are no matches, the system displays an empty provider list results screen with a message: “no matches found”. End use case.

Alt 2: If there are more matches than fit on one screen (currently 15), then the system displays the provider list result screen with 15 matching providers and a ‘next’ button at the bottom of the screen. Refer to “next button pressed” use case.

Story Style:
Story:
Search for providers by provider specialty.

Description:
As a system user, I need the ability to search for providers by specialty so that I can more efficiently refer patients to specialists.

Acceptance criteria:
The provider search screen will have a specialty search box.
The specialty search box will be pre populated by provider specialties (see specialty in the KDB).
Searching via the provider specialty will return a list of matching specialists or a message indicating that there are no matches.