KEMBAR78
Lecture 1 - introduction to software metrics.pptx
Software Metrics
Dr. Odongo Steven Eyobu
sodongo@cis.mak.ac.ug
Content
 Software Metrics
 Expectations
 Organization
 Reference
2
Organization
 Class representative + contact
 Enroll for course on MUELE
(http://muele.mak.ac.ug/), enrollment closes after two
weeks
 Communication: use email
 Compulsory lecture attendance: sign attendance
register at every lecture
 No use of mobile phones during class - either
SWITCH OFF or put on SILENCE
3
Organization cont’d
 Assessments
 Course work (Assignments, tests, class
discussions, participation and attendance) - 40%
 Final exam (60%)
 Groups of 5 for course assignments
4
Reference
 Software Metrics: A Rigorous and Practical Approach,
(2nd ed.) (638p.), N.E. Fenton and S.L. Peeger, PWS
Publishing, 1998. ISBN 0-534-95425-1.
 Metrics and Models in Software Quality Engineering,
Stephen H. Kan, 2nd ed. (560 p.),Addison-Wesley
Professional (2002). ISBN: 0201729156.
 Software Engineering: A Practitioners Approach, (5th
ed.), Roger S.Pressman
 Web/Internet, some links may be posted on MUELE
5
Teaser
 Why doesn't your weight increase when you eat a kg of food?
 Why does a 1GB ash thats full weigh the same as an empty
one?
6
Reference for Today’s lecture
 Material in this lecture is taken from chapters
1-3 of Software Metrics: A Rigorous and
Practical Approach (2nd
ed.), Norman E.
Fenton and Shari Lawrence Pfleeger, 1997,
PWS Publishing Company, Boston, MA, ISBN
0534954251
7
Overview
1. Measurement – what is it and why do we do
it?
2. Measurement basics
3. A goal-based software measurement
framework
8
Measurement – What Is It and
Why Do We Do It?
1. Measurement in Everyday Life
2. Measurement in Software Engineering
3. The Scope of Software Metrics
9
Measurement in Everyday Life
 Measurement governs many aspects of
everyday life:
 Economic indicators determine prices, pay raises
 Medical system measurements enable diagnosis
of specific illnesses
 Measurements in atmospheric systems are the
basis of weather prediction
10
How do we use measurement in
our lives?
 In a shop, price is a measure of the value of an item,
and we calculate the bill to make sure we get the
correct change.
 Height and size measurements ensure clothing will fit
correctly.
 When traveling, we calculate distance, choose a
route, measure speed, and predict when we’ll arrive
11
Measurement helps us to:
 Measurement helps us to:
 Understand our world
 Interact with our surroundings
 Improve our lives
 Examples
 Economics
 Radar
 Medical
 Weather
 Without measurements, technology cant
function 12
What is Measurement?
 some aspect of a thing is assigned a
descriptor that allows us to compare it with
other things.
 More formally – the process by which
 Numbers or symbols are assigned to attributes of
entities in the real world in such a way as to
describe them according to defined rules.
13
What is Measurement?
 Measure is a relation between an attribute
and a measurement scale
 Entity: object, event in real world
 Attribute: feature, property of entity
 We measure attributes of things
14
Entity in Software Engineering
15
Can be
any of the
following
Attribute
 An Attribute is a feature or property of an entity
 E.g. Blood pressure of a person, duration of the software
specification process
 Two general types
 Internal Attributes, can be measures based on the enity itself
• E.g code, coupling, modulariy, internal attribute
 External Attributes, can be measures only with respect to
how the entities relates to the environment
• Eg , reliability, maintainability
16
Measurement Example
17
Software Metrics
 It refers to a broad range of quantitative
measurements for computer software that
enable to
 improve the software process continuously
 assist in quality control and productivity
 assess the quality of technical products
 assist in tactical decision-making
18
19
What Should Be Measured?
measurement
What do we
use as a
basis?
• size?
• function?
project metrics
process metrics
process
product
product metrics
Measurement Types
 Measurements are needed as:
 Descriptors of entities already in existence
 Prescriptors (standards, norms, failure intensity
objects, benchmarks) which entities of certain
class of category should satisfy
 Predictors to estimate properties of entries yet to
be designed or implemented
20
Measurements: How to
 In order to make entities measurable
 What entities (objects) should be selected?
 What attributes should be selected?
 What values should be assigned to the attributes?
 What shall be the rules (relationships) ascribed to
the attributes and their entiries
 NOTE: assigned values and /or ascribed
rules can be quantitative of qualitative
21
quantitative vs qualitative
22
Understanding Measurement?
 we must ask questions that are difficult to answer:
 In a room with blue walls, is “blue” a measure of the color of the
room?
 A person’s height is a commonly understood attribute that can be
easily measured. What other attributes, such as intelligence?
 Some measurements (e.g., intelligence, wine quality) may have wide
error margins – is this a reason to reject them?
 How do we decide which error margins are acceptable?
 When is a measurement scale acceptable for the purpose to which it
is put (e.g., is it appropriate to measure a person’s height in
kilometers)?
 What types of manipulations can we apply to the results of
measurement?
23
Example 1: Code
 Entiry Code:
 What are the attributes?
 What are the possible measures?
24
Example 1: Code
25
Example 2:Availability
 Entity: Availability
 Attributes: ?
 Values: ?
 Relations: ? How are the attributes related?
26
Example 2:Availability
 Entity: availability
 Attributes, system uptime, system downtime
 Values: time is seconds
 Relations:
 Availability = uptimes/ (uptime + downtime)
27
Software Metric Challenges
28
Misleading Metrics!
 Fact (1): Knowledge is power
 Fact (2): Time is money
 Relation (rule): power = work/time
 Substituting ‘power’ & ‘time”
 Knowledge = work / money
 As knowledge approaches zero money approaches
infinity regardless of the amount for work done
 Conclusion
 The less you know, the more you make.
29
What went
wrong here!?
- Needs
validation
Making Things Measurable
 One aim of science is to find ways of measuring attributes of
things we’re interested in.
 Measurement makes concepts more visible, therefore more
understandable and controllable.
 Attributes previously thought to be unmeasurable now form
basis for decisions affecting our lives (e.g., air quality, inflation
index).
 Measuring the unmeasurable improves
understanding of particular entities, attributes
• Act of proposing a particular measure can open discussion
that will lead to greater understanding
• Making new measurement may requiring modifying
environment or practices (e.g., using a new tool, adding a step
in a process)
30
“What is not measurable, make measurable” (Galileo Galilei)
What is Software Measurement
 Software metrics are measures that are used
to quantify software, software development
resource and/or the software development
process
 This includes items which are directly
measureable, such as lines of code, as well as
item which are calculated from measurements,
such as software quality
 Involves selecting, measuring & putting together
many diff attributes..
• Not a trivial task, 300+ metrics have been defined
31
Measurements in SE
32
Measurement in SE
 In many instances, measurement is considered a
luxury.
 For many projects:
 Measurable targets are not set (e.g., products are supposed
to be user-friendly, reliable, and maintainable, but we don’t
quantify what that means).
 The component costs of projects are not quantified or
understood.
 Product quality is not quantified.
 Too much reliance on anecdotal evidence (e.g., try our
product and you’ll improve your productivity by 50%!). Most
of the time, there’s no measurable basis for the claims.
33
.. the effect
 According to American Programmer, 31.1% of
computer software projects get canceled
before they are completed,
 52.7% will overrun their initial cost estimates
by 189%.
 94% of project start-ups are restarts of
previously failed projects.
 Solution?
 systematic approach to software development and
measurement
34
Measurement in SE (cont’d)
 When measurements are made, they tend to be:
 Incomplete
 Inconsistent
 Infrequent
 Most of the time, we’re not told anything about:
 How experiments were designed
 What was measured and how
 Realistic error margins
 Without this information, can’t decide whether to apply
results to a development effort, and can’t do an objective
study to repeat the measurements.
 Lack of measurement in SW engineering is
compounded by lack of a rigorous approach.
35
Software Measurement Objectives
 Assessing status
 Projects
 Products for a specific project or projects
 Processes
 Resources
 Identifying trends
 Need to be able to differentiate between a healthy project
and one that’s in trouble
 Determine corrective action
 Measurements should indicate the appropriate corrective
action, if any is required.
36
Info to understand…
 Managers
 What does the process cost?
 How productive is the staff?
 How good is the code?
 Will the customer/user be satisfied?
 How can we improve?
 Engineers
 Are the requirements testable?
 Have all the faults been found?
 Have the product or process goals been met?
 What will happen in the future?
 Users??
37
Example – why do we need
measurement?
38
Example 1
39
Example 2
40
Example 2
41
42

Lecture 1 - introduction to software metrics.pptx

  • 1.
    Software Metrics Dr. OdongoSteven Eyobu sodongo@cis.mak.ac.ug
  • 2.
    Content  Software Metrics Expectations  Organization  Reference 2
  • 3.
    Organization  Class representative+ contact  Enroll for course on MUELE (http://muele.mak.ac.ug/), enrollment closes after two weeks  Communication: use email  Compulsory lecture attendance: sign attendance register at every lecture  No use of mobile phones during class - either SWITCH OFF or put on SILENCE 3
  • 4.
    Organization cont’d  Assessments Course work (Assignments, tests, class discussions, participation and attendance) - 40%  Final exam (60%)  Groups of 5 for course assignments 4
  • 5.
    Reference  Software Metrics:A Rigorous and Practical Approach, (2nd ed.) (638p.), N.E. Fenton and S.L. Peeger, PWS Publishing, 1998. ISBN 0-534-95425-1.  Metrics and Models in Software Quality Engineering, Stephen H. Kan, 2nd ed. (560 p.),Addison-Wesley Professional (2002). ISBN: 0201729156.  Software Engineering: A Practitioners Approach, (5th ed.), Roger S.Pressman  Web/Internet, some links may be posted on MUELE 5
  • 6.
    Teaser  Why doesn'tyour weight increase when you eat a kg of food?  Why does a 1GB ash thats full weigh the same as an empty one? 6
  • 7.
    Reference for Today’slecture  Material in this lecture is taken from chapters 1-3 of Software Metrics: A Rigorous and Practical Approach (2nd ed.), Norman E. Fenton and Shari Lawrence Pfleeger, 1997, PWS Publishing Company, Boston, MA, ISBN 0534954251 7
  • 8.
    Overview 1. Measurement –what is it and why do we do it? 2. Measurement basics 3. A goal-based software measurement framework 8
  • 9.
    Measurement – WhatIs It and Why Do We Do It? 1. Measurement in Everyday Life 2. Measurement in Software Engineering 3. The Scope of Software Metrics 9
  • 10.
    Measurement in EverydayLife  Measurement governs many aspects of everyday life:  Economic indicators determine prices, pay raises  Medical system measurements enable diagnosis of specific illnesses  Measurements in atmospheric systems are the basis of weather prediction 10
  • 11.
    How do weuse measurement in our lives?  In a shop, price is a measure of the value of an item, and we calculate the bill to make sure we get the correct change.  Height and size measurements ensure clothing will fit correctly.  When traveling, we calculate distance, choose a route, measure speed, and predict when we’ll arrive 11
  • 12.
    Measurement helps usto:  Measurement helps us to:  Understand our world  Interact with our surroundings  Improve our lives  Examples  Economics  Radar  Medical  Weather  Without measurements, technology cant function 12
  • 13.
    What is Measurement? some aspect of a thing is assigned a descriptor that allows us to compare it with other things.  More formally – the process by which  Numbers or symbols are assigned to attributes of entities in the real world in such a way as to describe them according to defined rules. 13
  • 14.
    What is Measurement? Measure is a relation between an attribute and a measurement scale  Entity: object, event in real world  Attribute: feature, property of entity  We measure attributes of things 14
  • 15.
    Entity in SoftwareEngineering 15 Can be any of the following
  • 16.
    Attribute  An Attributeis a feature or property of an entity  E.g. Blood pressure of a person, duration of the software specification process  Two general types  Internal Attributes, can be measures based on the enity itself • E.g code, coupling, modulariy, internal attribute  External Attributes, can be measures only with respect to how the entities relates to the environment • Eg , reliability, maintainability 16
  • 17.
  • 18.
    Software Metrics  Itrefers to a broad range of quantitative measurements for computer software that enable to  improve the software process continuously  assist in quality control and productivity  assess the quality of technical products  assist in tactical decision-making 18
  • 19.
    19 What Should BeMeasured? measurement What do we use as a basis? • size? • function? project metrics process metrics process product product metrics
  • 20.
    Measurement Types  Measurementsare needed as:  Descriptors of entities already in existence  Prescriptors (standards, norms, failure intensity objects, benchmarks) which entities of certain class of category should satisfy  Predictors to estimate properties of entries yet to be designed or implemented 20
  • 21.
    Measurements: How to In order to make entities measurable  What entities (objects) should be selected?  What attributes should be selected?  What values should be assigned to the attributes?  What shall be the rules (relationships) ascribed to the attributes and their entiries  NOTE: assigned values and /or ascribed rules can be quantitative of qualitative 21
  • 22.
  • 23.
    Understanding Measurement?  wemust ask questions that are difficult to answer:  In a room with blue walls, is “blue” a measure of the color of the room?  A person’s height is a commonly understood attribute that can be easily measured. What other attributes, such as intelligence?  Some measurements (e.g., intelligence, wine quality) may have wide error margins – is this a reason to reject them?  How do we decide which error margins are acceptable?  When is a measurement scale acceptable for the purpose to which it is put (e.g., is it appropriate to measure a person’s height in kilometers)?  What types of manipulations can we apply to the results of measurement? 23
  • 24.
    Example 1: Code Entiry Code:  What are the attributes?  What are the possible measures? 24
  • 25.
  • 26.
    Example 2:Availability  Entity:Availability  Attributes: ?  Values: ?  Relations: ? How are the attributes related? 26
  • 27.
    Example 2:Availability  Entity:availability  Attributes, system uptime, system downtime  Values: time is seconds  Relations:  Availability = uptimes/ (uptime + downtime) 27
  • 28.
  • 29.
    Misleading Metrics!  Fact(1): Knowledge is power  Fact (2): Time is money  Relation (rule): power = work/time  Substituting ‘power’ & ‘time”  Knowledge = work / money  As knowledge approaches zero money approaches infinity regardless of the amount for work done  Conclusion  The less you know, the more you make. 29 What went wrong here!? - Needs validation
  • 30.
    Making Things Measurable One aim of science is to find ways of measuring attributes of things we’re interested in.  Measurement makes concepts more visible, therefore more understandable and controllable.  Attributes previously thought to be unmeasurable now form basis for decisions affecting our lives (e.g., air quality, inflation index).  Measuring the unmeasurable improves understanding of particular entities, attributes • Act of proposing a particular measure can open discussion that will lead to greater understanding • Making new measurement may requiring modifying environment or practices (e.g., using a new tool, adding a step in a process) 30 “What is not measurable, make measurable” (Galileo Galilei)
  • 31.
    What is SoftwareMeasurement  Software metrics are measures that are used to quantify software, software development resource and/or the software development process  This includes items which are directly measureable, such as lines of code, as well as item which are calculated from measurements, such as software quality  Involves selecting, measuring & putting together many diff attributes.. • Not a trivial task, 300+ metrics have been defined 31
  • 32.
  • 33.
    Measurement in SE In many instances, measurement is considered a luxury.  For many projects:  Measurable targets are not set (e.g., products are supposed to be user-friendly, reliable, and maintainable, but we don’t quantify what that means).  The component costs of projects are not quantified or understood.  Product quality is not quantified.  Too much reliance on anecdotal evidence (e.g., try our product and you’ll improve your productivity by 50%!). Most of the time, there’s no measurable basis for the claims. 33
  • 34.
    .. the effect According to American Programmer, 31.1% of computer software projects get canceled before they are completed,  52.7% will overrun their initial cost estimates by 189%.  94% of project start-ups are restarts of previously failed projects.  Solution?  systematic approach to software development and measurement 34
  • 35.
    Measurement in SE(cont’d)  When measurements are made, they tend to be:  Incomplete  Inconsistent  Infrequent  Most of the time, we’re not told anything about:  How experiments were designed  What was measured and how  Realistic error margins  Without this information, can’t decide whether to apply results to a development effort, and can’t do an objective study to repeat the measurements.  Lack of measurement in SW engineering is compounded by lack of a rigorous approach. 35
  • 36.
    Software Measurement Objectives Assessing status  Projects  Products for a specific project or projects  Processes  Resources  Identifying trends  Need to be able to differentiate between a healthy project and one that’s in trouble  Determine corrective action  Measurements should indicate the appropriate corrective action, if any is required. 36
  • 37.
    Info to understand… Managers  What does the process cost?  How productive is the staff?  How good is the code?  Will the customer/user be satisfied?  How can we improve?  Engineers  Are the requirements testable?  Have all the faults been found?  Have the product or process goals been met?  What will happen in the future?  Users?? 37
  • 38.
    Example – whydo we need measurement? 38
  • 39.
  • 40.
  • 41.
  • 42.

Editor's Notes

  • #13 Descriptor an element or term that has the function of describing, identifying, or indexing, in particular.
  • #17 Coupling -> degree to which each program module relies on each one of the other modules Cohesion -> refers to the degress to which elements of a module belong together
  • #19 Process Software Development Process (requirements, design, code, test, implementation) Product (code, requirements specification, production software, design documentation, risk assessment) Process Metrics give insight into the dynamics of a given software process enabling project management to evaluate the efficiency of that process. Project Metrics provide software project management with means to measure risk, progress, quality of the project. Product Metrics provide software developers means to measure defects, errors, flaws. design strategies
  • #21 Qualitative Data, Quantitative Data. Overview: Deals with descriptions. Data can be observed but not measured. Colors, textures, smells, tastes, appearance
  • #23 Definition of measurement process is far from clear cut. Next sections should help us answer these…. Material in next section (Measurement Basics) will allow us to answer these questions.