• No results found

Chair of Software Engineering. Chair of Software Engineering. Windows XP: > 45 M Lines of code (millions) 20 Unix V7: 10,000

N/A
N/A
Protected

Academic year: 2021

Share "Chair of Software Engineering. Chair of Software Engineering. Windows XP: > 45 M Lines of code (millions) 20 Unix V7: 10,000"

Copied!
8
0
0

Loading.... (view fulltext now)

Full text

(1)

Introduction to Programming – Lecture 26

1

Chair of Software Engineering

Introduction to Programming

Bertrand Meyer

Last revised 2 February 2004

Introduction to Programming – Lecture 26

2

Chair of Software Engineering

Lecture 26:

From Programming

to

Software Engineering

Introduction to Programming – Lecture 26

3

Chair of Software Engineering

Software engineering (1)

The processes, methods, techniques, tools and languages for developing quality

operational software.

Introduction to Programming – Lecture 26

4

Chair of Software Engineering

Software engineering (2)

The processes, methods, techniques, tools and languages for developing quality

operational software that may need to

ƒBe of large size

ƒBe developed and used over a long period

ƒInvolve many developers

ƒUndergo many changes and revisions

5

Operating systems: source lines

1990 1995 1998 2000 2 10 20 40 30

Lines of code (millions)

Windows 3.1: 3 M Windows NT: 4 M Windows 95: 15 M Windows 98: 18 M Windows 2000: 40 M 1992 Windows XP: > 45 M 6

Not just Windows

1990 1992 1995 1998 2000 2 10 20 40 30

Lines of code (millions)

Windows 3.1: 3 M Windows NT: 4 M Windows 95: 15 M Windows 98: 18 M Windows 2000: 40 M Red Hat 6.2 17 M Red Hat 7.1 30 M Linux: 10,000 Solaris 7: 12 Mio. Unix V7: 10,000 Windows XP: > 45 M

(2)

Introduction to Programming – Lecture 26

7

Chair of Software Engineering

Not just operating systems

Introduction to Programming – Lecture 26

8

Chair of Software Engineering

The basic issue

Developing software systems that are

ƒ On time and within budget

ƒ Of high immediate quality

ƒ Possibly large and complex

ƒ Extendible

Introduction to Programming – Lecture 26

9

Chair of Software Engineering

US Software industry, 1998

Standish Group: “Chaos” Report

250,000 Software projects, $275 billions

ƒ Project results:

ƒ 28% abandoned (1994: 31%)

ƒ 27% successful (1994: 16%) The rest: “challenged”

ƒ Smaller projects have higher chances of success

Introduction to Programming – Lecture 26

10

Chair of Software Engineering

NIST report on testing (May 2002)

ƒ Financial

consequences, on developers and users, of “insufficient testing infrastructure”

$ 59.5 B.

(Finance $ 3.3 B, Car and aerospace $ 1.8 B. etc.)

11

Software quality factors

ƒ External: of interest to customers ƒExamples: Reliability, Extendibility ƒ Internal: of interest to customers

ƒExamples: Modularity, Style

12

Some internal factors

ƒ Modularity

ƒ Observation of style rules

ƒ Consistency

ƒ Structure

(3)

Introduction to Programming – Lecture 26

13

Chair of Software Engineering

External factors: reliability

Reliability = Correctness + Robustness + Integrity Hostility Integrity Errors Correctness Specification Correctness

Introduction to Programming – Lecture 26

14

Chair of Software Engineering

Reliability

ƒ Correctness

The system’s ability to perform its functions according to the specification, in cases covered by the specification

ƒ Robustness

The system’s ability to handle erroneous cases safely

ƒ Integrity

The system’s ability to protect its users, its data and itself against hostile uses

Hostility Integrity Errors Robustness Specification Correctness

Introduction to Programming – Lecture 26

15

Chair of Software Engineering

External factors

Productquality (immediate):

ƒ Reliability

ƒ Efficiency

ƒ Ease of use

ƒ Ease of learning Processquality:

ƒ Timeliness

ƒ Cost-effectiveness Product quality (long term):

ƒ Extendibility

ƒ Reusability

ƒ Portability

Introduction to Programming – Lecture 26

16

Chair of Software Engineering

Software tasks

ƒ Requirements analysis

ƒ Specification

ƒ Design

ƒ Implementation

ƒ Validation & Verification (V&V)

ƒ Management

ƒ Planning and estimating

ƒ Measurement

17

Validation & Verification

ƒ Verification: checking that you have built the system right

(followed all rules)

ƒ Validation: checking that you have built the right system

(satisfied user needs)

18

Requirements analysis

ƒ Understanding user needs

(4)

Introduction to Programming – Lecture 26

19

Chair of Software Engineering

Software lifecycle models

Describe an overall distribution of the software construction into tasks, and the ordering of these tasks

They are models in two ways:

ƒProvide an abstracted version of reality

ƒDescribe an ideal scheme, not always followed in practice

Introduction to Programming – Lecture 26

20

Chair of Software Engineering

The waterfall model (Royce, 1970)

FEASIBILITY STUDY REQUIREMENTS ANALYSIS SPECIFICATION GLOBAL DESIGN DETAILED DESIGN IMPLEMENTATION DISTRIBUTION VALIDATION & VERIFICATION PROJECT PROGRESS

Introduction to Programming – Lecture 26

21

Chair of Software Engineering

Lifecycle: what not to achieve

As Management requested it As the Project Leader defined it As Systems designed it

As Programming developed it As Operations installed it What the user wanted (Pre-1970 cartoon; origin unknown)

Introduction to Programming – Lecture 26

22

Chair of Software Engineering

The waterfall model

FEASIBILITY STUDY REQUIREMENTS ANALYSIS SPECIFICATION GLOBAL DESIGN DETAILED DESIGN IMPLEMENTATION DISTRIBUTION VALIDATION & VERIFICATION PROJECT PROGRESS 23

A more realistic version

FEASIBILITY STUDY REQUIREMENTS ANALYSIS GLOBAL DESIGN DETAILED DESIGN IMPLEMENTATION ACCEPTANCE TESTING SYSTEM TESTING UNIT TESTING 24

The spiral model

ƒ Apply a waterfall-like approach to successive prototypes

Iteration 1

Iteration 2 Iteration 3

(5)

Introduction to Programming – Lecture 26

25

Chair of Software Engineering

The problem with prototyping

ƒ Software development is hard because of the need to reconcile conflicting criteria, e.g. portability and efficiency

ƒ A prototype typically sacrifices some of these criteria

ƒ Risk of shipping the prototype

Introduction to Programming – Lecture 26

26

Chair of Software Engineering

Seamless, incremental development

The Eiffel view:

ƒ Single set of notation, tools, concepts, principles throughout

ƒ Eiffel is as much for analysis & design as for implementation & maintenance

ƒ Continuous, incremental development

ƒ Keep model, implementation and documentation

consistent

ƒ Reversibility: can go back and forth

Introduction to Programming – Lecture 26

27

Chair of Software Engineering

Seamless development (1)

TRANSACTION, PLANE, CUSTOMER, ENGINE...

Example classes

Specification

Introduction to Programming – Lecture 26

28

Chair of Software Engineering

Seamless development (2)

TRANSACTION, PLANE, CUSTOMER, ENGINE... Example classes Design Specification STATE, USER_COMMAND... 29

Seamless development (3)

Implementation TRANSACTION, PLANE, CUSTOMER, ENGINE... Example classes Design Specification STATE, USER_COMMAND... HASH_TABLE, LINKED_LIST... 30

Seamless development (4)

Implementation V & V TRANSACTION, PLANE, CUSTOMER, ENGINE... TEST_DRIVER, ... Example classes Design Specification STATE, USER_COMMAND... HASH_TABLE, LINKED_LIST...

(6)

Introduction to Programming – Lecture 26

31

Chair of Software Engineering

Seamless development (5)

Implementation V & V TRANSACTION, PLANE, CUSTOMER, ENGINE... TEST_DRIVER, ... Example classes Design Specification STATE, USER_COMMAND... HASH_TABLE, LINKED_LIST... Genera-lization AIRCRAFT, ...

Introduction to Programming – Lecture 26

32

Chair of Software Engineering

Generalization

ƒ Prepare for reuse

ƒ For example:

ƒ Remove built-in limits

ƒ Remove dependencies on specifics of project

ƒ Improve documentation, contracts...

ƒ Few companies have the guts to provide the budget for this

Introduction to Programming – Lecture 26

33

Chair of Software Engineering

Seamless development

Implementation V & V TRANSACTION, PLANE, CUSTOMER, ENGINE... TEST_DRIVER, ... Example classes Design Specification STATE, USER_COMMAND... HASH_TABLE, LINKED_LIST... Genera-lization AIRCRAFT, ...

Introduction to Programming – Lecture 26

34

Chair of Software Engineering

Reversibility

S V D I S G 35

The cluster model

I V D S G I V D S G I V D S G I V D S G Cluster 1 Cluster 2 Cluster n 36

Agile methods and extreme programming ƒ De-emphasize process and reuse

ƒ Emphasize the role of tests to guide the development

(7)

Introduction to Programming – Lecture 26

37

Chair of Software Engineering

Validation and Verification

ƒ Not just testing:

Static Analysistools explore code for possible deficiencies, e.g. uninitialized variables

ƒ Should be performed throughout the process, not just at the end

Introduction to Programming – Lecture 26

38

Chair of Software Engineering

Formal methods

ƒ Use mathematics as the basis for software development

ƒ A software system is viewed as a

mathematical theory, progressively refined until directly implementable

ƒ Every variant of the theory and every refinement step is proved

ƒ Proof supported by computerized tools

ƒ Example: Atelier B, security system of newest Paris Metro line

Introduction to Programming – Lecture 26

39

Chair of Software Engineering

Metrics

Things to measure:

ƒ Product attributes: lines of code, number of classes, complexity of control structure (“cyclomatic

number”), complexity and depth of inheritance structure, presence of contracts...

ƒ Project attributes: number of people, person-months, costs, time to completion, time of various activities (analysis, design, implementation, V&V etc.)

Taking good measurements helps take good measures

Introduction to Programming – Lecture 26

40

Chair of Software Engineering

Cost models

ƒ Attempt to evaluate cost of software development ahead of project, based on estimate of parameters

ƒ Example: COCOMO (Constructive Cost Model),

Barry Boehm Time Effort (pm) Program type 2.5 ∗pm∗0.32 3.6 ∗L ∗1.20 System 2.5 ∗pm∗0.35 3.0 ∗L ∗1.12 Utility 2.5 ∗pm∗0.38 2.4 ∗L ∗1.05 Application L: 1000 ∗Delivered Source Instructions (KDSI) 41

Software reliability models

ƒ Estimate number of bugs from ƒ Characteristics of program

ƒ Number of bugs found so far

ƒ Variant: “Fault injection”

42

Project management

ƒ Team specialties: customer relations, analyst, designer, implementer, tester, manager, documenter...

ƒ What role for the manager: managerial only, or technical too?

(8)

Introduction to Programming – Lecture 26

43

Chair of Software Engineering

Software engineering

ƒ In the end it’s code

ƒ Don’t underestimate the role of tools, language and, more generally, technology

ƒ Bad management kills projects

Good technology makes projects succeed

Introduction to Programming – Lecture 26

44

Chair of Software Engineering

References

Related documents

Thus, the goal of the research is to define the effective ways of students’ foreign language communicative competence formation by means of reading and speaking activities within

the Kazakh state and aspiring middle classes in Kazakhstan based on the politics of mass aspiration which also stems from the people’s internalized drive and desire

One possible approach, found in the Obama campaign plan, would be to establish a purchasing exchange at the federal level. Ensuring that health insurance is uniformly available

The JMA physicians’ liability insurance covered the liability of individual Class-A members, but payments for the liability of non-member physi- cians were cut, and there was a rush

systems, technical systems, embedded systems, real-time systems, distributed systems, system software, business systems, UML itself, ...).. Requirements Engineering and

We undertake a systematic review of the different biological, operational and chemical hazards within the agri-food industry using a dataset of 2,070 registered

Our analysis revealed two overarching impression management strategies – Strategic disclosure and Social congruence which organizational representatives used to

Type of governance innovation HIV/AIDS Ebola AMR General/Other Creation of new institutions and governance arrangements New institutions and partnerships : UNAIDS, GFATM, Unitaid PDPs