Thursday 5 July 2012

Shift Happens

Scope shift (creep) is inevitable. Risk involves uncertainty; so it is not a risk because it is certain to happen, the only uncertainty is how much shift will occur and whether it will cause your project to fail.

Understanding the reasons for scope shift is the first step towards removing the causes of scope shift.  Once you understand the reasons you can dramatically improve your chances of project success.

There is a rhythm to software development that matches the length of your software release cycle. The longer the cycle the more  scope creep or shift happens.

Your effectiveness at capturing requirements will dictate the ideal length of that cycle. When your project length exceeds your ability to capture requirements the following nightmare happens.


In the beginning was the idea, and the idea was good. The idea was good and so senior management blessed it and turned it into a software project. You began to gather the requirements and assemble unto you a project team. Senior management declared the deadline and IT management and the team accepted it in silence. 

It was at this point that it all went wrong…  

Initially, there will be no sense of urgency and the team will calmly began to assemble the software. The team will then produce the first build that can be shown to management. Someone will recognize that the project is off course and this will lead to a set of meetings to resolve the issues. Intensity will pick up and corrections to the requirements will be made. Team requests to fix the architecture will be made and turned down because it would delay the project.  

IT and project managers will omit details from their reports so that senior management will think everything is on track. Many tasks will get to 95% complete and yet the software will not seem to be complete. The subsequent builds will slow down as you as you approach the deadline, the number of bugs will increase, stability will decrease, and discussions will devolve into fire-fighting.  

Now the team will have a sense of urgency and Intensity will increase until the team is working extremely long hours. With luck and heroic efforts you that you can declare “mission accomplished”.


If you are unlucky the entire mess descends into finger pointing and damaged resumes.  



For some reason, few organizations do post-mortem analysis after the nightmare to figure out what went wrong.

Probably because between all the finger pointing and politics everyone wants to move on as quickly as possible and pretend that nothing happened.  Move along, nothing to see here.

Most organizations dust themselves off and rinse and repeat.

If you have never experienced parts of the above nightmare then either:
  1. You live a charmed life 
  2. You have never worked on any project of significant size 
  3. You have always worked with Agile development 
Organizations don't know how to capture effective requirements that will lead to quality software systems. Let's borrow  Zeno's Paradox to talk about the effects of scope shift on a project and then let's figure out how to fix it.

Zeno , in the 5th century BC, philosophized that Achilles should not be able to catch up with a tortoise in a foot race; every time Achilles catches up with the last location of the tortoise, the tortoise has already moved.
Of course, Achilles does catch the tortoise and thus we have Zeno’s paradox.

Applying Zeno's paradox to software, Achilles represents our software team and it moves as our team builds out functionality; the tortoise represents the requirements it moves because of scope shift.

Unfortunately, Achilles does not always catch the tortoise in the software world. Today's statistics show that Achilles only catches the tortoise about 30% of the time before the race ends.

My claim is that if a project fails it would have failed because of poor requirements gathered before the first line of code was written

Unfortunately, the probability of a project being canceled is identical to the amount of scope shift.

Root Cause of Shift Happening
What causes the tortoise (requirements) to move is scope shift, which is the result of not having a complete set of requirements when the project starts.  There are two kinds of scope shift:
  1. The shift that comes from your industry changing
  2. The shift that comes from not scoping a project correctly
All industries shift at different rates.  At this time social media is moving very quickly and people are experimenting and discovering different ideas about what works and what doesn't -- it is normal for newer domains to shift strongly.  I consider this to be normal shift and par for the course.

Then there is the shift that comes from not scoping out your project correctly.  Capers Jones  does quite a bit of work in software litigation and one of the most common issues in software litigation is inadequate change control and requirements changing more than 2% per month.

If the requirements are complete and consistent, the team's progress would resemble the animation to the right. The circle is the scope of the requirements and the blue area represent the functionality of the software being built out at time tn. In a perfect world, we would see increasing functionality being delivered until we match our scope by the project end-date.

However, shift happens...

The reality is that requirements will change and/or be discovered to be inadequate as soon as development starts.Missing requirements will be discovered, inconsistent requirements will create fire fighting, and technically challenging requirements will have you scrambling for technical work-arounds. The scope will begin to shift and the tortoise will be off to the races.

Requirements are incomplete because:
  • insufficient time was taken to gather requirements
  • analysts are unable synthesize missing requirements  
  • subject matter experts were not available  
  • key stakeholders were not interviewed  
  • of inexperience with the subject matter domain, i.e. new software  
Requirements are inconsistent because multiple viewpoints are not vetted and turned into consistent requirements. Let's observe what the effects of incomplete and inconsistent requirements are as the project progresses.

A Day at the Races
Let's diagram the process of Achilles (team) chasing the tortoise (requirements).

As the team begins at time zero (T0) they perceive the requirements at time zero (R0)and will aim to build architecture to get there. If R0 is close to the actual requirements then you will have a successful project. Odds are you don't have good business analysts (product managers) and your requirements are incomplete and inconsistent.

So after a certain amount of time the requirements will shift either as you discover inconsistencies and missing requirements. T1 represents the functionality (code) that the team has built after the 1st time interval. They would have built out T1 with R0 as the target. However, they will notice that the requirements are now at R1 and that the architecture needs to be altered.
The team will try to make architecture adjustments to hit the new target (R1), but they are reacting to the scope change after the fact. By T1 the requirements have shifted to R2.

The diagram shows the requirements (Rn) moving perpendicularly to the time access, however, depending on your industry and requirements capability the requirements might be converging with the code that has been built out or it might be moving further away.

If you have a relatively complete and consistent set of requirements then there can not be much scope shift. With competent architects to design infrastructure and make estimates you should have a successful software project on your hands.

Competent architects can not make up for incomplete and inconsistent requirements.  Poor requirements translate to poor estimates.

Another Brick in the Wall
Organizations typically produce some form of business requirements document ( BRD) to describe the target system. The BRD generally ends up being a brick of paper a few inches thick. We assume that if the brick is big enough then all requirements must be covered; unfortunately the thicker the brick the more complacent we tend to be. Instead of a BRD we should probably call it a BRicK.

The bad news is that the team doesn't read the brick.

One colleague told me that many teams don’t even know where to find the brick! These documents are poorly written, inconsistent, and not in the language of the developers. Developers will simply pick and choose the pages of the brick that seem to apply to them and rely on business analysts and QA to describe the system.

Don't believe me?

If you look through your email server then you will find chains of requirement discussions that are not in your BRK.

In some cases the volume of requirements littered through your email server will exceed the size of the BRK.

The most accurate requirements never make their way back to the BRK and this will lead to fire-fighting later on.

Since the main deliverable of a software project is source code, and teams believe that they will not have enough time to write all the code, it seems the sooner that you start coding the better off you will be, correct?

Good requirements can be turned into code much faster than poor requirements.

Odds are that if you don't have any quality control processes integrated with your requirements gathering process then you are probably producing poor requirements.

OK, Shift Happens, So What?
There are a couple of common ways that organizations have tried to address scope shift:
  1. Don't create code until the requirements are complete and consistent 
  2. Expect your architects and team to handle scope shift
There are very few good business analysts (product managers) out there who can synthesize stakeholder requirements and turn them into effective requirements that architects can use to build high quality systems. Writing good quality requirements is hard and as much attention should be spent on them as on development.

Only the top 5% of business analysts are competent, the problem is the other 95% think they are in the top 5%.

The process of writing good requirements is too involved to explain here, but, the rule of thumb is that good analysts will be able to work out the requirements of a system in about 30% of the time of the time it takes to develop the entire system. The time needed must be modified by familiarity with the subject matter domain, i.e. re-engineering projects should take less time to gather requirements.

There are some projects that spend too much time writing requirements and they either never get started or start late. Rather than determining if the failure was due to poor analysts (product managers) or poor processes, these organizations conclude that gathering good requirements is either not possible or not worth the time.

The quality of your software system can't exceed the quality of your initial requirements.

Your Architect Can't Save You
Another way to handle scope shift is to assume that your architects are good enough to build a flexible system. Experienced architects are able to anticipate some scope shift and accommodate shifting requirements. However, technical people that really understand your industry are rare; they are the exception and not the rule.

Do you really want your technical people guessing what your business requirements should be?

A successful project depends on your architects knowing how big your project is.

For example, let’s suppose that you ask a builder to build a 10 story building. When the builder has put up 8 stories then change the requirements and say that the building needs to be 20 stories tall. In addition, say that you are not going to give him extra time or money to make the change.

In all likelihood, the builder will refuse the change request; the difference is that we try to do this all the time with software.

I Laugh in the Face of Danger

Beware of architects with "combat stress reaction".

Architects that experience project failure due to scope creep sometimes conclude that their architectures are not flexible enough.

This leads architects to overcompensate by over-engineering their next system. Architecture with too much flexibility imposes steep learning curves on the team and will cause very slow software development. You will be able to accommodate scope shifting; you will just do it very slowly and very painfully.

Expecting your architects to defend you against poor requirements is like trying to mow your lawn with scissors.

Not All Requirements are Created Equal

The architecture for a 2 story house is different than the architecture for the 102 story Empire State Building. The size of your software project depends on your core requirements; they in turn dictate what needs to be built out for architecture.

When core requirements are discovered (or added) as the project progresses, the architect will realize that a different set of technologies and/or techniques should have been used in the project. This is when the following conversation will happen:

Manager: We need to have feature X changed to allow behavior Y, how soon can we do this?

(long pause)

Architect: We had asked if feature X would ever need behavior Y and we were told that it would never happen and we designed the architecture based on that. If we have to have behavior Y it will take 4 months to adjust the architecture and we would have to rewrite 10% of the application.

Manager: That would take too long. Look I don't want you to over-engineer this, we need to get behavior Y without taking too much of a hit on the schedule. What if we only need to do this for this screen?

( long pause

Architect: If we ONLY had to do it for this one screen then we can code a work-around that will only take 2 weeks. But it would be 2 weeks for every screen where you need this. It would be much better in the long run to fix the architecture.

Manager: Let's just code the work around for this screen. We don't have time to fix the architecture.

Damn the Torpedoes, Full Speed Ahead
The effect of discovering a requirement that affects the core architecture depends on when that requirement is discovered. If it is discovered when the project starts then there will be little impact to the architecture; the later it is discovered the greater the impact to the architecture. Regardless of when it is discovered the project deadline is impacted and should be moved back (of course, it won't be ).

Impacts to the architecture will cause development productivity to slow down as the team looks for a work-around. The team will need to choose between building the correct architecture to satisfy the requirements and cutting corners.

Unfortunately, pressure from senior management and the lack of intestinal fortitude from IT management will cause the team to cut corners.

When enough corners are cut then we end up with work-around piled on work-around and the stability will start to fail, bugs will increase exponentially, and productivity will diminish sharply.


“Damn the torpedoes, full speed ahead” will cause the architecture to lose flexibility and the team to lose productivity  (brown circle is the original requirements). Developers will be spending more time in meetings that writing code and development speed will slow to a crawl.

Whether you succeed with your project or fail will depend on how many core requirements are missing and how late they are discovered in the project:
  • If your productivity is not impacted then you will have a successful project.
  • If your productivity slows down enough then you will be lucky to build a subset of the original scope and declare victory, i.e. mission accomplished.
  • If your productivity slows to a crawl then you will end up with a failure.

Conclusion

Regardless of your development methodology the most important thing is to identify the core requirements that are needed to build the core architecture. This means making sure that you identify all the stakeholders and determine the core functionality.  Failure to talk to all stakeholders will leave you vulnerable to requirements that you architecture can not handle.

When development starts have the team work on the most uncertain requirements first. Have the team work on core functionality for the system and not CRUD use cases. Some teams build out the screens of the system because they want to show progress. In reality this is just a façade and lulls management into a false sense of security. By working on the core functionality the team will identify missing core requirements at the beginning of the project when they are laying down the architecture.

Since core requirements discovered late in a project are the most deadly then shorten your development cycle. This is one of the reasons that Agile software development works for small and medium sized projects, your development cycle is usually no more than a month and so the impact of discovering a core requirement late can't have a huge impact.

If you don't use Agile software development then you should try to shorten your development life cycle and have with quarterly releases.  This means to turn your project into a program of projects with much shorter duration.

At a minimum take a look at some of your failed projects and see if you can figure out where the project fell apart. In all likelihood you will discover core requirements that were added to the project after the core architecture had already been laid down.

For more information on requirements uncertainty check out: Uncertainty Trumps Risk in Software Development

Want me to elaborate on any issue mentioned in this article?
Just write me at dmahal@accelerateddevelopment.ca 

1 comment:

  1. I'm right with you all the way.
    I seen most of what you discuss on several projects.

    ReplyDelete