software development and lifecycles cs201 fall 2004 week 11
TRANSCRIPT
Software Development Software Development and Lifecyclesand Lifecycles
CS201CS201
Fall 2004Fall 2004
Week 11Week 11
Reading for todayReading for today
Extreme Software EngineeringExtreme Software Engineering chapter 8 – acceptance testingchapter 8 – acceptance testing
skim part about fit frameworkskim part about fit framework
QuestionsQuestions be prepared to talk about how your be prepared to talk about how your
team has dealt with acceptance testingteam has dealt with acceptance testing bring in a concrete examplebring in a concrete example
What’s the Problem?What’s the Problem?
Software costs are increasing as Software costs are increasing as hardware costs decline.hardware costs decline.
Many software development Many software development disasters:disasters:
Many failures attributed to softwareMany failures attributed to software Cost of failure becoming very high:Cost of failure becoming very high:
Software Failures or Software Failures or DisastersDisasters
Shuttle launch Shuttle launch anomalyanomaly
Software Failures or Software Failures or DisastersDisasters
Outages of AT&T Outages of AT&T Long Distance Long Distance switchesswitches
Software Failures or Software Failures or DisastersDisasters
Ariane 5 launch explosion, 4 June Ariane 5 launch explosion, 4 June 19961996 http://www.esrin.esa.it/htdocs/tidc/Press/http://www.esrin.esa.it/htdocs/tidc/Press/
Press96/ariane5rep.htmlPress96/ariane5rep.html
Software Failures or Software Failures or DisastersDisasters
« ESA« ESA
The page you are looking for is not The page you are looking for is not present anymore or is temporarily present anymore or is temporarily unavailable. Please choose one of unavailable. Please choose one of the topics below and update your the topics below and update your bookmarks accordingly.bookmarks accordingly.
Software Failures or Software Failures or Disasters (cont’d)Disasters (cont’d)
Social Security disasterSocial Security disaster
We have a “software crisis” We have a “software crisis” (1968)(1968)
““Software Engineering” Software Engineering” An “early” study of “problem” DOD An “early” study of “problem” DOD
projectsprojects 47% unusable47% unusable 29% never delivered29% never delivered ONLY 19% of software useful after extensive ONLY 19% of software useful after extensive
reworkrework
Definition of Software Definition of Software EngineeringEngineering
Fairley’s:Fairley’s: technologicaltechnological and and managerialmanagerial discipline discipline concernedconcerned
systematic productionsystematic production maintenancemaintenance software products software products developed and developed and modifiedmodified on timeon time within cost estimateswithin cost estimates..
Definition of Software Definition of Software EngineeringEngineering
Engineering versus science:Engineering versus science: Production,Production, practical practical qualityquality maintenancemaintenance reusereuse standardsstandards teamsteams managementmanagement etcetc
SW Engineering Is and Is SW Engineering Is and Is Not...Not...
It is (or should be):It is (or should be): EngineeringEngineering Building Building Modifying Modifying
A systematic, careful, disciplined, A systematic, careful, disciplined, scientific activityscientific activity
SW Engineering Is and Is SW Engineering Is and Is Not...Not...
It is not:It is not: Just building Just building
small systemssmall systems new systems.new systems.
Hacking/debugging until it works.Hacking/debugging until it works. Easy, simple, boring or pointlessEasy, simple, boring or pointless
One Way to Think About ItOne Way to Think About It
Build a bridge to cross a small creekBuild a bridge to cross a small creek Build a bridge across the Golden GateBuild a bridge across the Golden Gate What’s different?What’s different?
project size project size number of peoplenumber of people lengthlength riskrisk economicseconomics
"Writing Programs""Writing Programs"
““Programming in the small”Programming in the small” ““Programming in the large”Programming in the large”
Software Lifecycle and Software Lifecycle and PhasesPhases
birth to deathbirth to death Phases might include:Phases might include:
Requirements phaseRequirements phase Specification phaseSpecification phase Design phaseDesign phase Implementation phaseImplementation phase Integration or “testing” phaseIntegration or “testing” phase Maintenance phaseMaintenance phase
Analogy: SE is like Analogy: SE is like ConstructionConstruction
Think about how buildings come to Think about how buildings come to be:be: RequirementsRequirements ArchitectureArchitecture ConstructionConstruction
Differences?Differences? MaintenanceMaintenance DesignDesign
Requirements, Design, and Requirements, Design, and ImplementationImplementation
RequirementsRequirements whatwhat WhoWho not "here is the solution"not "here is the solution"
DesignDesign howhow modelmodel evaluationevaluation
Three Key Elements in SEThree Key Elements in SE
Process:Process: life-cycle, management, assessment, life-cycle, management, assessment,
quality assurancequality assurance Method:Method:
Problem solving approachesProblem solving approaches Tools:Tools:
Software that supports methods and/or Software that supports methods and/or processesprocesses
Example: Process, Method, Example: Process, Method, ToolsTools
Unit testingUnit testing Process: How it’s to be done? When, Process: How it’s to be done? When,
who, etc.?who, etc.? Documents:Documents: Who?Who? How do we verify (check) that its been How do we verify (check) that its been
done?done?
Example: Process, Method, Example: Process, Method, Tools (cont’d)Tools (cont’d)
Method: What approach to be used?Method: What approach to be used? Example: Black box testingExample: Black box testing
Tools: Software approach for Tools: Software approach for process and methodsprocess and methods
SE Can’t Ignore Economic SE Can’t Ignore Economic AspectsAspects
New techniques, tools, etc. must be New techniques, tools, etc. must be worth itworth it
Example: Coding method CMExample: Coding method CMnewnew is is 10% faster than currently used 10% faster than currently used method CMmethod CMold. old. Should it be used?Should it be used? Common sense answer Common sense answer Software Engineering answer Software Engineering answer
Risk and SW EngineeringRisk and SW Engineering
Many problems arise because of riskMany problems arise because of risk Example problemsExample problems Good SEs work to manage and Good SEs work to manage and
reduce riskreduce risk
Managing RiskManaging Risk
Risk areasRisk areas How to identify, manage and reduce How to identify, manage and reduce
riskrisk Prototyping, ...Prototyping, ...
Reminder: Lifecycle, PhasesReminder: Lifecycle, Phases
Phases might include:Phases might include: Requirements phaseRequirements phase Specification phaseSpecification phase Design phaseDesign phase Implementation phaseImplementation phase Integration or “testing” phaseIntegration or “testing” phase Maintenance phaseMaintenance phase
Relative Cost Per PhaseRelative Cost Per Phase
6%
5%
7% 8%
Maintenance 67%
Integration
Modulecoding
Moduletesting
Design
Specification (Analysis)5%
2%Requirements
Why Is Maintenance Why Is Maintenance Expensive?Expensive?
Good software is maintained. Good software is maintained. Different types of maintenanceDifferent types of maintenance
Corrective [20%]Corrective [20%] Perfective [60%]Perfective [60%] Adaptive [20%]Adaptive [20%]
Maintenance matters and costs even if Maintenance matters and costs even if released code has zero defects!released code has zero defects!
Source of Defects by PhaseSource of Defects by Phase
60 to 70 % of faults are from specification or design60 to 70 % of faults are from specification or design Data of Kelly, Sherif, and Hops [1992]Data of Kelly, Sherif, and Hops [1992]
1.9 faults per page of specification1.9 faults per page of specification 0.9 faults per page of design0.9 faults per page of design 0.3 faults per page of code0.3 faults per page of code
Data of Bhandari et al. [1994]:Data of Bhandari et al. [1994]:Faults at end of design phase of new version of productFaults at end of design phase of new version of product 13% of faults from previous version of product13% of faults from previous version of product 16% of faults in new specifications16% of faults in new specifications 71% of faults in new design71% of faults in new design
Cost to Correct Fault Cost to Correct Fault According to PhaseAccording to Phase
Requirements
Design IntegrationSpecification
(Systems Analysis)
Implementation Maintenance
1 2 4 1030
200
3
Planning
100
50
150
200
Ap
pro
xim
ate
re
lativ
e c
ost
to
de
tect
an
d c
orr
ect
a f
au
lt368
52
1994 data [Kan et al.]1981 data [Boehm]
250
300
350
Life-cycle Process ModelsLife-cycle Process Models
Process: Process: done by development organizationdone by development organization the the events or tasksevents or tasks sequencesequence
OrganizationsOrganizations want process that is: want process that is: a well-defineda well-defined well-understoodwell-understood repeatablerepeatable
Various Models for SW Various Models for SW LifecylesLifecyles
““Historical Models”Historical Models” Waterfall, Spiral modelsWaterfall, Spiral models
Government StandardsGovernment Standards DoD ,FAA DoD ,FAA
Corporate “Standards” or common Corporate “Standards” or common practicespractices roll your ownroll your own
Why Learn About Process Why Learn About Process Now?Now?
There are general principles of about:There are general principles of about: What we do at various stages of SW What we do at various stages of SW
developmentdevelopment How to inject quality into SWHow to inject quality into SW How to avoid early problems that cause How to avoid early problems that cause
huge problems laterhuge problems later Recognize that SE is not just writing Recognize that SE is not just writing
codecode
Traditional ‘waterfall’ Traditional ‘waterfall’ lifecyclelifecycleRequirements
analysis
Design
Code
Test
Maintenance
Is the Spiral Model the Is the Spiral Model the Answer?Answer?
MaybeMaybe Original study: Original study:
Intended for internal development Intended for internal development large systemslarge systems
But, the spiral model is importantBut, the spiral model is important HistoryHistory illustrativeillustrative
Other Model: Agile Process Other Model: Agile Process ModelsModels
Counters "heavyweight" processesCounters "heavyweight" processes XP :“a deliberate and disciplined XP :“a deliberate and disciplined
approach to software approach to software development.”development.” good for risky projectsgood for risky projects EmphasizesEmphasizes
pair-programmingpair-programming test-first, then codetest-first, then code what else?what else?
Final Thoughts on Process Final Thoughts on Process ModelsModels
Every organization Every organization does havedoes have a a processprocess
People have strong feelings on this People have strong feelings on this subject about what works!subject about what works!
(IMHO) There is no “silver bullet” (IMHO) There is no “silver bullet” here.here.