Beruflich Dokumente
Kultur Dokumente
BY
MAZWIN ABDUL WAHAB NUUROL FARHANA MOHD ZAKI NURAIN AMRAN
Objectives Definitions The Scope of Software Metrics Measurement Metric Classification Types of Measures Metrics and Software Quality Measures of Sofware Quality 12 Steps to Useful Sofware Metrics Tools Improvements/Motivation of Metrics Issues
Objectives
To describe the current state-of-the-art in the measurement of software products and process in order to provide a quality product.
Definitions
Measure - Quantitative indication of extent, amount, dimension, capacity, or size of some attribute of a product or process. E.g., Number of errors
Metrics - Quantifiable measures that could be used to measure characteristics of a software system or the software development process. E.g., Number of errors found per person hours expended
cost and effort estimation productivity measures and models data collection quality models and measures reliability models performance evaluation and model
Software Code
Number of lines of code, number of operations Team size, average team experience
Measurement
1. WHY MEASURES?
"When you can measure what you are speaking about and express it in numbers, you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind: it may be the beginnings of knowledge but you have scarcely in your thoughts advanced to the stage of Science." Lord Kelvin (Physicist)
"You cannot control what you cannot measure." Tom DeMarco (Software Engineer)
Measurement
Measures is really important because...
Quality of deliverables Timely delivery Cost Need quantitative data Continuous improvement
3W Measures
2. WHAT TO MEASURES ?
Types of Measures
Types of Measures
Metric Classifications
Products (Output)
Explicit results of software development activities Deliverables, documentation, by products Quantify characteristics of the product being developed Activities related to production of software Quantify characteristics of the process being used to develop the software Inputs into the software development activities hardware, knowledge, people
Processes
Resources (Input)
Types of Metric
Nominal
eg: ordering, but no quantitative comparison (programmer capability: low, average, high)
Interval
eg :between certain values (programmer capability: between 55th and 75th percentile of the population ability)
Types of Metric
Ratio
eg: (the proposed software is twice as big as the software that has just been completed)
Absolute
Functionality - features of system Usability aesthesis, documentation Reliability frequency of failure, security Performance speed, throughput Supportability maintainability
Correctness degree to which a program operates according to specification Defects/KLOC Defect is a verified lack of conformance to requirements Failures/hours of operation Maintainability degree to which a program is open to change Mean time to change Change request to new version (Analyze, design etc) Cost to correct Integrity - degree to which a program is resistant to outside attack Fault tolerance, security & threats
Usability easiness to use Training time, skill level necessary to use, Increase in productivity, subjective questionnaire or controlled experiment
2. Derive QUESTIONS from the GOAL -What is our current level of customer satisfaction? -What attributes of our products and services are most important to our customers? -How do we compare with our competition?
GQM
A reminder on generating measurements:
Goal: is Improved Quality Question: What is the Post Release Defect Rate? Metric: Number of problems found per user months
Identify problems from the basic metrics -High fault rates during coding phase Introduce strategy to correct the problems -Select metrics that provide information to help answer the questions -Be practical, realistic, pragmatic -Consider current engineering environment -Start with the possible To monitor success, collect more detailed metrics -Fault rates of individual programmers
Select definitions from the literature that match your organizational goals Use them as a basis for creating your own definitions Apply them consistently
Lines of Code
Variations in counting No industry accepted standard SEI guideline - check sheets for criteria Advice: use a tool
Counting Criteria-Effort
100 80 60 40 20 0
100 80 60 40 20 0 Jan
1st Qtr 2nd Qtr 3rd Qtr 4th Qtr
1st Qtr
2nd Qtr
3rd Qtr
4th Qtr
120
80
40
Mar
May
July
120
80
40
0 0 20 40 60 80 100 120
1 2 3 4 5 6 7 8 9 10 11 12
-Provide demographic information -Allow detailed analysis at multiple levels -Define additional data requirements
Motivation of Metrics
Establish productivity trends over time Improve software quality Forecast future staffing needs Anticipate and reduce future maintenance needs
Do and Dont
Dont Measure individuals Use metrics as a stick Use only one metric Ignore the data
Do and Dont
Do Select metrics based on goals Provide feedback Focus on processes, products & services Obtain buy-in
Tools
CCCC
A metric analyser C, C++, Java, Ada-83, and Ada-95 (by Tim
Metrics calculated
Lines Of Code (LOC) McCabes cyclomatic complexity C&K suite (WMC, NOC, DIT, CBO) Generates HTML and XML reports freely available
http://cccc.sourceforge.net/
Tools
Jmetric
OO metric calculation tool for Java code (by Cain and Vasa for a
project at COTAR, Australia) Requires Java 1.2 (or JDK 1.1.6 with special extensions) Metrics Lines Of Code per class (LOC) Cyclomatic complexity LCOM (by Henderson-Seller) Availability is distributed under GPL
http://www.it.swin.edu.au/projects/jmetric
Tools
GEN++
simplifies the task of creating analysis tools for the C++ several tools have been created with GEN++, and come with the package these can both be used directly, and as a springboard for other applications
Tools
A Source of Information for Mission Critical Software Systems, Management Processes, and Strategies http://www.niwotridge.com/Resources/PM-SWEResources/SWTools.htm
Object-oriented metrics http://me.in-berlin.de/~socrates/oo_metrics.html Software Metrics Sites on the Web (Thomas Fetcke)