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
Alain Abran
20 years 20 years
+ 35 PhD
 Development
 Maintenance
 Process Improvement
ISO: 19761,
9216, 25000,
15939, 14143,
19759
© Copyrights Abran2015
Hablo Español…. un poquito!
© Copyrights Abran 2015
3
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
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
© Copyrights Abran 20156
© Copyrights Abran 20157
© Copyrights Abran 2015
8
© Copyrights Abran 20159
© Copyrights Abran 201510
Softare Estimation Tools:
Availability & Costs
11
© Copyrights Abran 2015
Consumers & Quality!
12
© Copyrights Abran 2015
Estimation Tools & Quality?
13
© Copyrights Abran 2015
Or?
(Software) Estimation
© Copyrights Abran 201514
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
© Copyrights Abran 201516
© Copyrights Abran 201517
© Copyrights Abran 201518
© Copyrights Abran 201519
© Copyrights Abran 201520
© Copyrights Abran 201521
© Copyrights Abran 201522
© Copyrights Abran 201523
24
Estimator role: Provide information
about uncertainty range
© Copyrights Abran 2015
25
Manager role:
Pick a number & Manage Risk
© Copyrights Abran 2015
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
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
© Copyrights Abran 201528
© Copyrights Abran 201529
© Copyrights Abran 201530
© Copyrights Abran 201531
© Copyrights Abran 201532
Fixed=1,046 hrs
© Copyrights Abran 2015
33
© Copyrights Abran 201534
© Copyrights Abran 201535
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
COSMIC data from Industry
Practical experimentations with the
COSMIC method in Automotive
embedded software field
By: Sophie Stern
Renault
37
© Copyrights Abran 2015
Renault – 2012
38
© Copyrights Renault 2012
Renault – 2012
39
© Copyrights Renault 2012
Renault – 2012
40
© Copyrights Renault 2012
41
© Copyrights Renault 2012
Renault:
Estimation & Negociations
42
© Copyrights Renault 2012
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
Industry data with COSMIC
Productivity Analysis & benchmarking of
projects from:
Financial governmental organization
(Canada)
44
© Copyrights Abran 2015
© Copyrights Abran 201545
© Copyrights Abran 201546
© Copyrights Abran 201547
© Copyrights Abran 201548
Which estimation model to use
in which contexts?
© Copyrights Abran 201549
© Copyrights Abran 201550
International benchmarking
with ISBSG
Organization A: Effort = 31hrs/CFP x CFP + 2,411 hours
ISBSG benchmark: Effort = 10hrs/CFP x CFP + 2,138 hours
© Copyrights Abran 201551
A Managed Process
Monitoring & Control
Measurements Controls Controls Measurements
52 © Copyrights Abran 2015
NOT
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
A look at the most-known estimation
approach:
The ‘COCOMO-like’ models
Effort = F (Size, +15 cost drivers)
54
© Copyrights Abran 2015
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
56
© Copyrights Abran 2015
57
Impact guessed
by ‘experts’
© Copyrights Abran 2015
58
© Copyrights Abran 2015
59
© Copyrights Abran 2015
60
Each COCOMO cost
driver =
An estimation
sub-model
with
unkown quality
&
large errors
© Copyrights Abran 2015
61
Each COCOMO
cost driver =
an estimation
sub-model
with unkown
quality & large
errors
© Copyrights Abran 2015
62
COCOMO-like estimation models:
Effort is a mutiplication function
of (Size & 15 step-functions)
?
© Copyrights Abran 2015
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
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
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
Estimation Outcomes!
66
Quick &
Easy…
© Copyrights Abran 2015
The ‘feel-good’’
COCOMO-like estimation models
The ‘feel-good’’ dead end!
67
Quick &
Easy…
© Copyrights Abran 2015
Lessons learned
(in primary school)
Scale type are important:
 Nominal
 Ordinal
 Interval
 Ratio
 Absolute
Measurement units
Measurement ‘étalons’
International standards
68
© Copyrights Abran 2015
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
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
Weight-based sizing methods
71
4FP
6FP
7FP
Irregular intervals with 2 dimensions
IFPUG-Function Points - FP
© Copyrights Abran 2015
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
Weight-based sizing methods
73
4FP
6FP
7FP
1FP: DOES NOT EXIST & Not DEFINED!
No Measurement unit !!!
© Copyrights Abran 2015
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
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
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
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
Usecase Points
& Similar Points-based Metrics
78
Actors
Dev. team
Usecases
Specs
Programming
language
© Copyrights Abran 2015
Usecase Points
& similar Points-based metrics
79
x
x
x
x
Apples
Chairs
Cars
Books
Houses
= ……?
© Copyrights Abran 2015
Usecase Points
& similar Points-based metrics
80
x
x
x
x
Apples
Chairs
Cars
Books
Houses
= ……?
Primary School = Fail !
© Copyrights Abran 2015
‘feel-good’’
Hell is paved all
over
with good
intentions!
© Copyrights Abran 2015
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
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
Or?
(Software) Estimation
© Copyrights Abran 201584
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
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
87
Want to know about good & bad practices
in software estimation?
© Copyrights Abran 2015
88
alain.abran@etsmtl.ca
© Copyrights Abran 2015

CNMES15 - Estimation con COSMIC - Alain Abran

  • 1.
    ESTIMATION CON COSMIC CongresoNacional de Medición y Estimación de Software ‘15 Alain Abran Ecole de technologie supérieure – University of Québec (Canada) 1
  • 2.
    Alain Abran 20 years20 years + 35 PhD  Development  Maintenance  Process Improvement ISO: 19761, 9216, 25000, 15939, 14143, 19759 © Copyrights Abran2015
  • 3.
    Hablo Español…. unpoquito! © Copyrights Abran 2015 3
  • 4.
    Agenda 1. Estimation: Craftor 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
  • 5.
    Agenda 1. Estimation: Craftor 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
  • 6.
  • 7.
  • 8.
  • 9.
  • 10.
  • 11.
    Softare Estimation Tools: Availability& Costs 11 © Copyrights Abran 2015
  • 12.
    Consumers & Quality! 12 ©Copyrights Abran 2015
  • 13.
    Estimation Tools &Quality? 13 © Copyrights Abran 2015
  • 14.
  • 15.
    Agenda 1. Estimation: Craftor 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
  • 16.
  • 17.
  • 18.
  • 19.
  • 20.
  • 21.
  • 22.
  • 23.
  • 24.
    24 Estimator role: Provideinformation about uncertainty range © Copyrights Abran 2015
  • 25.
    25 Manager role: Pick anumber & Manage Risk © Copyrights Abran 2015
  • 26.
    Agenda 1. Estimation: Craftor 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
  • 27.
    Agenda 1. Estimation: Craftor 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
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
    Agenda 1. Estimation: Craftor 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
  • 37.
    COSMIC data fromIndustry Practical experimentations with the COSMIC method in Automotive embedded software field By: Sophie Stern Renault 37 © Copyrights Abran 2015
  • 38.
    Renault – 2012 38 ©Copyrights Renault 2012
  • 39.
    Renault – 2012 39 ©Copyrights Renault 2012
  • 40.
    Renault – 2012 40 ©Copyrights Renault 2012
  • 41.
  • 42.
  • 43.
    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
  • 44.
    Industry data withCOSMIC Productivity Analysis & benchmarking of projects from: Financial governmental organization (Canada) 44 © Copyrights Abran 2015
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
    Which estimation modelto use in which contexts? © Copyrights Abran 201549
  • 50.
    © Copyrights Abran201550 International benchmarking with ISBSG
  • 51.
    Organization A: Effort= 31hrs/CFP x CFP + 2,411 hours ISBSG benchmark: Effort = 10hrs/CFP x CFP + 2,138 hours © Copyrights Abran 201551
  • 52.
    A Managed Process Monitoring& Control Measurements Controls Controls Measurements 52 © Copyrights Abran 2015 NOT
  • 53.
    Agenda 1. Estimation: Craftor 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
  • 54.
    A look atthe most-known estimation approach: The ‘COCOMO-like’ models Effort = F (Size, +15 cost drivers) 54 © Copyrights Abran 2015
  • 55.
    Each COCOMO costdriver 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
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
    60 Each COCOMO cost driver= An estimation sub-model with unkown quality & large errors © Copyrights Abran 2015
  • 61.
    61 Each COCOMO cost driver= an estimation sub-model with unkown quality & large errors © Copyrights Abran 2015
  • 62.
    62 COCOMO-like estimation models: Effortis a mutiplication function of (Size & 15 step-functions) ? © Copyrights Abran 2015
  • 63.
    63 COCOMO-like estimation models: Effortis a function of (Size & +15 step-functions) of unknown quality combined into a single number! Built-in Systematic Errors & Error Propagation © Copyrights Abran 2015
  • 64.
    64 COCOMO-like estimation models: Effortis a function of (Size & +15 step-functions) of unknown quality combined into a single number! Greater Error Ranges © Copyrights Abran 2015
  • 65.
    MIT study onCOCOMO81 (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
  • 66.
    Estimation Outcomes! 66 Quick & Easy… ©Copyrights Abran 2015 The ‘feel-good’’
  • 67.
    COCOMO-like estimation models The‘feel-good’’ dead end! 67 Quick & Easy… © Copyrights Abran 2015
  • 68.
    Lessons learned (in primaryschool) Scale type are important:  Nominal  Ordinal  Interval  Ratio  Absolute Measurement units Measurement ‘étalons’ International standards 68 © Copyrights Abran 2015
  • 69.
    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
  • 70.
    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
  • 71.
    Weight-based sizing methods 71 4FP 6FP 7FP Irregularintervals with 2 dimensions IFPUG-Function Points - FP © Copyrights Abran 2015
  • 72.
    Weight-based sizing methods 72 4FP 6FP 7FP Ceilingon ‘large’ size to 7FP! Small & Very small: oversized to 4FP! Systematic Errors! © Copyrights Abran 2015
  • 73.
    Weight-based sizing methods 73 4FP 6FP 7FP 1FP:DOES NOT EXIST & Not DEFINED! No Measurement unit !!! © Copyrights Abran 2015
  • 74.
    Size Adjustment with14 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
  • 75.
    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
  • 76.
    Issues with 1stgeneration 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
  • 77.
    Usecase Points & similarPoints-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
  • 78.
    Usecase Points & SimilarPoints-based Metrics 78 Actors Dev. team Usecases Specs Programming language © Copyrights Abran 2015
  • 79.
    Usecase Points & similarPoints-based metrics 79 x x x x Apples Chairs Cars Books Houses = ……? © Copyrights Abran 2015
  • 80.
    Usecase Points & similarPoints-based metrics 80 x x x x Apples Chairs Cars Books Houses = ……? Primary School = Fail ! © Copyrights Abran 2015
  • 81.
    ‘feel-good’’ Hell is pavedall over with good intentions! © Copyrights Abran 2015
  • 82.
    The ‘Feel Good’ ProjectCodeMeterassertions: 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
  • 83.
    Agenda 1. Estimation: Craftor 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
  • 84.
  • 85.
    A sound Measurement Foundation 2ndGeneration 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
  • 86.
    Building ‘good’ estimationprocess & 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
  • 87.
    87 Want to knowabout good & bad practices in software estimation? © Copyrights Abran 2015
  • 88.