88
ESTIMATION CON COSMIC Congreso Nacional de Medición y Estimación de Software ‘15 Alain Abran Ecole de technologie supérieure – University of Québec (Canada) 1

CNMES15 - Estimation con COSMIC - Alain Abran

Embed Size (px)

Citation preview

Page 1: CNMES15 - Estimation con COSMIC - Alain Abran

ESTIMATION CON COSMIC

Congreso Nacional de Medición y Estimación de Software ‘15

Alain Abran Ecole de technologie supérieure – University of Québec (Canada)

1

Page 2: CNMES15 - Estimation con COSMIC - Alain Abran

Alain Abran

20 years 20 years

+ 35 PhD

Development

Maintenance

Process Improvement

ISO: 19761,

9216, 25000,

15939, 14143,

19759

© Copyrights Abran2015

Page 3: CNMES15 - Estimation con COSMIC - Alain Abran

Hablo Español…. un poquito!

© Copyrights Abran 2015

3

Page 4: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. COSMIC Estimation models with data from industry

5. Conditions for credible estimation models

4

© Copyrights Abran 2015

Page 5: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. COSMIC Estimation models with data from industry

5. Conditions for crdible estimation models

5

© Copyrights Abran 2015

Page 6: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 6

Page 7: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 7

Page 8: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 8

Page 9: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 9

Page 10: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 10

Page 11: CNMES15 - Estimation con COSMIC - Alain Abran

Softare Estimation Tools: Availability & Costs

11

© Copyrights Abran 2015

Page 12: CNMES15 - Estimation con COSMIC - Alain Abran

Consumers & Quality!

12

© Copyrights Abran 2015

Page 13: CNMES15 - Estimation con COSMIC - Alain Abran

Estimation Tools & Quality? 13

© Copyrights Abran 2015

Page 14: CNMES15 - Estimation con COSMIC - Alain Abran

Or?

(Software) Estimation

© Copyrights Abran 2015 14

Page 15: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. COSMIC Estimation models with data from industry

5. Conditions for credible estimation models

15

© Copyrights Abran 2015

Page 16: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 16

Page 17: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 17

Page 18: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 18

Page 19: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 19

Page 20: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 20

Page 21: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 21

Page 22: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 22

Page 23: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 23

Page 24: CNMES15 - Estimation con COSMIC - Alain Abran

24

Estimator role: Provide information

about uncertainty range

© Copyrights Abran 2015

Page 25: CNMES15 - Estimation con COSMIC - Alain Abran

25

Manager role:

Pick a number & Manage Risk

© Copyrights Abran 2015

Page 26: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. COSMIC Estimation models with data from industry

5. Conditions for credible estimation models

26

© Copyrights Abran 2015

Page 27: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. COSMIC Estimation models with data from industry

5. Conditions for credible estimation models

27

© Copyrights Abran 2015

Page 28: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 28

Page 29: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 29

Page 30: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 30

Page 31: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 31

Page 32: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 32

Page 33: CNMES15 - Estimation con COSMIC - Alain Abran

Fixed=1,046 hrs

© Copyrights Abran 2015 33

Page 34: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 34

Page 35: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 35

Page 36: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. Estimation models with COSMIC: data from industry

5. Conditions for a credible estimation models

36

© Copyrights Abran 2015

Page 37: CNMES15 - Estimation con COSMIC - Alain Abran

COSMIC data from Industry

Practical experimentations with the

COSMIC method in Automotive

embedded software field

By: Sophie Stern

Renault

37

© Copyrights Abran 2015

Page 38: CNMES15 - Estimation con COSMIC - Alain Abran

Renault – 2012

38

© Copyrights Renault 2012

Page 39: CNMES15 - Estimation con COSMIC - Alain Abran

Renault – 2012 39

© Copyrights Renault 2012

Page 40: CNMES15 - Estimation con COSMIC - Alain Abran

Renault – 2012 40

© Copyrights Renault 2012

Page 41: CNMES15 - Estimation con COSMIC - Alain Abran

41

© Copyrights Renault 2012

Page 42: CNMES15 - Estimation con COSMIC - Alain Abran

Renault: Estimation & Negociations

42

© Copyrights Renault 2012

Page 43: CNMES15 - Estimation con COSMIC - Alain Abran

Renault COSMIC context & usage

Automated measurements Matlab Simulink 99% accuracy

Estimation of CPU memory space based on COSMIC function points Planning of Requirements Specifications workload based on COSMIC functions points

43

© Copyrights Abran 2015

Page 44: CNMES15 - Estimation con COSMIC - Alain Abran

Industry data with COSMIC

Productivity Analysis & benchmarking of projects from:

Financial governmental organization (Canada)

44

© Copyrights Abran 2015

Page 45: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 45

Page 46: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 46

Page 47: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 47

Page 48: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 48

Page 49: CNMES15 - Estimation con COSMIC - Alain Abran

Which estimation model to use

in which contexts?

© Copyrights Abran 2015 49

Page 50: CNMES15 - Estimation con COSMIC - Alain Abran

© Copyrights Abran 2015 50

International benchmarking

with ISBSG

Page 51: CNMES15 - Estimation con COSMIC - Alain Abran

Organization A: Effort = 31hrs/CFP x CFP + 2,411 hours

ISBSG benchmark: Effort = 10hrs/CFP x CFP + 2,138 hours

© Copyrights Abran 2015 51

Page 52: CNMES15 - Estimation con COSMIC - Alain Abran

A Managed Process

Monitoring & Control

Measurements Controls Controls Measurements

52 © Copyrights Abran 2015

NOT

Page 53: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. Estimation models with COSMIC: data from industry

5. Conditions for credible estimation models

53

© Copyrights Abran 2015

Page 54: CNMES15 - Estimation con COSMIC - Alain Abran

A look at the most-known estimation approach: The ‘COCOMO-like’ models Effort = F (Size, +15 cost drivers)

54

© Copyrights Abran 2015

Page 55: CNMES15 - Estimation con COSMIC - Alain Abran

Each COCOMO cost driver has a similar structure

55

Low High Very high

Distinct irregular intervals for each factor

Each interval is assigned the same ordered label

(ordinal scale type)

© Copyrights Abran 2015

Page 56: CNMES15 - Estimation con COSMIC - Alain Abran

56 © Copyrights Abran 2015

Page 57: CNMES15 - Estimation con COSMIC - Alain Abran

57

Impact guessed

by ‘experts’

© Copyrights Abran 2015

Page 58: CNMES15 - Estimation con COSMIC - Alain Abran

58 © Copyrights Abran 2015

Page 59: CNMES15 - Estimation con COSMIC - Alain Abran

59 © Copyrights Abran 2015

Page 60: CNMES15 - Estimation con COSMIC - Alain Abran

60

Each COCOMO cost

driver =

An estimation

sub-model

with

unkown quality

&

large errors

© Copyrights Abran 2015

Page 61: CNMES15 - Estimation con COSMIC - Alain Abran

61

Each COCOMO

cost driver =

an estimation

sub-model

with unkown

quality & large

errors

© Copyrights Abran 2015

Page 62: CNMES15 - Estimation con COSMIC - Alain Abran

62

COCOMO-like estimation models:

Effort is a mutiplication function

of (Size & 15 step-functions)

? © Copyrights Abran 2015

Page 63: CNMES15 - Estimation con COSMIC - Alain Abran

63

COCOMO-like estimation models:

Effort is a function of (Size & +15 step-functions)

of unknown quality combined into a single number!

Built-in

Systematic Errors &

Error Propagation © Copyrights Abran 2015

Page 64: CNMES15 - Estimation con COSMIC - Alain Abran

64

COCOMO-like estimation models:

Effort is a function of (Size & +15 step-functions)

of unknown quality combined into a single number!

Greater Error

Ranges

© Copyrights Abran 2015

Page 65: CNMES15 - Estimation con COSMIC - Alain Abran

MIT study on COCOMO81 (Kemerer, 1987)

Small scale replication study - 17 projects

65

Basic

Exponential on

Size

Intermediate

& 15 cost drivers

Detailed

& 4 project

phases

R2

(max=1.0)

0.68

0.60

0.52

Model Errors (Mean magnitude of relative

errors - MMRE)

610%

583%

607%

© Copyrights Abran 2015

Page 66: CNMES15 - Estimation con COSMIC - Alain Abran

Estimation Outcomes!

66

Quick &

Easy…

© Copyrights Abran 2015

The ‘feel-good’’

Page 67: CNMES15 - Estimation con COSMIC - Alain Abran

COCOMO-like estimation models

The ‘feel-good’’ dead end!

67

Quick &

Easy…

© Copyrights Abran 2015

Page 68: CNMES15 - Estimation con COSMIC - Alain Abran

Lessons learned (in primary school)

Scale type are important:

Nominal

Ordinal

Interval

Ratio

Absolute

Measurement units

Measurement ‘étalons’

International standards

68

© Copyrights Abran 2015

Page 69: CNMES15 - Estimation con COSMIC - Alain Abran

Maths ≠ Measurement

Maths: 2 + 5 = 7

Measurement:

2 tables + 5 cars: cannot be added!

Rank 2 and rank 4: cannot be added, multiplied,

averaged, etc.

69

© Copyrights Abran 2015

Page 70: CNMES15 - Estimation con COSMIC - Alain Abran

Examples of Poor & Good designs of software measures

70

Poor:

- Halstead

- McCabe

- IFPUG-Function Points

- Usecase points

- ISO 9126

Design based on Metrology:

- COSMIC – ISO 19761

© Copyrights Abran 2015

Page 71: CNMES15 - Estimation con COSMIC - Alain Abran

Weight-based sizing methods 71

4FP

6FP

7FP

Irregular intervals with 2 dimensions

IFPUG-Function Points - FP

© Copyrights Abran 2015

Page 72: CNMES15 - Estimation con COSMIC - Alain Abran

Weight-based sizing methods

72

4FP

6FP

7FP

Ceiling on ‘large’ size to 7FP!

Small & Very small:

oversized to 4FP!

Systematic Errors!

© Copyrights Abran 2015

Page 73: CNMES15 - Estimation con COSMIC - Alain Abran

Weight-based sizing methods 73

4FP

6FP

7FP

1FP: DOES NOT EXIST & Not DEFINED!

No Measurement unit !!!

© Copyrights Abran 2015

Page 74: CNMES15 - Estimation con COSMIC - Alain Abran

Size Adjustment with 14 Factors

74

Low High Very high

Distinct Irregular Intervals for each factor

1 2 3 4 5

Same ordinal textual labels

From ‘textual’ to ‘number’ labels

© Copyrights Abran 2015

Page 75: CNMES15 - Estimation con COSMIC - Alain Abran

Size Adjustment Factors 75

.01

.02 .03 .04 .05

1 2 3 4 5

.01 .01 .01 .01 .01

Labels!

Multiplied by the same ‘factor’ for each distinct irregular intervals

X

= ???

Primary School = Fail ! © Copyrights Abran 2015

Page 76: CNMES15 - Estimation con COSMIC - Alain Abran

Issues with 1st generation Function Points methods

1st generation: IFPUG Function Points - 1979 Innovator (in 1979, but not in 2015!) Systematic errors! (step function with min & max) Invalid maths! No measurement unit!

Still cannot be automated & compliant after 35 years

OMG specifications = an approximation with:

unknown variance from standards & no impact analysis of variance!

76

© Copyrights Abran 2015

Page 77: CNMES15 - Estimation con COSMIC - Alain Abran

Usecase Points & similar Points-based metrics

77

Table 1: Entities, Attributes, and Measurement Rules

Entity Attribute Measurement rule Actor Complexity (of

actor)

The type of complexity (simple, average, or complex) of the

interaction between the actor and the system

Use case Complexity (of use

case)

The type of complexity (simple, average, or complex)

measured in the number of transactions

Specification of

requirements

Relevance of the

technical quality

requirements

The level of relevance (from 0 to 5) of each of the 13 known

non-functional qualities

Stability of the

requirements

The level of stability (from 0 to 5) of the functional and non-

functional requirements

Development

team

Familiarity with

the methodology

The level (from 0 to 5) of skills and knowledge of the

development methodology in use for the project.

Part-time status The level (from 0 to 5) of part-time staff on the team

Analysis capability The level (from 0 to 5) of analysis capabilities of the

development team with respect to project needs

Application

experience

The level (from 0 to 5) of team experience with the

application domain of the system

Object-oriented

experience

The level (from 0 to 5) of team experience with object-

oriented design

Motivation The level (from 0 to 5) of team motivation

Programming

language

Difficulty The level (from 0 to 5) of programming difficulty

© Copyrights Abran 2015

Page 78: CNMES15 - Estimation con COSMIC - Alain Abran

Usecase Points & Similar Points-based Metrics

78

Actors Dev. team

Usecases

Specs

Programming

language

© Copyrights Abran 2015

Page 79: CNMES15 - Estimation con COSMIC - Alain Abran

Usecase Points & similar Points-based metrics

79

x

x

x

x

Apples Chairs

Cars

Books

Houses

= ……?

© Copyrights Abran 2015

Page 80: CNMES15 - Estimation con COSMIC - Alain Abran

Usecase Points & similar Points-based metrics

80

x

x

x

x

Apples Chairs

Cars

Books

Houses

= ……?

Primary School = Fail ! © Copyrights Abran 2015

Page 81: CNMES15 - Estimation con COSMIC - Alain Abran

‘feel-good’’

Hell is paved all

over

with good

intentions!

© Copyrights Abran 2015

Page 82: CNMES15 - Estimation con COSMIC - Alain Abran

The ‘Feel Good’

ProjectCodeMeter assertions: http://www.projectcodemeter.com/cost_estimation/kop3.html

‘A professional software tool to measure & estimate Time, Cost, Complexity, Quality & Maintainability of software projects, Development Team Productivity by analyzing their source code’.

‘Using a modern software sizing algorithm called Weighted Micro Function Points (WMFP) a successor to solid ancestor scientific methods as COCOMO, COSYSMO, Maintainability Index, Cyclomatic Complexity, & Halstead Complexity’.

‘More accurate results than traditional software sizing tools, while being faster & simpler to configure’.

82

© Copyrights Abran 2015

Page 83: CNMES15 - Estimation con COSMIC - Alain Abran

Agenda

1. Estimation: Craft or Engineering?

2. The phases in estimation

3. Economics concepts for estimation models

4. Estimation models with COSMIC: data from industry

5. Conditions for credible estimation models

6. Conclusions

83

© Copyrights Abran 2015

Page 84: CNMES15 - Estimation con COSMIC - Alain Abran

Or?

(Software) Estimation

© Copyrights Abran 2015 84

Page 85: CNMES15 - Estimation con COSMIC - Alain Abran

A sound Measurement Foundation

2nd Generation Functional Size: No upper size limit No ‘weigths’ No unsound mathematical operations Based on a concept common to all types of software of

any ‘size’: a data movement A measurement unit: 1 data movement of a single data

group A measurement symbol: 1 CFP COSMIC – ISO 19761 (Common Software Measurement International Consortium)

85

© Copyrights Abran 2015

Page 86: CNMES15 - Estimation con COSMIC - Alain Abran

Building ‘good’ estimation process & good estimation models

Sound Measurement Units Sound Maths! Recognition of uncertainties:

how to recognize this & how to deal with it

The estimator has to provide information, not a single estimate

The manager has to select a single budget number & manage risks through contingency planning.

Discipline, rigor, commitments & $$$

86

© Copyrights Abran 2015

Page 87: CNMES15 - Estimation con COSMIC - Alain Abran

87

Want to know about good & bad practices

in software estimation?

© Copyrights Abran 2015

Page 88: CNMES15 - Estimation con COSMIC - Alain Abran

88

[email protected]

© Copyrights Abran 2015