Thursday, July 3, 2008

Adaptive Agile Effort Management

Prelude:

Most business see software endeavors as projects. Resources need to be set aside for projects at defined times. And timing of deliverables often tied to marketing, budgeting, and external collaboration initiatives. The day when developers will become perfect technically, know everything about the business, be trusted by business ,and be given the freedom to do whatever they feel best has not come, and might never come any time soon. So, visibility and predictability are still required throughout a project to fit in existing business practices.

Most projects out there aren't quantum physics or sci-fi creativity work. After completing 20-40% of the stories, we should pretty much know enough for more accurate estimate. This is especially the case when proper spiking and critical path analysis are done early on. Cone of uncertainty diminishes with progress most of the time. So, re-estimation should provide more accurate adjustment.


Effort Re-estimation:

In the course of a project, there can be order of magnitude differences between original effort estimates and actual efforts spent. This points to the need of re-estimation. As Mike Cohn put it in his latest edition of "Agile Estimation and Planning (2006) : page 61-76", as long as the relative sizing of effort estimates among stories/tasks is preserved, this should be a safe thing to do. Certainly, we should re-estimate in such scenarios to maintain more accurate predictability and manageability of progress.

The question then is when and how often we should re-estimate. Should re-estimation only happen when some stories/tasks are order of magnitude out of whack? Or, should we re-estimate every iteration so that we won't forget about fine tuning our stale estimates? Should all unfinished stories be re-estimated?

Obviously, for a large project with many stories, many developers and QAs of different skill levels, ROI of such re-estimation should be considered. To make re-estimation even easier and more effective (i.e. not planning too much details too far ahead), David Leigh-Fellowes, an experienced Agile practitioner, suggested re-estimating stories in the next 1.5 iterations during IPM. The 0.5 iteration look ahead is a great idea since external dependencies can be sorted out earlier. This is especially benefitial in big organizations where collaboration is often distributed across departments and countries. Moreover, environments/code base can be shared. He prefers re-estimation by tasking out certain interesting stories in details over using actual efforts on similar stories completed in past iterations. Since re-estimation by tasking out is based on actual experience in the project then, this is actually superior to merely taking actual story points from the past and apply by analogy. He also thinks re-estimation by the whole team will make more sense in a big project setting since different developers/QAs can work on a story which has a similar counterpart with actual effort tracked, and hence different performance.

Does it mean that actual story effort points are not useful? Well, not quite since re-estimation by tasking out by the whole team is labor intensive, and can only be practically applied for 1.5 iterations look ahead, stories with wrong estimates beyond 1.5 iterations will still potentially skew overall progress projection significantly. So, a happy balance will be applying both re-estimation by tasking out for the next 1.5 iterations based on actual experience gained, and re-estimation based on actual efforts on similar stories completed for stories beyond 1.5 iterations. Needless to say that relative sizing of all the stories should be maintained in the process. This way, we achieve more accurate prediction for both short term and long term work without spending too much effort.


Effort Estimation Units:

Two well known figures in the agile community, namely Kent Beck and James Shore have reverted to the use of ideal developer days as story point measuring unit. James thinks that making estimating units more abstract makes estimating and planning more confusing and difficult. Two common opposing views are: (a) one's ideal day estimate is not necessarily the same as another's [ideal day individuality], and (b) people can be hold responsible to ideal days or be judged by whether they finish within the ideal days since it is much easier to track [ideal day fixation/accusation]. Let's dive into these opposing views one by one.

The same story implemented by different developers can take different amount of time since they have different skill sets, skill levels, experiences and approaches. This problem is actually independent of whether abstract story point or ideal developer day is used. It is a matter of "how" the estimate is done. As per the previous section on effort re-estimation, ideal day individuality should no longer be an issue because for the next 1.5 iteration, re-estimation is done by the "whole" team during, say, iteration planning meeting, and that should take into account the differences in speed between the old and new implementers. For the rest of the iterations, story effort revision from actual efforts on similar stories should still provide better estimate than not revising the story at all. After all, in an agile setting, pairing, rotation or pairs, and close communication should reduce the effort variation. And with sufficient time/scale, and mixing of stories/tasks, the aggregate estimate should still be accurate due to averaging.

If estimation is done in ideal days, it can be tempting for management or co-workers to accuse a developer's inability to finish in the estimated time frame. Or, a developer can be judged to be incompetent by not being able to finish in time. This is not desirable because estimate is still estimate, and there are often factors not fully comprehended at the time of estimation. The only thing that will come out of this is defensive behavior, damaged morale, and ineffectiveness from the commotion. Doing estimate in abstract story points might seem like a solution, however, in reality, we are shifting the problem from ideal day to velocity fixation/accusation. Developers can still be accused of not maintaining or improving on velocity. The culprit of this is not the process, but wrong mentality. Understanding the nature of the degree of unpredictability of software development is really the key to solve this. So, the good solution is not to cloud the issue, but to make it more concrete, more measurable, and hence more visible. If we do re-estimation as per described previously on a pre-defined regular basis, and repeatedly make it very clear that estimated efforts are not final, and will undergo further revisions, then we have effectively reduced the fixation on estimates. At the same time, we will have a reference point (not measurement) of performance. Variance in performance can then be managed for improvement.

Either approach requires proper communication with the clients. And periodic reminders will be needed. Yes, even ideal days can be confusing because a client might be confused about ideal versus elapsed, and whether ideal day is for one man or one pair.


Conclusion:

From the discussion above, re-estimating is a good practice for providing better prediction and progress management by adapting on better knowledge gained. By only re-estimating the next 1.5 iterations with the whole team, and then re-estimate the rest by applying actual efforts on similar stories while preserving relative sizing of the rest of the stories also reduce the problem associated with ideal day individuality. Moreover, with such standard practice and proper communication, we can also take care of the ideal day accusation/fixation issue, and making the team more productive in a sustainable manner.

8 comments:

Chris Leishman said...

This technique of only re-estimating 1.5 iterations worth might be ok if you have a very large backlog of stories such that regularly checking the estimates on everything would take too long. Of course, the real problem is that the backlog is too large - and fixing that must be the priority.

Charles Tse said...

First of all, backlog size doesn't have to be too big for my approach to work. Even if you have under 100 stories in the backlog, this approach should still be fruitful because of the time saved in detail tasking out by the WHOLE team, and the inaccuracy of looking ahead too far.

Secondly, extending tasking out stories beyond 1.5 iterations is definitely fine if the ROI is worthwhile.

Thirdly, having a story with hundreds of story cards(task card included) should not be a rarity. This is especially the case at the beginning of a big project.

Lastly, and most importantly, if a project has too few stories, this might be an indication of over encapsulation of details. This is actually not a good sign. For instance, dependencies, especially those external ones, will be hidden. Let's be real here that not all agile engagement will have the benefit of having the product manager, and database architect/admin within the team.

Chris Leishman said...

The point of keeping the backlog small is to force you to have increasingly larger stories (epics) the further the story is from being developed. This is the cone of uncertainty - large, unspecified things at the top, which are slowly narrowed down to the point where they are developed.

If you do this, then the inaccuracy of looking ahead is dealt with explicitly by having the larger, less specified story cards - not by just ignoring the re-estimation.

I would also suggest that having hundreds of story cards should be a rarity, even if it currently is not. The beginning of a large project is far to early to be trying to understand enough detail to write hundreds of story cards. Such things should be deferred until the team has learnt much more about the domain and things are much more stable.

I'm not sure I follow your last point. If a story card at the top of the backlog priority is looked at by a developer, it should be clear what dependencies it will need in order to be developed. If those dependencies are large, then the estimate for that story will also be large - which is a good sign to break it up into other stories. Of course this does rely on the skill of the development team to recognise what will be needed, but this cannot be avoided by writing many stories in advance. I would actually suggest that is just giving a false sense of security when there is none.

Charles Tse said...

Again, I think the differences between our opinion are caused by:

(1) Can an organization with established budget, marketing, collaboration practices tolerate planning until the last moment? Business wants to know how much it will cost, and when the whole thing will be done to a good extent. I am sure that there are exception cases. However, I would like to address the mass first. If you question that, then maybe we should have another separate blog for further discussion? But if we are to continue this thread, then please keep this assumption in mind.

(2) I tried to be very explicit about my word story card refers to both high level business value stories, and tasks as well. And from my assumption mentioned in (1), it does not make sense to have high level stories encapsulating details.

Chris Leishman said...

Hey charles.

I do question 1, but your right, that's a topic for another blog post. I really have to stop writing comments and start posting again soon ;-)

However, I don't need to question point 1 to respond.

Planning is never a problem. However even when an organisation has a fixed idea of what they want to achieve (scope), experience has clearly shown us that it is incredibly unlikely we can really understand, at the beginning of the project and in intimate detail, all the tasks that will be required in order to produce it.

Instead what we are talking about is explicitly recognising that uncertainty and not wasting time and effort on work (like story breakdown/analysis) that isn't adding reliable additional insight - it's usually just adding a false sense of security. If you do this, then your backlog will always remain reasonably small and you can constantly check your sizing estimates as you learn more about what your trying to achieve.

When there is a fixed scope target, it's also important to gather min, max and likely estimates for your cards (especially the larger epics). You can then show this range narrowing over time as learning occurs (naturally or due to spiking). You can also sum all these ranges to show the amount of uncertainty in the project completion date to the customer - well ahead of where they usually get such information.

Charles Tse said...

Hi Chris,

I no longer understand your comments in regards to my original post. However, I do like hearing your experience in managing agile projects. Good stimulus for thoughts. And for a young methodology like agile, this is good.

Here are my two cents on your thoughts. It is definitely well understood that requirements won't be all there at the beginning of a project. However, a large chunks should be there most of the time. For example, if we are building, say, an online shopping site.

On the other hand, the subject matter expert or other key stakeholders might have a lot of ideas generated already before the project start. And these valuable ideas need to be kept track.

Planning is never a waste because: (a) It helps prioritizing stories so we can deliver more business value first. And this requires analysis of other stories. Most projects aren't specific and narrow in scope like car manufacturing. (b) As the project progress, cost and benefit profile will change as well. And with a comprehensive analysis and planning, we can make sure that the clients get the biggest bang for the bucks.

The Agile Manifesto emphasizes responding to changes over following a plan. I totally agree with that, and that's why I consider myself an agile practitioner. However, planning is not ruled out. Just a matter of how much we plan. Hence, in my original post, I put down 1.5 iteration lookahead. That seems to be the best balance.

Charles Tse said...

To clarify my own statement "planning is never a waste". In case I have not expressed myself clearly from the context, I would like to add that balance is often the key to things. We can make "planning" a gain, if the ultimate outcome over cost is optimal. If we sit there all day just to plan ahead for the next 10 years, then certainly we are not doing the right thing because the cost will not be justifiable...

Its about cost and benefit analysis, while taking uncertainties into account.

Anonymous said...

Noriskinvestors.com--7777% of your deposit after 24 hours
Noriskinvestors.com is a long term high yield private loan program, backed up by Forex market trading and investing in various funds and activities. Profits from these investments are used to enhance our program and increase its

stability for the long term.We believe that superior investment performance is achieved through a skillful balance of three core attributes: knowledge, experience and adaptability. There is only one way to be on the cutting edge -

commitment to innovation. We do our best to achieve a consistent increase in investment performance for our clients, and superior value-add. We appreciate our clients loyality and value the relationships we build with each customer. No

matter what country you come from, our professional managers will help you to choose investment product that best fits your demands.
8000% OF YOUR DEPOSITS AFTER 4 DAYS
Plan Spent Amount ($) Profit (%)
Plan A $200 - $1,999 2000.00
Plan B $2,000 - $4,999 3000.00
Plan C $5,000 - $9,999 4000.00
Plan D $10,000 - $24,999 5000.00
Plan E $25,000 - $50,000 8000.00
7777% of your deposit after 24 hours
Plan Spent Amount ($) Profit (%)
Plan VIP $50,000 - $1,000,000 7777.00

http://www.noriskinvestors.com/?ref=myhyip

http://www.noriskinvestors.com/?ref=myhyip

I will return 90% of referral bonus to your libertyreserve account,Please mailto:bugbeekcot@gmail.com when your make a deposit with my link
100% guaranteed your money are safe with Noriskinvestors.com,If you lost money in Noriskinvestors.com,I will return 100% of your deposit

Read news about hyips.make money fast and easy
http://libertyreserve-investment-hyip.blogspot.com/

I made $7millions Liberty reserve and perfectmoney profit in paying hyips
Make millions liberty reserve and perfectmoney in paying hyips fastest Real Investment
http://www.payinghyiponline.com

Make $50k libertyreserve money daily on forex trading
http://www.libertyreserveforex.net

We are the best HYIP monitoring and rating site. Our HYIP rating list has the most reliable and trusted HYIPs.
http://www.makecurrencyonline.com

Post Your AD on 1000+ Forums
The Best HYIP Rating. The Fairest High Yield Investment Programs Monitoring Service
http://www.yahoomsngroup.com/