210 likes | 257 Views
Understand the importance of software metrics, their goals, characteristics, classification, models, and the dos and don'ts in quality improvements. Learn how to enact metrics programs for successful software development and control.
E N D
Software Metrics byAmr KamelPhD Student in Software EngineeringDepartment of Computing ScienceUniversity of Alberta
Introduction ‘You can’t control what you can’t measure’ Tom DeMarco • Required Qualities of a technical system: • Functionality - e.g correctness, reliability. • Performance - e.g. response time, throughput. • Economy - e.g cost effectiveness. CMPUT 401
Definition • Mathematical: • A function that measures the distance between two objects in a set. • Software: • Measure for the software qualities - a mapping from artifacts to a measurement scale. CMPUT 401
Metrics Goals • The goal is to identify and measure the essential parameters that affect software development: • Estimate • Cost and Effort for: • a particular period. • particular artifact. • Plan • Development aspects • Control • Quality aspects. CMPUT 401
Characteristics of Good Metrics • For a single metric: • Simple. • Objective. • Easily obtained - (automated?). • Valid. • Robust. • For a metrics model: • Consistent. • Complete. CMPUT 401
State of Software Metrics • What are we measuring? • There are no “universally accepted” set of metrics. • Lack of sound theoretical basis. • Lack of universally defined primitives. • Various models use different set of parameters. CMPUT 401
Classification • Product versus Process. • Objective versus Subjective. • Primitive versus Computed. CMPUT 401
Category: Size Complexity Quality Inheritance Coupling and Uses Reuse Granularity System Class Method Product Metrics CMPUT 401
Object Oriented Paradigm • Size: • System: Number of classes • Class: Number of methods • Method: LOC • Complexity: • System: Number of edges in the class hierarchy chain. • Class: Counts of parents, children, progeny • Method: MCC • Quality: • Defect count and MTTF (Mean Time To Failure) CMPUT 401
Object-Oriented Paradigm • Inheritance: • Depth of inheritance tree. • Coupling and uses • Number of accesses to (or by) other classes. • # of cooperating classes. • Reuse: • “as-is” reuse (methods, classes, system). • “adapted” reuse. CMPUT 401
Process Metrics • Time (elapsed time, consumed time). • Effort (person-month). • Personnel (experience, continuity, etc.). • Development setup (tools, programming language, schedule requirements, etc). CMPUT 401
Metrics Models • Empirical: • Wolverton (1974) • Statistical: • Walston & Felix (1977) • Theory-based • Rayleigh model (1978) • Composite • COCOMO model (1981) CMPUT 401
Wolverton Model • Modules are classified into types. (control, I/O) • Each module is categorized as: • Hard, Medium, Easy and • Old, New. • Module size are estimated. • Cost is estimated based on historical data. CMPUT 401
COCOMO Model • a & b are constants - determined for each model and model level. • S is program size in KLOC • m is a composite multiplier determined by 17 cost-drivers grouped in 4 categories: • Product, platform, personnel and project. CMPUT 401
Problems With Metrics Models • Model validity. • Need for sound statistical methods. • Need for experimentation. • Scaling, environment effect. • Data: collection, availability. CMPUT 401
Process Maturity- Benchmarking • Characterization for process practices W.R.T. Industry best practices. • Fundamental to the characterization is the use of statistical control. CMPUT 401
Process Maturity Models • HealthCheck (BT), Trillium (Cantel). • ISO 9000 (ISO 9000-3, ISO 9001) • Capability and Maturity Model (CMM) • Software Process Improvement and Capability dEtermination (SPICE) - ISO 15504. CMPUT 401
Enacting Metrics Programs Standardize Define Objectives Plan Act Check Do Propose a Model, Action Plan Success Indicators CMPUT 401
Enacting Metrics Programs • Plan. • Identify your customer. • Identify the attacked problem(s) and identify goals. • Estimate costs. • Do. • Choose a model. • Define and detail required data. • Provide tools & training. CMPUT 401
Enacting Metrics Programs • Check. • Establish quality criteria for the program. • Implement the program on a sample project. • Act. • Institutionalize the program. CMPUT 401
Dos & Don’t In Quality Improvements • Dos: • Provide training & support. • Ensure management support. • Set realistic expectations. • Don’ts: • Separate quality assurance and development. • Manage by fear or break team morals. • Show progress rather than make progress. CMPUT 401