© Andrew IrelandSoftware Design F28SD2 Software Design: Overview Andrew Ireland School of...

25
© Andrew Ireland Software Design F28SD2 Software Design: Overview Andrew Ireland School of Mathematical & Computer Sciences Heriot-Watt University Edinburgh

Transcript of © Andrew IrelandSoftware Design F28SD2 Software Design: Overview Andrew Ireland School of...

No Slide TitleHeriot-Watt University
[email protected]
[email protected]
Aims & Objectives
The course explores the nature and challenges associated with software design
Common core, i.e. design methods, processes & notations.
Additional material:
Information Systems Life-cycle, Feasibility and Requirements Testing & Analysis (BSc IS)
*
Design workshops Thurs 12.15pm EM 2.44 (starts week 2)
Industrial guest lecture
Week 7 reading week
Weeks 11 & 12 Feedback & Revision
Exam 60%
*
The Nature of Software
Software lies at the nerve centre of most engineered artifacts and business processes, i.e. from consumer electronics to financial modelling, and from automotives to medical applications
A single defect in millions of lines of code can result in a system failure (safety critical systems are and exception)
*
Software is among the most complex of engineered artifacts
Software is flexible, so is expected to conform to standards imposed by other components, e.g. hardware, external agents etc
Flexibility also increases the rate at which software is changed during its lifetime
The invisibility of software makes it harder to contextualize compared to other engineering sectors, e.g. construction industry
Brooks 1987
Software Design F28SD2
The Economic Motive
“… the national annual cost estimates of an inadequate infrastructure for software testing are estimated to be $59.5 billion.’’
Federal Study, US Dept of Commerce, May 2002
“Worse - and spreading the effect of software flaws far beyond the original customer – several devastating computer viruses have taken advantage of bugs and defects in common operating systems ...”
CNET Networks Inc, Aug 2002
*
Software Design F28SD2
The Economic Motive
US Internal Revenue Service - a failed $4-billion modernization effort in 1997, followed by an equally troubled $8-billion update.
FBI - $170-million virtual case-file management system was terminated in 2005.
Moody’s Corp: financial research & analysis credit-worthiness ratings:
“Moody’s awarded incorrect triple-A ratings to billions of dollars worth of a type of complex debt product due to a bug in its computer models”
Financial Times 2008
Software Design F28SD2
The Security Motive
The recent UK defence spending review identified Cyber Security as a priority area, giving rise to the Office of Cyber Security
US Government formed a new branch of the military: the US Cyber Command (May 2010)
Malware that can bring down real-world infrastructure is a clear and present danger, e.g.
*
Design should play a pivotal role:
Requirements
An evolutionary process involving:
*
Interface design: define the interface for each subsystem
Component design: decomposition of subsystems into components
Data structure design: data structuring decisions
Algorithm design: algorithmic decisions
Function-oriented design:
System state is shared between a collection of functions (subroutines)
Object-oriented design:
Software is structured around a collection of objects, where each object is responsible for it own state
Object organized into a class hierarchy, exploiting inheritance
*
Quality
Cohesion:
A measure of how well the parts of a component fit together, i.e. how functionally related the parts are
For example, strong cohesion exists when all parts of a component contribute different aspects of related functions
Strong cohesion promotes understanding and reasoning, and thus provides dividends with respect to maintenance and reuse via separation of concerns
*
Tightly coupled components share data (common coupling) or exchange control information (control coupling)
Loose coupling is achieved by not having shared data, or at least restricting access, e.g. data communicated by parameters
Loose coupling promotes separation of concerns
Object-oriented design promotes loose coupling, however, inheritance increases coupling, i.e. a class is coupled with its super-class
*
Quality
Understandability:
Understandability of a design is very important for maintenance and change
Cohesion, coupling and complexity impact on the understandability of a design
Adaptability:
*
The Cost of Failure
Unmanned rocket with a cargo of scientific satellites ($500 million)
In 1996, just 39 seconds into its maiden flight an overflow error occurred resulting the Ariane 5 control software initiating a self-destruction operation!
The Cost of Failure
The Cost of Failure
*
The Cost of Failure
Therac-25 delivers two kinds of electron beams: low energy and high energy.
*
The Cost of Failure
Among the parameters a Therac-25 operator was able to set are the beam energy levels & beam modes. The latter effects the setting of the magnets.
Operators have two ways of setting the system parameters:
data entry procedure
screen based editing
*
The Cost of Failure
*
Recommended reading:
D. Budgen, “Software Design”, Addison-Wesley 2003
I. Sommerville, “Software Engineering”, Addison-Wesley 2007
*