Uncertainty Trumps Risk in Software Development
Join the DZone community and get the full member experience.Join For Free
successful software development involves understanding uncertainty , and uncertainty only comes from a few sources in a software project. the uncertainties of a software project increase with the size of the project and the inexperience of the team with the domain and technologies .the focus on this article is on uncertainty and not on risk . in part 1 we discussed uncertainty and in part 2 we discussed risk, so it should be clear that:
all risks are uncertain, however, not all uncertainties are risks.
for example, scope creep is not a risk (see shift happens ) because it is certain to happen in any non-trivial project.
since risk is uncertain , a risk related to scope creep might be that the scope shifts so much that the project is canceled . however, this is a useless risk to track because by the time it has triggered it is much too late for anything proactive to be done.
it is important to understand the uncertainties behind any software development and then to extract the relevant risks to monitor . the key uncertainties of a software project are around:
- estimating the project deadline
[ this article is a bit intense :-) if you are pressed for time just check out the graph and the conclusion ]
uncertainty in requirementsthere are several methodologies for capturing requirements:
- business requirements document (brd) or software requirement specification (srs)
- contract-style requirement lists
- use cases ( tutorial )
- user stories
the blue area above represents what the final requirements will be once your project is completed, i.e. the system to build . the initial requirements that you capture are in the yellow area called initial requirements .
with a perfect requirements process the initial requirements area would be the same as the system to build area. when they don't overlap we get the following requirement categories:
- superfluous requirements
- missing requirements
for example, a superfluous requirement that causes the architecture to be too flexible will put the developers through a high learning curve and lead to slow development.
the physical equivalent would be the apartment building here on the right. the foundation was insufficient to the needs of the building and it is slowly collapsing on one side. imagine the cost of trying to fix the foundation now that the building is complete.
i've been in start-ups that did not plan for sufficient scalability in the initial architecture; subsequently, the necessary scalability was only added with serious development effort and a large cost in hardware. believe me, throwing expensive hardware at a software problem late in the life cycle is not fun or a practical solution :-(.
the overlapping box, inconsistent requirements , is to categorize known and missing requirements that turn out to be in conflict with other requirements. this can happen when requirements are gathered from multiple user roles all of whom have a different view of what the system will deliver.
it is much easier and faster to test your requirements and discover inconsistencies before you start developing the code rather than discover the inconsistencies in the middle of development. when inconsistencies are discovered by developers and qa personnel then your project will descend into fire-fighting (see root cause of 'fire-fighting' in software projects ).
the physical equivalent here is to have a balcony specified to one set of contractors but forget to notify another set that you need a sliding door (see right). when the construction people stumble on the inconsistency you may have already started planning for one alternative only to discover that rework is necessary to get to the other requirement.
note, if you consistently develop software releases and projects with less than 90% of your requirements documented before coding starts then you get what you deserve (n.b. i did not say before the project starts :-) ). one of the biggest reasons that agile software development stalls or fails is that the requirements in the backlog are not properly documented; if you google " poor agile backlogs " you will get > 20m hits.requirements risks
some risks associated with requirements are:
- risk of a missing requirement that affects the core architecture
- risk that inconsistent requirements cause the critical path to slip
uncertainty in technology
technical uncertainty comes from correctly using technology but failing to accomplish the goals as outlined by your requirements; lack of knowledge and/or skills will be handled in the next section (uncertainty concerning resources). team resources that don't have experience with technology (poorly documented api, language, ide, etc) does not constitute a technical risk it is a resource risk (i.e. lack of knowledge).
technical uncertainty comes from only a few sources:
- defective apis
- inability to develop algorithms
however, much of the time changing to another api will cause delays because the new api will be implemented differently than the defective one. there are also no guarantees that the new api will be bug free.
mature organizations use production apis , but even then this does not protect you against defects . the best known example has to be the pentium bug from intel discovered in 1994. although the bug did not seem to cause any real damage , any time you have an intermittent problem the source might always be a subtle defect in one of the apis that you are using.
organizations that use non-producti on (alpha or beta) apis for development run an extremely high risk of finding a defect in an api. this generally only happens in poorly funded start-ups where the technical team might have excessive decisional control in the choice of technologies.
the other source of technical uncertainty is the teams inability to develop algorithms to accomplish the software goals. these algorithms relate to the limitations of system resources such as cpu, memory, batteries, or bandwidth concern, i.e.:
- memory management
- power management
- volume of data concerns
every technical uncertainty is associated with one or more requirements. the inability to produce an algorithm to satisfy a requirement may have a work-around with acceptable behavior or might be infeasible .
if the infeasible requirements prevents a core goal from being accomplished then the project will get canceled . if affected requirements have technical work-arounds then the project will be delayed while the work-around is being developed.technical risks
some risks associated with technology are:
- risk that a defective api will cause us to look for another api
- risk that we will be unable to find a feasible solution for a core project requirement
uncertainty concerning resources
- any team member is unfamiliar with the technology you are using
- any member of the team is unfamiliar with the subject domain
- you need to develop new algorithms to handle a technical issue (see previous section)
- any team member is not committed to the project because they maintain another system
- turnover robs you of a key individual
resource uncertainty revolves around knowledge and skills , commonly this includes: 1) language , 2) api s, 3) interactive development environments ( ides ), and 4) methodology (agile, rup, spiral, etc). if your team is less knowledgeable than required then you will underestimate some if not all tasks in the project plan.
when team members are unfamiliar with the subject domain then any misunderstandings that they have will cause delays in the project. in particular, if the domain is new and the requirements are not well documented then you will probably end up with the wrong architecture , even if you have skilled architects.
the degree to which you end up with a bad architecture and a canceled project depends on how unfamiliar you are with the subject domain and technologies being used. in addition, the size of your project will magnify all resource uncertainties above.
the majority of stand-alone applications are between 1,000 and 10,000 function points. as you would expect, the amount of the system that any one person can understand drops significantly between 1,000 and 10,000 function points. the number of canceled projects goes up as our understanding drops because all uncertainties increase and issues fall between the cracks. n.b. the total % of the system understood by a single person drops precipitously between 1,000 and 10,000 function points.
when there are team members committed to maintaining legacy systems then their productivity will be uncertain. unless your legacy system behaves in a completely predictable fashion, those resources will be pulled away to solve problems on an unpredictable basis. they will not be able to commit to the team and multi-tasking will lower their and the teams productivity (see multi-tasking leads to lower productivity ).resource risks
some risks associated with resources are:
- the team is unable to build an appropriate architecture foundation for the project
- a key resource leaves the project before the core architecture is complete
uncertainty in estimation
when project end dates are estimated formally you will have 3 dates : 1) earliest finish, 2) expected finish, and 3) latest finish. this makes sense because each task in the project plan can finish in a range of time, i.e. earliest finish to latest finish. when a project only talks about a single date for the end date, it is almost always the earliest possible finish so there is a 99.9% chance that you will miss it. risk in estimation makes the most sense if:
- formal methods are used to estimate the project
- senior staff accepts the estimate
there are numerous cost estimating tools that can do a capable job. capers jones lists those methods, but also comments about how many companies don't use formal estimates and those that do don't trust them .
although cost estimating is difficult there are a number of commercial software cost estimating tools that do a capable job: cocomo ii, knowledgeplan, true price, seer, slim, softcost, costxpert, and software risk master are examples.
however just because an accurate estimate can be produced using a commercial estimating tool that does not mean that clients or executives will accept it . in fact from information presented during litigation , about half of the cases did not produce accurate estimates at all and did not use estimating tools. manual estimates tend towards optimism or predicting shorter schedules and lower costs than actually occur.
somewhat surprisingly, the other half of the case had accurate estimates , but they were rejected and replaced by forced estimates based on business needs rather than team abilities.
essentially, senior staff have a tendency to ignore formal estimates and declare the project end date. when this happens the project is usually doomed to end in disaster (see why senior management declared deadlines lead to disaster ).
so estimation is guaranteed to be uncertain. let's combine the requirements categories from before with the categories of technical uncertainty to see where our uncertainty is coming from. knowing the different categories of requirements uncertainty gives us strategies to minimize or eliminate that uncertainty.
- superfluous initial requirements
- inconsistent requirements
both of these requirements will waste time if they get into the development process where they will cause a great deal of confusion inside the team. at best these requirements will cause the team to waste time , at worst these requirements will deceive the team into building the architecture incorrectly . a quality assurance process on your initial requirements can ensure that both of these categories are empty.
the next categories of uncertainty that can be addressed before the project starts is:
- requirements with technical risk
- requirements technically infeasible
technical uncertainty is usually relatively straight forward to find when a project starts. it will generally involve non-functional requirements such as scalability, availability, extendability, compatibility, portability, maintainability, reliability, etc, etc. other technical uncertainties will be concerned with:
- algorithms to deal with limited resources, i.e. memory, cpu, battery power
- strong security models
- improving compression algorithms
in addition, even if you use formal methods for estimation, your project end date will not take into account the missing requirements . if you have a significant number of missing requirements then your estimates will be way off.estimation risks
when people say "schedule risk", they are making a statement that the project will miss the deadline. but given that improper estimation is used in most projects it is certain that the project will miss its deadline , the only useful question is " by how much? ".
schedule risk can only exist when formal methods are used and there is an earliest finish/latest finish range for the project. schedule risk then applies to any task that takes longer than its latest finish and compromises the critical path of the project. the project manager needs to try to crash current and future tasks to see if he can get the project back on track. if you don't use formal methods then this paragraph probably makes no sense :-)
the main sources of uncertainty in software development comes from:
successful software projects look for areas of uncertainty and minimize them before the project starts . some uncertainties can be qualified as risks and should be managed aggressively by the project manager during the project.
uncertainty in requirements, technology, and resources will cause delays in your project. if you are using formal methods than you need to pay attention to delays caused by uncertainties not accounted for in your model. if you don't use formal methods then every time you hit a delay caused by an uncertainty, then that delay needs to be tacked on to the project end-date (of course, it won't be :-) ).
if your project does not have strong architectural requirements and is not too big (i.e. < 1,000 function points) then you should be able to use agile software development to set-up a process that grapples with uncertainty in an incremental fashion. smaller projects with strong architectural requirements should set up a traditional project to settle the technical uncertainties before launching into agile development.
projects that use more traditional methodologies need to add a quality assurance process to their requirements to ensure a level of completeness and consistency before starting development. one way of doing this is to put requirements gathering into its own project. once you capture the requirements, if you establish that you have strong architectural concerns, then you can create a project to build out the technical architecture of the project. finally you would do the project itself. by breaking projects into 2 or 3 stages this gives you the ability to cancel the project before too much effort is sunk into a project with too much uncertainty.
regardless of your project methodology; being aware of the completeness of your requirements as well as the technical uncertainty of your non-functional requirements will help you reduce the chance of project cancellation by at least one order of magnitude.
appendix: traditional software risksthis list of software risks courtesy of capers jones. risks listed in descending order of importance.
- risk of missing toxic requirements that should be avoided
- risk of inadequate progress tracking
- risk of development tasks interfering with maintenance
- risk of maintenance tasks interfering with development
- risk that designs are not kept updated after release
- risk of unstable user requirements
- risk that requirements are not kept updated after release
- risk of clients forcing arbitrary schedules on team
- risk of omitting formal architecture for large systems
- risk of inadequate change control
- risk of executives forcing arbitrary schedules on team
- risk of not using a project office for large applications
- risk of missing requirements from legacy applications
- risk of slow application response times
- risk of inadequate maintenance tools and workbenches
- risk of application performance problems
- risk of poor support by open-source providers
- risk of reusing code without test cases or related materials
- risk of excessive feature "bloat"
- risk of inadequate development tools
- risk of poor help screens and poor user manuals
- risk of slow customer support
- risk of inadequate functionality
Opinions expressed by DZone contributors are their own.