72
Software Estimation: Transforming Dust into Gold? Alain Abran École de Technologie Supérieure, University of Québec, Montréal, Canada [email protected] 24 th International Workshop on Software Measurement & 9 th International Conf. on Software Process and Product Measurement - IWSM-MENSURA 2014 Rotterdam, Oct.6- 8 2014

Iwsm2014 transforming dust into pots of gold (alain abran)

  • Upload
    nesma

  • View
    181

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Iwsm2014   transforming dust into pots of gold (alain abran)

Software Estimation: Transforming Dust into

Gold?

Alain Abran École de Technologie Supérieure, University of Québec, Montréal, Canada

[email protected]

24th International Workshop on Software Measurement & 9th International Conf. on Software Process

and Product Measurement - IWSM-MENSURA 2014 Rotterdam, Oct.6- 8 2014

Page 2: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 2

Alain Abran

20 years 20 years

+ 35 PhD Development

Maintenance

Process Improvements ISO: 19761, 9216,

25000, 15939,

14143, 19760

Page 3: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Key Topics Addressed

A lot of software estimation practices share characteristics of craft practices, in comparison to current professional practices from engineering & sciences.

The goal of estimation in an uncertainty context is not come up with accurate estimate but to provide the required insights to manage uncertainty.

How do our current practices in software estimation stack up with best practices in project management?

3

Page 4: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Or?

(Software) Estimation

Page 5: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 5

Software Estimation by ‘Experts’

Page 6: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Estimation expectations

Page 7: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 8: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

© Copyrights Abran 2014

Page 9: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

© Copyrights Abran 2014

Page 10: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 © Copyrights Abran 2014

Page 11: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 © Copyrights Abran 2014

Page 12: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 13: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 14: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 14

Page 15: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 15

Adjustment Phase

Page 16: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

A look at the prevalent estimation approach:

The ‘COCOMO-like’ approach

16

Page 17: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 17

© Copyrights Abran 2014

Page 18: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 18

Page 19: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 19

COCOMO-like estimation models:

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

An Estimate

Page 20: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 20

COCOMO-like estimation models:

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

Error Range ?

Page 21: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 21

Page 22: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 22

COCOMO-like estimation models: Effort is a functIon of Size &

+15 step-functions

of unknown quality combined into a single number!

Greater

Error

Ranges

Page 23: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 23

© Copyrights Abran 2014

Page 24: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Kemerer 1987 on COCOMO81

Small scale replication studies - 17 projects

24

Basic Exponential

on Size

Intermediate & 15 cost drivers

Detailed & 4 project

phases

R2

(max=1.0)

0.68

0.60

0.52

MMRE (mean magnitude or relative errors)

610%

583%

607%

Page 25: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 25

Page 26: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

KEMERER 1987

On another Estimation Model:

With complex mathematical formula

Claims of being based on +4,000 projects

….

Still being marketed in 2014

…at a very high cost!

MMRE = 772%

26

Page 27: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

KEMERER 1987 on Estimation Tool Y

Small scale replication study – 17 projects

MMRE = 772%

With both large + & -

(i.e. cannot be calibrated!) 27

Page 28: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Larger scale replication study - MMRE

Programming language,

size range [in Function

Points]

(1)

Vendor’s black-box

estimation tool (%)

(2)

White-box models

built directly from

the data (%)

Access [200,800] 341 15

C [200, 800] 1653 50

C++ [70, 500] 97 86

C++ [750, 1250] 95 24

Cobol [60, 400] 400 42

Cobol [401, 3500] 348 51

Cobol II [80, 180] 89 29

Cobol II [180, 500] 109 46

Natural [20, 620] 243 50

Natural [621, 3500] 347 35

Oracle [100, 2000] 319 120

PL1 [80, 450] 274 45

PL1 [550, 2550] 895 21

Powerbuilder [60, 400] 95 29

SQL [280, 800] 136 81

SQL [801, 4500] 127 45

Telon [70, 650] 100 22

Visual Basic [30, 600] 122 54

Min 89 15

Max 1,653 120 28

Page 29: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Larger scale replication study - MMRE

Programming language,

size range [in Function

Points]

(1)

Vendor’s black-box

estimation tool (%)

(2)

White-box models

built directly from

the data (%)

Access [200,800] 341 15

C [200, 800] 1653 50

C++ [70, 500] 97 86

C++ [750, 1250] 95 24

Cobol [60, 400] 400 42

Cobol [401, 3500] 348 51

Cobol II [80, 180] 89 29

Cobol II [180, 500] 109 46

Natural [20, 620] 243 50

Natural [621, 3500] 347 35

Oracle [100, 2000] 319 120

PL1 [80, 450] 274 45

PL1 [550, 2550] 895 21

Powerbuilder [60, 400] 95 29

SQL [280, 800] 136 81

SQL [801, 4500] 127 45

Telon [70, 650] 100 22

Visual Basic [30, 600] 122 54

Min 89 15

Max 1,653 120 29

Page 30: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 30

Software Estimation by ‘Experts’

Page 31: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

The bundled models!

Page 32: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Estimation Outcomes!

32

Quick &

Easy…

Page 33: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

COCOMO-like estimation models

The ‘feel-good’ dead end!

33

Quick &

Easy…

Page 34: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 35: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Criteria for the Quality of the Estimation Models

Academic literature:

R2 (coefficient of determination)

MMRE (mean magnitude of relative errors)

MARE (Median of relative errors), etc…..

Residuals of errors ramdonly distributed

Statistical significance (spearman test).

Etc.

35

Page 36: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Criteria for the Quality of the Estimation Models

Academic literature:

Complex criteria for the verification of the outputs of the estimation models

but …

no verification:

- That the models’ assumptions are met!

- Nor of the inputs themselves

36

Page 37: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 38: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 38

Page 39: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 40: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Invalid range

Page 41: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Invalidity range

Page 42: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 42

A New Software

Metric to Complement

Function Points

The Software Non-functional

Assessment Process (SNAP)

Page 43: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 43

Author Very strong relationship of SNAP with Effort

R2 = 0 ,89 (R2 max = 1,0)

Page 44: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Author’s assertion on Figure 4:

R2 = .89 Significance F = 1.7 * 10-23 Spearman = .85 Runs = pass

&

Spearman test for rank correlation of .85, with an associated confidence of statistical significance of greater than 99% (p-value <.0001).

44

Page 45: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 45

Page 46: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 46

Invalidity Range

Page 47: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Author’s assertion on Figure 4:

R2 = .89 Significance F = 1.7 * 10-23 Spearman = .85 Runs = pass

&

Spearman test for rank correlation of .85, with an associated confidence of statistical significance of greater than 99% (p-value <.0001).

But:

These numbers & stats are invalid the necessary requirements for a regression are not met! (Presence of large outliers = meaningless stats numbers!!)

47

Page 48: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

What it really looked like

for the range for which

there is enough data

points

Approxmimatively:

An R2 = 0.3

Not R2 = 0.89 (R2 max = 1,0)

CONCLUSION: invalid approach to empirically adopt SNAP!

Page 49: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 49

Hell is paved all over

with good intentions!

Page 50: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 51: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 52: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 52

Invalidity Range

Page 53: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Project Scope

The dreamer

Accounting

Marketing

The visionnary 53

Stakeholders initial wishes

Page 54: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Imprecise Inputs at Feasibility Analysis – Much Greater Error Range

54

Page 55: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Project Scope

Agreed Project Scope!

The dreamer

Accounting

Marketing

The visionnary 55

Stakeholders initial wishes

Page 56: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Estimation Models: The Uncertainty Cone: Requirements Specs

56

Page 57: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Scales in Plans - Architects & Engineers

57

© Almakadmeh-Abran

2013 © Almakadmeh-Abran

2012

Page 58: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Scales in Software Documents?

58

© Almakadmeh 2013

Page 59: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Scales in Software Documents?

59

© Almakadmeh 2013

Page 60: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

An investigation of an existing functional size approximation technique: reproducibility

60

Difference of functional size approximation

© Almakadmeh 2013

Participant

code

Approximate functional size

using an approximation technique X

(Min, Most-likely, Max) (in CFP)

Percentage difference in

functional size approximation

(w.r.t. Most-likely value)

A6 (45, 74, 93) − 90%

A12 (57, 114, 179) − 84%

A3 (238, 543, 910) − 23%

A9 (250, 545, 909) − 23%

A5 (299, 592, 962) − 16%

A2 (250, 705, 1250) 0%

A1 (521, 1071, 1616) + 52%

A11 (581, 1185, 1972) + 68%

A8 (697, 1454, 2472) + 106%

A7 (964, 2077, 3450) + 195%

A4 (1181, 2369, 3957) + 236%

A10 (2265, 4510, 7408) + 540%

Minimum − 90%

Maximum + 540%

12

Participants

Page 61: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

An investigation of an existing functional size approximation technique: accuracy

61

Accuracy of the functional size approximation

© Almakadmeh 2013

12

Participants

Participant

code

Approximated functional

size using the E&Q

COSMIC technique in CFP

(min, most-likely, max) (1)

Reference

functional

size for

accuracy

criteria (2)

MRE calculated using

values in (1) and (2)

(min, most-likely, max)

A6 (45, 74, 93)

79 CFP

(43%, 7%, 17%)

A12 (57, 114, 179) (28%, 44%, 126%)

A3 (238, 543, 910) (200%, 585%, 1047%)

A9 (250, 545, 909) (215%, 587%, 1046%)

A5 (299, 592, 962) (277%, 646%, 1113%)

A2 (250, 705, 1250) (215%, 789%, 1476%)

A1 (521, 1071, 1616) (557%, 1251%, 1938%)

A11 (581, 1185, 1972) (633%, 1394%, 2387%)

A8 (697, 1454, 2472) (779%, 1733%, 3017%)

A7 (964, 2077, 3450) (1115%, 2519%, 4250%)

A4 (1181, 2369, 3957) (1389%, 2887%, 4890%)

A10 (2265, 4510, 7408) (2756%, 5587%, 9241%)

Average MRE on functional size approximations

(all 12 participants) (684%, 1502%, 2546%)

Average MRE on functional size approximations

(except participants A6 & A12) (814%, 1798%, 3041%)

Page 62: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Software Size?

Lines of code

Or

Function Points:

– +30 variations

– & 5 International Standards!

62

Page 63: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Lack of universally accepted references & Impact

63

Page 64: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

FP to LOC convertion ratios in Estimation Models

What happened to Ariane 5 spacecraft … and why?

64

Page 65: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Page 66: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Estimation Approaches

The ‘feel-good’ dead end!

66

Quick &

Easy…

Page 67: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

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

ProjectCodeMeter

Is a professional software tool for project managers to measure and estimate the Time, Cost, Complexity, Quality and Maintainability of software projects as well as 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, and Halstead Complexity,

It produces more accurate results than traditional software sizing tools, while being faster and simpler to configure.

67

Page 68: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Gold Estimation at the

Renaissance

Page 69: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Estimation Models in the Renaissance

Page 70: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014

Books as

Sources of

Estimation

Models

Page 71: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 71

You want to know more the quality of

estimation models & inputs to these

models?

Page 72: Iwsm2014   transforming dust into pots of gold (alain abran)

© Copyrights Abran 2014 72

[email protected]