introduction to software engineering lecture 3 andré van der hoek

67
Introduction to Software Engineering Lecture 3 André van der Hoek

Upload: lewis-long

Post on 17-Dec-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Introduction to Software Engineering Lecture 3 André van der Hoek

Introduction to Software Engineering

Lecture 3

André van der Hoek

Page 2: Introduction to Software Engineering Lecture 3 André van der Hoek

Today’s Lecture

What makes software engineering difficult?

An introduction to software life cycle models

Page 3: Introduction to Software Engineering Lecture 3 André van der Hoek

Visibility vs…

Page 4: Introduction to Software Engineering Lecture 3 André van der Hoek

…Invisibility

Software as is cannot be viewed meaningfully Stack of paper Set of files

Software cannot be interpreted easily How to read source code? How to read a million lines of source code? How to read a part of source code?

Invisibility affects process How to measure progress?

Is a bigger stack of paper closer to the end-result than a smaller stack of paper?

Page 5: Introduction to Software Engineering Lecture 3 André van der Hoek

Manageable Complexity vs…

Page 6: Introduction to Software Engineering Lecture 3 André van der Hoek

…Unmanageable Complexity

Software cannot be easily abstracted Formulas

Only in very few domains Diagrams, graphs, and other representations

Typically non-hierarchical Far too many cross-references

Few concepts are available to use in an abstraction

Tension between high-level understanding and low-level detailed specification High-level understanding leaves out

important details Aggregation often does not work

Page 7: Introduction to Software Engineering Lecture 3 André van der Hoek

Environment Can Be Changed vs…

Page 8: Introduction to Software Engineering Lecture 3 André van der Hoek

…Environment Cannot Be Changed

Software has to adhere to the “world” in which it is placed Cannot change the hardware Cannot change the way people do business

The “world” is often not clearly specified How can you change something that you

cannot specify? Leads to many software changes

Perception is that software is easier to change

Page 9: Introduction to Software Engineering Lecture 3 André van der Hoek

No Major Changes vs…

Page 10: Introduction to Software Engineering Lecture 3 André van der Hoek

…Major Changes

Software is remarkably easy to change Change the source code, recompile, rerun “One line here, one line there”

Unfortunately, even small changes can have disastrous consequences A single wrong character can surreptitiously

change the behavior of the software The effects of most changes are only visible in

certain circumstances

Sometimes, the environment does change Software is used in different organizations Software is used for different purposes

Page 11: Introduction to Software Engineering Lecture 3 André van der Hoek

Drastic Consequences

Deceased patients X-ray machine delivered very high doses

because of a timing problem in its control software

Crashed planes Software prevented pilots from performing

emergency maneuvers Software had similar codes for different

airports Decreased national security

NSA computers down for four days due to a “software problem”Peter Neumann’s Risks Digest:

http://catless.ncl.ac.uk/Risks

Page 12: Introduction to Software Engineering Lecture 3 André van der Hoek

Analysis 2%Specification

5%Design

6%

Module Coding5%

Module Testing7%

Integration8%

Maintenance67%

High Cost

[Schach]

Page 13: Introduction to Software Engineering Lecture 3 André van der Hoek

Cost of Change Progressively Higher

0

20

40

60

80

100

120

140

160

180

200

Analysis Specification Design Implementation Integration Maintenance

[Schach]

Page 14: Introduction to Software Engineering Lecture 3 André van der Hoek

Processes as a Remedy

Institute processes through which software is engineered Cover all steps from initial idea and

requirements to delivery, maintenance, and final retirement

Make sure we do the right things/things right

Make sure we do not forget to do anything Different processes for different kinds of

software Not a silver bullet [Brooks “No Silver

Bullet”] Software is still intrinsically difficult to deal

with Processes help, but cannot guarantee

anything

Remember: People + Processes + Tools Product

Page 15: Introduction to Software Engineering Lecture 3 André van der Hoek

Processes

Elements Activities (“Phases”) Artifacts

Can include process specifications Resources

People (their time and their cost) Tools (their time and their cost)

Relationships between the elements Precedence, requires, provides, refines to, …

Constraints Time Cost Qualities (repeatable process?)

Page 16: Introduction to Software Engineering Lecture 3 André van der Hoek

Software Life Cycle Models

Build-and-fix Waterfall Rapid prototyping Incremental Synchronize-and-stabilize Spiral

A software life cycle model is a high-level process

Page 17: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 18: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 19: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 20: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 21: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 22: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 23: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 24: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 25: Introduction to Software Engineering Lecture 3 André van der Hoek

Build-and-Fix

Build first version

Modify untilclient is satisfied

Operations mode

RetirementDevelopmentMaintenance

Page 26: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 27: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 28: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 29: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 30: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 31: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 32: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 33: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 34: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 35: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 36: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 37: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 38: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 39: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 40: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 41: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 42: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 43: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 44: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 45: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 46: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 47: Introduction to Software Engineering Lecture 3 André van der Hoek

Waterfall

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 48: Introduction to Software Engineering Lecture 3 André van der Hoek

Rapid Prototyping

Operations mode

Retirement

Build and discardsimple prototype

Verify

SpecificationphaseVerify

DesignphaseVerify

ImplementationphaseTest

IntegrationphaseTest

Changedrequirements

Verify

DevelopmentMaintenance

Page 49: Introduction to Software Engineering Lecture 3 André van der Hoek

FOR EACH BUILDPerform detailed design, implementation, and integration. Test. Deliver to client.

Incremental

Operations mode

Retirement

RequirementsphaseVerify

SpecificationphaseVerify

ArchitecturaldesignVerify

DevelopmentMaintenance

Page 50: Introduction to Software Engineering Lecture 3 André van der Hoek

Synchronize-and-Stabilize

Specifications Implementation,Integration

Deliver toclient (version 1)

Specifications Design Implementation,Integration

Deliver toclient (version 2)

Specifications Design Implementation,Integration

Deliver toclient (version 3)

Specifications Design Implementation,Integration

Deliver toclient (version n)

......

...

Specification team Design team Implementation/integration team

Design

Page 51: Introduction to Software Engineering Lecture 3 André van der Hoek

Synchronize-and-Stabilize

Specifications Implementation,Integration

Deliver toclient (version 1)

Specifications Design Implementation,Integration

Deliver toclient (version 2)

Specifications Design Implementation,Integration

Deliver toclient (version 3)

Specifications Design Implementation,Integration

Deliver toclient (version n)

......

...

Specification team Design team Implementation/integration team

Design

Page 52: Introduction to Software Engineering Lecture 3 André van der Hoek

Synchronize-and-Stabilize

Specifications Implementation,Integration

Deliver toclient (version 1)

Specifications Design Implementation,Integration

Deliver toclient (version 2)

Specifications Design Implementation,Integration

Deliver toclient (version 3)

Specifications Design Implementation,Integration

Deliver toclient (version n)

......

...

Specification team Design team Implementation/integration team

Design

Page 53: Introduction to Software Engineering Lecture 3 André van der Hoek

Synchronize-and-Stabilize

Specifications Implementation,Integration

Deliver toclient version 1

Specifications Design Implementation,Integration

Deliver toclient version 2

Specifications Design Implementation,Integration

Deliver toclient version 3

Specifications Design Implementation,Integration

Deliver toclient version n

......

...

Specification team Design team Implementation/integration team

Design

Page 54: Introduction to Software Engineering Lecture 3 André van der Hoek

Synchronize-and-Stabilize

Specifications Implementation,Integration

Deliver toclient version 1

Specifications Design Implementation,Integration

Deliver toclient version 2

Specifications Design Implementation,Integration

Deliver toclient version 3

Specifications Design Implementation,Integration

Deliver toclient version n

......

...

Specification team Design team Implementation/integration team

Design

Page 55: Introduction to Software Engineering Lecture 3 André van der Hoek

Synchronize-and-Stabilize

Specifications Implementation,Integration

Deliver toclient version 1

Specifications Design Implementation,Integration

Deliver toclient version 2

Specifications Design Implementation,Integration

Deliver toclient version 3

Specifications Design Implementation,Integration

Deliver toclient version n

......

...

Specification team Design team Implementation/integration team

Design

Page 56: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 57: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 58: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 59: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 60: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 61: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 62: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 63: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Page 64: Introduction to Software Engineering Lecture 3 André van der Hoek

Spiral

Riskanalysis

Riskanalysis

Riskanalysis

Riskanalysis

Rapid

prototype

Specification

Design

Implementation

VerifyVerify

VerifyVerify

Full spiral model is discussed in Sommerville

Page 65: Introduction to Software Engineering Lecture 3 André van der Hoek

Boehm’s Top Ten Software Risks

1. Personnel shortfalls2. Unrealistic schedules and budgets3. Developing the wrong software functions4. Developing the wrong user interface5. “Gold plating”

6. Continuing stream of requirements changes7. Shortfalls in externally furnished components8. Shortfalls in externally performed tasks9. Real-time performance shortfalls10. Straining computer-science capabilities

Page 66: Introduction to Software Engineering Lecture 3 André van der Hoek

A Comparison of Life Cycle Models

Model Strengths WeaknessesBuild-and-Fix Fine for small programs that do not

require much maintenanceTotally unsatisfactorily for nontrivial programs

Waterfall Disciplined approachDocument driven

Delivered product may not meet client’s needs

RapidPrototyping

Ensures that delivered product meets client’s needs

A need to build twiceCannot always be used

Incremental Maximizes early return on investmentPromotes maintainability

Requires open architectureMay degenerate into build-and-fix

Synchronize-and-stabilize

Future user’s needs are metEnsures components can be successfully integrated

Has not been widely used other than in Microsoft

Spiral Incorporates features of all the above models

Can be used only for large-scale productsDevelopers have to be competent at risk-analysis

Page 67: Introduction to Software Engineering Lecture 3 André van der Hoek

Homework

1. Read Chapter 3 of van Vliet