SlideShare une entreprise Scribd logo
1  sur  121
Software Measurement Software Economics 2010
Anton Litvinenko ,[object Object]
Key competence:  software measurement and metrics ,[object Object]
MSc in computer science at Tartu University
Agenda ,[object Object]
Are software metrics “ good ” or “ bad ”?
What is a “ measure ”?
What is a “measure”? “ Way of associating a  number  with some  attribute of a physical object ” height -> meters temperature -> degrees Celsius
What is “measure”? One-to-one mapping  between  physical  objects and  formal  objects (e.g numbers)
Same Stuff Formally ,[object Object]
Relations on these objects ( e.g. more, equal )
Binary operations on these objects ( e.g. combine, put together ) ,[object Object]
Relationships and Operations ,[object Object]
Steve Ballmer has 4 apples ,[object Object]
Jobs and Ballmer can cooperate and put their apples together to have a larger pile
We defined a “ complete transition ” from “ real world ” into “ formal world ”
Same Stuff Formally... again ,[object Object]
B be a relational system of  formal objects  ( e.g.  numbers)
m be a measure from A to B then
Tuple  A ,  B  and  m  is a  scale  if ,[object Object]
For each operator in A there is a corresponding operator in B
Why is this important?
What Can You Say?
Why is this important? ,[object Object]
20 modules with complexity 10 – 30 range ,[object Object]
We don't have intuition for such cases
Intelligence Barrier
Example: Temperature ,[object Object]
Anton : today is 4ºC, yesterday was 27ºC ,[object Object],[object Object]
Anton :  Yesterday was warmer than today
Example: Temperature ,[object Object]
Anton : today is 4ºC, yesterday was 27ºC ,[object Object],[object Object],[object Object]
Statement is  meaningful  when it gives  same result  on  all similar  scales
Scales  are  similar  when there is a  transformation  from one scale to another that  retains all defined relations and operations
Nominal Scale ,[object Object],[object Object]
View from 3000 feet :) Nominal Scales Gender T-shirt Numbering
Ordinal Scale ,[object Object]
Middle element –  median ,[object Object]
All Ordinal Scales Are Nominal Nominal Ordinal Gender T-shirt Numbering Top 100 Grading
Interval Scale ,[object Object]
Similar – reachable via  positive linear transformation :  t(x) = ax + b ,[object Object]
Interval Scales Are Ordinal Nominal Ordinal Interval Gender T-shirt Numbering Top 100 Grading Temperature
Ratio Scale ,[object Object]
Similar – reachable via positive linear transformation in form of  t(x) = ax ,[object Object],[object Object]
Ratio Scales Are Interval Nominal Ordinal Interval Ratio Gender T-shirt Numbering Top 100 Grading Temperature Length Height
Absolute Scale ,[object Object],[object Object]
My software is 25 lines of code
Absolute Scales Are Ratio Nominal Ordinal Interval Ratio Absolute Scales Gender T-shirt Numbering Top 100 Grading Temperature Length Height Team Size
Exercise 2 ,[object Object]
Quality  is only  ordinal  (rarely interval)
Judgment in terms of value ,[object Object]
Should we pay 2x for 2x quality?  ,[object Object]
In This Course:  Metric = Measure
Software Metric  is a  measure  of anything directly related to  software  or its  production
Agenda ,[object Object]
Examples of software metrics ,[object Object]
Can anybody name any software metric?
Lines Of Code (LOC) – Product Size ,[object Object],[object Object],[object Object]
Lines Of Code
Lines Of Code – Summary ,[object Object],[object Object]
Comments
Several statements on one line ,[object Object]
Doesn't respect complexity and content
McCabe's Cyclomatic Complexity ,[object Object]
Complexity of a program ,[object Object]
Usually calculated using flow graph ,[object Object],[object Object]
McCabe's Cyclomatic Complexity
McCabe's Cyclomatic Complexity ,[object Object]
n = 6
p = 1
V(G) = 3
Cyclomatic Complexity – Summary ,[object Object]
Maintainability ,[object Object],[object Object],[object Object],[object Object],[object Object]
Exercise 3 ,[object Object]
Draw a  flow graph
Calculate  McCabe's cyclomatic complexity Code snippet
Agenda ,[object Object]
Examples of software metrics ,[object Object]
Object oriented metrics
Object Oriented Metrics ,[object Object],[object Object]
Measure unique aspects of the  object oriented  approach
Inheritance Metrics ,[object Object],NOC: 2 DIT: 2 NOC: 3 DIT: 1
Complexity ,[object Object]
Complexity – Example RFC = 6, WMC = 1 + 2 + 1 = 4
Coupling ,[object Object]
Coupling – Example CBO = 2, LCOM = 3 – 0 = 3
Coupling – Example LCOM = 2 – 1 = 1
Agenda ,[object Object]
Examples of software metrics ,[object Object]
Object oriented metrics
Object oriented design quality metrics
Object Oriented Design ,[object Object]
OO Design Quality Metrics ,[object Object]
Measure  quality  of an  object oriented design
Can we divide dependencies into “ good ” and “ bad ”? Dependencies Between Classes
Dependencies ,[object Object]
Stable ,[object Object]
Hard to change = many dependents = responsible ,[object Object],[object Object]
Easy to change = no dependents = irresponsible
Class Category ,[object Object]
Reused together
Same goal ,[object Object]
Dependency Metrics ,[object Object]
Example - Coupling Package One Package Two Package Three Ca(Package One) = 1, Ce(Package One) = 2
Instability (I) ,[object Object],[object Object]
Stable  -> I = 0 -> Ce = 0
Unstable  -> I = 1 -> Ca = 0, Ce > 0
Should all categories be  stable ?
Why a  stable  category needs to be  extensible ? How?
Abstractness (A) ,[object Object]
Completely concrete  -> A = 0 -> no abstract classes in category
Is there a relationship between  Instability  and  Abstractness ?
Main Sequence
Distance From Main Sequence ,[object Object]
Agenda ,[object Object]
Examples of software metrics ,[object Object]
Object oriented metrics
Object oriented design quality metrics
Developer and team metrics
Developer and Team Metrics ,[object Object]
Productivity: Code Churn Metrics ,[object Object]

Contenu connexe

Tendances

Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
Haitham El-Ghareeb
 
Software Quality Attributes
Software Quality AttributesSoftware Quality Attributes
Software Quality Attributes
Hayim Makabee
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
Himanshu
 

Tendances (20)

Software Measurement and Metrics.pptx
Software Measurement and Metrics.pptxSoftware Measurement and Metrics.pptx
Software Measurement and Metrics.pptx
 
Software Engineering (Metrics for Process and Projects)
Software Engineering (Metrics for Process and Projects)Software Engineering (Metrics for Process and Projects)
Software Engineering (Metrics for Process and Projects)
 
Software Engineering (Project Planning & Estimation)
Software Engineering (Project Planning &  Estimation)Software Engineering (Project Planning &  Estimation)
Software Engineering (Project Planning & Estimation)
 
Slides chapter 11
Slides chapter 11Slides chapter 11
Slides chapter 11
 
Software development process models
Software development process modelsSoftware development process models
Software development process models
 
Pressman ch-22-process-and-project-metrics
Pressman ch-22-process-and-project-metricsPressman ch-22-process-and-project-metrics
Pressman ch-22-process-and-project-metrics
 
Software Engineering Layered Technology Software Process Framework
Software Engineering  Layered Technology Software Process FrameworkSoftware Engineering  Layered Technology Software Process Framework
Software Engineering Layered Technology Software Process Framework
 
Object Oriented Analysis and Design
Object Oriented Analysis and DesignObject Oriented Analysis and Design
Object Oriented Analysis and Design
 
Software Quality Attributes
Software Quality AttributesSoftware Quality Attributes
Software Quality Attributes
 
Software architecture
Software architectureSoftware architecture
Software architecture
 
Software Quality Metrics
Software Quality MetricsSoftware Quality Metrics
Software Quality Metrics
 
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMI
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMIEvolving role of Software,Legacy software,CASE tools,Process Models,CMMI
Evolving role of Software,Legacy software,CASE tools,Process Models,CMMI
 
Chapter 2 software process models
Chapter 2   software process modelsChapter 2   software process models
Chapter 2 software process models
 
Software Crisis
Software CrisisSoftware Crisis
Software Crisis
 
Slides chapter 3
Slides chapter 3Slides chapter 3
Slides chapter 3
 
Chapter 13 software testing strategies
Chapter 13 software testing strategiesChapter 13 software testing strategies
Chapter 13 software testing strategies
 
Architectural styles and patterns
Architectural styles and patternsArchitectural styles and patterns
Architectural styles and patterns
 
Software Architecture
Software ArchitectureSoftware Architecture
Software Architecture
 
Software design
Software designSoftware design
Software design
 
MG6088 SOFTWARE PROJECT MANAGEMENT
MG6088 SOFTWARE PROJECT MANAGEMENTMG6088 SOFTWARE PROJECT MANAGEMENT
MG6088 SOFTWARE PROJECT MANAGEMENT
 

Similaire à Software Measurement: Lecture 1. Measures and Metrics

Why computer programming
Why computer programmingWhy computer programming
Why computer programming
TUOS-Sam
 
A Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality IndicatorsA Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality Indicators
vie_dels
 
Search Engines
Search EnginesSearch Engines
Search Engines
butest
 
Unit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingUnit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programming
Abha Damani
 
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
WilheminaRossi174
 
LCMC Session: Email and Web Conversion Success
LCMC Session: Email and Web Conversion SuccessLCMC Session: Email and Web Conversion Success
LCMC Session: Email and Web Conversion Success
BlueHornet
 
BMIS 530Systems Analysis and Redesign Project Phase 3Assignme
BMIS 530Systems Analysis and Redesign Project Phase 3AssignmeBMIS 530Systems Analysis and Redesign Project Phase 3Assignme
BMIS 530Systems Analysis and Redesign Project Phase 3Assignme
JeniceStuckeyoo
 
powerpoint
powerpointpowerpoint
powerpoint
butest
 
Software engineering
Software engineeringSoftware engineering
Software engineering
Fahe Em
 
Software engineering
Software engineeringSoftware engineering
Software engineering
Fahe Em
 

Similaire à Software Measurement: Lecture 1. Measures and Metrics (20)

Why computer programming
Why computer programmingWhy computer programming
Why computer programming
 
software engineering module i & ii.pptx
software engineering module i & ii.pptxsoftware engineering module i & ii.pptx
software engineering module i & ii.pptx
 
A Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality IndicatorsA Validation of Object-Oriented Design Metrics as Quality Indicators
A Validation of Object-Oriented Design Metrics as Quality Indicators
 
Data Structures- Part1 overview and review
Data Structures- Part1 overview and reviewData Structures- Part1 overview and review
Data Structures- Part1 overview and review
 
Search Engines
Search EnginesSearch Engines
Search Engines
 
Slides chapter 15
Slides chapter 15Slides chapter 15
Slides chapter 15
 
Software maintenance
Software maintenanceSoftware maintenance
Software maintenance
 
Unit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programmingUnit 1 introduction to visual basic programming
Unit 1 introduction to visual basic programming
 
Implementing Item Response Theory
Implementing Item Response TheoryImplementing Item Response Theory
Implementing Item Response Theory
 
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
se_lectures.DS_Store__MACOSXse_lectures._.DS_Storese_
 
LCMC Session: Email and Web Conversion Success
LCMC Session: Email and Web Conversion SuccessLCMC Session: Email and Web Conversion Success
LCMC Session: Email and Web Conversion Success
 
Introduction.pptx
 Introduction.pptx Introduction.pptx
Introduction.pptx
 
BMIS 530Systems Analysis and Redesign Project Phase 3Assignme
BMIS 530Systems Analysis and Redesign Project Phase 3AssignmeBMIS 530Systems Analysis and Redesign Project Phase 3Assignme
BMIS 530Systems Analysis and Redesign Project Phase 3Assignme
 
powerpoint
powerpointpowerpoint
powerpoint
 
OOAD - Ch.09 - Software Project Estimation.pptx
OOAD - Ch.09 - Software Project Estimation.pptxOOAD - Ch.09 - Software Project Estimation.pptx
OOAD - Ch.09 - Software Project Estimation.pptx
 
Introduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regressionIntroduction to machine learning and model building using linear regression
Introduction to machine learning and model building using linear regression
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
Software engineering
Software engineeringSoftware engineering
Software engineering
 
EE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptxEE-232-LEC-01 Data_structures.pptx
EE-232-LEC-01 Data_structures.pptx
 
Software Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled DatasetsSoftware Defect Prediction on Unlabeled Datasets
Software Defect Prediction on Unlabeled Datasets
 

Plus de Programeter

Panel Discussion
Panel DiscussionPanel Discussion
Panel Discussion
Programeter
 

Plus de Programeter (7)

Software Measurement: Lecture 3. Metrics in Organization
Software Measurement: Lecture 3. Metrics in OrganizationSoftware Measurement: Lecture 3. Metrics in Organization
Software Measurement: Lecture 3. Metrics in Organization
 
Software Measurement: Lecture 2. Function Point Analysis
Software Measurement: Lecture 2. Function Point AnalysisSoftware Measurement: Lecture 2. Function Point Analysis
Software Measurement: Lecture 2. Function Point Analysis
 
Panel Discussion
Panel DiscussionPanel Discussion
Panel Discussion
 
Software Outsourcing - Inkspin1 Experience
Software Outsourcing - Inkspin1 ExperienceSoftware Outsourcing - Inkspin1 Experience
Software Outsourcing - Inkspin1 Experience
 
What Can We Do Together?
What Can We Do Together?What Can We Do Together?
What Can We Do Together?
 
Russian Speaking Developers Best Match for Estonian Startups?
Russian Speaking Developers Best Match for Estonian Startups?Russian Speaking Developers Best Match for Estonian Startups?
Russian Speaking Developers Best Match for Estonian Startups?
 
Outsourcing for Startups
Outsourcing for StartupsOutsourcing for Startups
Outsourcing for Startups
 

Dernier

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
vu2urc
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
Earley Information Science
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 

Dernier (20)

Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Software Measurement: Lecture 1. Measures and Metrics