Title: Software Engineering
1Software Engineering
2Software Engineering Part 1
- State what is meant by the term software
engineering? - Describe the software process or lifecycle
- Explain the importance of Software Development
- List the attributes of well designed software
- Describe the following Software Development
process models - Waterfall
- Evolutionary or iterative development
- Prototyping
- Extreme programming
- Spiral
3Problems with Software
- Developing software for large-scale systems is
much more difficult than development for smaller
projects - Complexity the more complex a task the more
likely errors will be introduced. Modularisation
of a large, complex task into smaller sub-tasks
can reduce the overall complexity - Sizeas the size of a project increases, the
number of individuals involved increases leading
to increased communicational complexity and thus
higher probability of errors occurring. This
requires a clear medium of communication that is
reliable and complete. - TimescalesQuality of software versus cost of
lateness - Costsoftware is now the predominant factor in
computer system cost, far exceeding hardware
cost. - ManagementGood project planning vital to
development of quality software on time.
4Case Study from SommervilleTherac-25
- Linear accelerators create high- energy beams
that can destroy tumors with minimal impact on
the surrounding healthy tissue - Therac 25 was the first linear accelerator with
dosage controlled solely by software (as opposed
to hardware)
Ref sommerville
51983 Pre-release Safety Analysis
- Programming errors have been reduced by extensive
testing on a hardware simulator and under field
conditions on teletherapy units. Any residual
software errors are not included in the analysis.
- Program software does not degrade due to wear,
fatigue, or reproduction process. - Computer execution errors are caused by faulty
hardware components and by "soft" (random) errors
induced by alpha particles and electromagnetic
noise.
Ref sommerville
6and then
- 1983 First Therac 25 installed
- 1985-1987 Six massive-overdose accidents due to
software error are reported. Overdoses caused
severe burns and death. - 1987 Recalled for extensive design changes,
including hardware to safeguard against software
errors in dosage.
Ref sommerville
7US Federal Aviation Administration
- 1981 FAA announced plans to modernize
air-traffic control. - 1985 IBM awarded contract. System estimate to
have 1.5 million lines of code, cost 2.5
billion, and be deployed by 1991. - 1987 Revised cost 4.3 billion, deployment
slipped to 1995. - 1994 FAA decided that the project would never be
completed, and cancelled it. Net loss 1.5
billion - Main issue causing project delay and cost growth
was the lack of coordination between the FAA and
air traffic controllers and service technicians
during the early stages of development - led to
design that could significantly impact the
controllers ability to control aircraft.
Ref sommerville
8Stats on software projects
- 31.1 are cancelled before they are finished
- 52.7 overrun their cost estimates by at least
189 - 33.3 overrun their time estimates by 100-200
- 94 of all projects do a restart
J. Johnson, Creating Chaos, American
Programmer, July 1995
Ref sommerville
9So why do projects fail
- Unrealistic Schedules
- Inappropriate Staffing
- Changing Requirements During Development
- Poor-Quality Work
- Believing in Magic
Ref sommerville
10What is Software Engineering?
- Software engineering is concerned with
theories, methods and tools for the systematic
production and maintenance of software products
that are developed and maintained on time and
within cost estimates.
Ref sommerville
11Software Engineering
- A systematic approach to the development of
medium to large-scale software systems, usually
involving teams of programmers. - Good software development techniques required to
minimise programming errors and localise the
scope of errors. - The development of the documentation necessary to
install, use, develop and maintain the programs
is crucial - Cost-effective software development
- A technological and a managerial discipline.
- Aims to reduce cost of software development by
- Placing greater emphasis on systematic
development - Finding out the users requirements
- Specifying the system requirements in some
formal/semi-formal way - Producing prototypes
- Trying to ensure error free code
12Software Cost!
- Bear in mind that
- it is 100 times more expensive to redesign a
problem after delivery of the product than to
identify the users requirements correctly at the
start of the design, - maintenance costs are typically twice the
development, - about 15 of development costs are in coding
software is more than CODE. - and it is obvious that effort spent in a
systematic approach (i.e. engineering) from the
start of a project will not be wasted.
13Aim of software engineeringThe aim is to develop
software which is
- RELIABLE
- Software should perform as expected by the user.
This is particularly important in safety or
life-critical areas such as Avionics, chemical
plant, medical systems. - MAINTAINABLE
- Software should be written so that changes can be
made without undue cost. - EFFICIENT
- Software should not make wasteful use of system
resources. - USABLE
- Software should have an appropriate user
interface. For example, ease of use, ease of
learning, presentation, attractive. - SECURE
- This includes confidentiality and access rights.
14What is a Software Process/Software LifeCycle?
- A set of activities whose goal is the development
or evolution of software. - Generic activities in all software processes are
- Requirement specification/analysis
- Design
- Implementation
- Testing
- Evolution
15Life Cycle Model
- Several different activities may be carried out
in each life cycle phase. - Entry and exit criteria defined for every phase.
- A phase can start only if its phase-entry
criteria have been satisfied. - A phase is considered to be complete only when
all its exit criteria are satisfied.
16Software Development Lifecycle Models
- There are a number of models for software
development lifecycle, for example - Build and fix model
- Classic Waterfall Model
- Incremental model
- Spiral model
- Rapid prototyping
- Extreme Programming
17Build and fix model
- trial and error approach
- adequate for simple software programs
- unacceptable for large and complex systems
18Waterfall Model
19Waterfall Model
- Advantages
- Organised approach, provides robust separation of
phases - Reflects common engineering practice
- Disadvantages
- Doesnt cope well with changes required by the
client - Development teams might wait for each other
- A working version of the product is available
only late - Applicability
- When requirements are well known and few changes
are likely to be needed - Can be used also for parts of larger software
systems
20Process Iteration
- System requirements ALWAYS evolve in the course
of a project so process iteration where earlier
stages are reworked is always part of the process
for large systems. - Iteration can be applied to any of the generic
process models.
21Iterative Development
- Waterfall model breaks down a project based on
activities - requirement analysis, design, coding and testing.
- Iterative development breaks down a project by
subsets of functionality. - Overall lifecycle composed of several iterations
- each iteration a self-contained mini-project
composed of activities such as requirement
analysis, design, coding and testing. - Iteration Release
- At the end of each iteration
- a stable integrated and tested system with a
subset of the final functionality completed. - provide a baseline for the developer
- usually not released to the customer until the
final iteration.
22Iterative Development Approaches
- Evolutionary
- Incremental
- Spiral
23Evolutionary development
- Main characteristics
- The phases of the software construction are
interleaved - Feedback from the user is used throughout the
entire process - The software product is refined through many
versions
24Evolutionary development
- Exploratory development
- Objective is to work with customers and to evolve
a final system from an initial outline
specification. Should start with well-understood
requirements and add new features as proposed by
the customer. - Throw-away prototyping
- Objective is to understand the system
requirements. Should start with poorly understood
requirements to clarify what is really needed.
25Evolutionary development
- Advantages
- Deals constantly with changes
- Provides quickly an initial version of the system
- Customer input throughout development yields
system closer to their (immediate) needs - Problems
- Lack of process visibility, not well-supported by
documentation - Systems structure can be corrupted by continuous
change - Special skills (e.g. in languages for rapid
prototyping) may be required. - Applicability
- For small or medium-size interactive systems
- For parts of large systems (e.g. the user
interface) - For short-lifetime systems.
26Incremental delivery
- Rather than deliver the system as a single
delivery, the development and delivery is broken
down into increments with each increment
delivering part of the required functionality. - User requirements are prioritised and the highest
priority requirements are included in early
increments. - Once the development of an increment is started,
the requirements are frozen though requirements
for later increments can continue to evolve.
27Incremental delivery advantages
- Customer value can be delivered with each
increment so system functionality is available
earlier - e.g. ATM 1)withdraw cash 2)lodge cash 3)show
balance 4)print statement 5)change PIN number
6)Top-up mobile phone - Early increments act as a prototype to help
elicit requirements for later increments. - Lower risk of overall project failure.
- The highest priority system services tend to
receive the most testing.
28Spiral development
- Combines features of the rapid prototyping and
waterfall models. - Process is represented as a spiral rather than as
a sequence of activities with backtracking. - The project starts at the centre of the spiral
and builds progressively more complete version of
the software as the spiral expands outwards. - Each loop in the spiral represents a phase in the
process and is split into 4 sectors. - No fixed phases such as specification or design -
loops in the spiral are chosen depending on what
is required. - Risks are explicitly assessed and resolved
throughout the process leading to a risk based
development model.
Customer review
29Spiral model of the software process
30Spiral model sectors
- Objective setting
- Specific objectives for the phase are identified.
- Risk assessment and reduction
- Risks are assessed and activities put in place to
reduce the key risks. - Development and validation
- A development model for the system is chosen
which can be any of the generic models. - Planning
- The project is reviewed and the next phase of the
spiral is planned.
31Spiral model features
- Advantages
- Risk reduction mechanisms are in place
- Supports iteration and reflects real-world
practices - Systematic approach
- Disadvantages
- Requires expertise in risk evaluation and
reduction - Complex, relatively difficult to follow strictly
- Applicable only to large systems
- Applicability
- Typically used for large, expensive projects.
32Prototyping
- Construction of prototypes is standard practice
in engineering. - Requirements can be validated by prototyping,
thus reducing risk. - Prototypes are used during feasibility studies
and are often constructed from reusable parts. - Typically used for 4GL development projects.
33Extreme Programming
- This is a so called agile method developed in
the 1990s for smaller systems which have to be
developed quickly - allow the development team to concentrate on the
software rather than on the design and
documentation - Agile methods rely on an iterative approach as in
the Incremental Model but with the end user
involved very closely with the developers
throughout the development process the user is
a member of the development team. - The user is continually monitoring output,
providing feedback and modifying his requirements
specification as required. - The customer is involved to extreme levels in
frequent iterative development - hence the title.
- It is approached through the use of scenarios-
what will happen if?.