Velocity, Agile Estimation, And Trust
Charles Max Wood posted this on Twitter:
Am I misunderstanding agile? or is it inappropriate to try to peg velocity?
— Charles Max Wood (@cmaxw) October 26, 2012
@noelrap They’re telling us we behind on the sprint. My understanding of agile is velocity is set by team pace, not wishful thinking.
— Charles Max Wood (@cmaxw) October 26, 2012
@noelrap You can push for deadlines, but you can’t tell us that we’re behind on the sprint just because we’re not going to achieve velocity.
— Charles Max Wood (@cmaxw) October 26, 2012
After trying like six times to fit my response in a tweet, I gave up and remembered that I had this web site where once upon a time I wrote things that were more than 140 characters.
Disclaimer: I have no idea how Charles’ team is working and what might have been said in planning meetings or anything else.
That said, here’s what I think.
The goal of agile project management is accepting the inevitability of change through continual feedback, continual improvement, and a realistic sense of progress. In an agile project, things that are hard when done in bulk — testing, integration, estimating — are done continually, in smaller pieces, to reduce complexity and risk.
Yes, in a functional agile project, velocity is set by team pace. Ideally, you had a meeting at the beginning of the sprint where you estimated velocity based on past performance, and determined the stories you hope to get done based on point estimates of the stories and that velocity. (Point estimates, remember, are measures of complexity, not time…)
It’s possible to be behind in a sprint, in some sense, if it doesn’t look like you are going to complete the agreed upon stories. For example, a story may turn out to be way more complex then estimated. Or a bug may have turned up. (Although agile point estimates are robust against bugs as long as bug fixes remain a roughly consistent percentage of your time).
Remedies for this problem might include changing the point value of a story when new information is determined, splitting the story, lowering velocity estimates going forward, moving a story to the next sprint. Retrospective meetings are a great place for trying to figure out why a story was mis-estimated.
However, trying to assess the state of the project in the middle of a sprint can be a little misleading. There can be a kind of optical illusion if a lot of stories start at the same time, where progress is being made but not booked because the stories aren’t finished. (Sometimes this means you need more granular stories.) Often, it’s helpful to organize the daily standup by outstanding story to give visibility to how stories are moving.
Charles is right that one of the points of Agile project management is not to work by wishful thinking of when you hope things will get done. If a story is more complex than we thought, then it just is, and you need to adjust to that by dealing with the software triangle — change scope, change time, change budget.
Granted #1: This requires a fair amount of trust between the team and the management that when the devs say something is taking longer than expected, that’s assumed to come from a place of expertise, not ignorance. You build trust by being right, and admitting it when you are not right.
Granted #2: Velocity and story points are robust against underestimating, as long as you are consistent. What will happen is that your velocity will settle at a point that factors in the overestimate. However, if specific stories or types of stories are continually taking more time than expected, it’s worth trying to figure out why. If for one reason or another, you aren’t the expected velocity isn’t being allowed to settle to a new state, that’s where the wishful thinking comes in. (Although if your actual velocity is continually dropping, that indicates a problem, too.)
Granted #3: Sometimes there are really are business needs for particular deadlines. That doesn’t change the laws of software physics, but it does determine what a reasonable response is from the team.
Okay, that’s more than 600 words, and I don’t know if I’ve answered the question.
- In an agile project, velocity should be related to past performance, not hoped-for results.
- If velocity is being determined top down — for example just trying to determine the velocity by guessing total story points in the project divided by sprints before deadline — that’s not really in the spirit of the thing.
- It’s possible to miss expectations for a sprint, but the appropriate response to that is usually not “type faster”.
- This all critically depends on trust between the project managers and engineers.
Wow, it’s been a while since I blasted out a blog post that quickly. Felt good. Hope this helps.