Quantitative Methods in Software Engineering, IIITDM Jabalpur, October, 2009
SOFTWARE MEASUREMENT AND METRICS Dr Atul Gupta
[email protected]
Why to Measure
“If you cannot measure it you can not improve it.” — Lord Kelvin "if you can't measure it, you can't manage it“ Measurement is the basis for scientific advancement in a field SE A SE: An A Art? t? A Craft? C ft? or Engineering? E i i ?
Measurement Objectives
How cognitive and social behavior affect software quality Achieving Quality and Quality Improvement D ii M Decision Making ki Project Management Development of software as an engineering Discipline p Establishing organization-wise benchmarks
Types of Measurement
Primitive and Derived Qualitative and Quantitative Static and Dynamic D t TTypes (Scale) Data (S l ) Nominal Ordinal Interval Ratio
Qualitative
Quantitative
What to Measure? Project
Product
People Environment
Process
Not necessarily y orthogonal g !
Product Related
Size Qualityy Performance Correctness Scalability Modifiability M difi bilit Usability
Defects Documentation
Project Related
Cost Resource Requirements q Scheduling Ri k assessmentt Risk Development Time Developer productivity
Process Related
Deliverables Activityy time (ex: ( testing g time)) Resources Requirements A t Automation ti Defect rate
Environment Related
Hard deadlines vs. Soft deadlines People p related Skills Training Experience Cultural C lt l
Technology usage Organization, life styles, political, business goals
Examples of Some Issues
Schedule (Project)
Size (Product)
Quality (Correctness) - Product
Quality (Performance) - Product
Measure: Desirable characteristics
The measurements must be reproducible The attributes being measured must be valid
Software Measuring Process
Issues and measures (metrics) Data sources Levels of measurement A Aggregation ti (St (Storage)) structure t t Frequency of collection Method of access Interpretation, communication and interfaces Frequency of reporting
Difficulty in Software Measurement
Dealing with abstraction – no training in determination of the properties (attributes) of objects Ex:
Project duration
Reproducibility Lack of Standardization (ex: (ex failure) Noise The
very act of measurement alters the attribute being measured.
Difficulty in Software Measurement
Most measures are misleadingly precise, yet not very accurate Size doesn’t map directly to functionality, complexity, p y, or q qualityy Incremental development M Many measures only l apply l after ft coding di has h been b done Surrogate measures
Applying a Measurement Process Design Process
Applying a Measurement Process Effort
Measuring Process Objectives 1.
2.
3.
4.
5.
Learn to measure accurately people, processes, products, and environments. Learn to do the necessary science to reveal how these domains interact. Institutionalize the process of learning from past mistakes. Institutionalize the process of learning from past successes. Institutionalize the measurement improvement process.
Summary
Measurement in SE is time-consuming and difficult to do perfectly You need to choose what you want to find out, and how to approach measuring that Always be aware of the limitations of the measurement and of how it relates to what y you reallyy want to know Having a measuring process in place
References
S.L. Pfleeger, R. Jeffery, B. Curtis, B. Kitshenham. Status Report on Software Measurement. IEEE Software, March/April 1997. J. Clapp. pp Getting g Started on Software Metrics. IEEE Software, January 1993 SAPM SAPM Spring 2009: Software Measurement – Slides [Dr James A. Bednar]