Software Metrics Software Engineering 2007

Similar documents
Lecture 1: Software Measurement. Marlon Dumas

Software Measurement. Software Economics 2009

Workshop 1: Software Measurement. Marlon Dumas

Software Measurement. Software Economics 2010

Main Message. Workshop 1a: Software Measurement. Dietmar Pfahl

ESTIMATION OF ASPECT ORIENTED PROGRAMMING USING DIFFERENT METRICES

Technische Universität München. Software Quality. Management. Dr. Stefan Wagner Technische Universität München. Garching 18 June 2010

Software metrics. Jaak Tepandi

Comparing Automated and Human Maintainability Assessment Approaches

Lecture 2: Software Quality Factors, Models and Standards. Software Quality Assurance (INSE 6260/4-UU) Winter 2016

Introduction to Software Metrics

Source-code quality. Part 1. Software Metrics. Andy Kellens. Monday 22 April 13

Software Reliability and Testing: Know When To Say When. SSTC June 2007 Dale Brenneman McCabe Software

Software Engineering I (02161)

Software Metrics. Kristian Sandahl

So#ware Architecture

Introduction to Software Metrics

SWEN 256 Software Process & Project Management

Software Measurement Pitfalls & @jstvssr

Lecture 28: Software metrics

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF INFORMATION TECHNOLOGY QUESTION BANK

Metrics and Estimation. Metrics. Lord Kelvin

Foundations of Software Engineering

GQM: Goal Question Metrics

GEARING FACTORS. The A FLEXIBLE SIZING APPROACH

Finding The Relationship Between Software Testing Effort And Software Quality Metrics

Measurement Tailoring Workshops

BCS HIGHER EDUCATION QUALIFICATIONS Level 6 Professional Graduate Diploma in IT. October 2012 EXAMINERS REPORT. Software Engineering 2

Dissertation Defense

Quality Management of Software and Systems: Software Measurement

SIG/TÜViT Evaluation Criteria Trusted Product Maintainability: Guidance for producers

Process: Goals, Risks, Estimation, Planning, and Metrics : Software Engineering Practicum

Scientific Journal Impact Factor: (ISRA), Impact Factor: 2.114

Management of Software Engineering. Ch. 8 1

Software Project Management

Personal Software Process SM for Engineers: Part I

Transaction versus transform flow. Wednesday, September 19, :32 PM

Adapting software project estimation to the reality of changing development technologies

2IS55 Software Evolution. Software metrics (3) Alexander Serebrenik

2IS55 Software Evolution. Software metrics (3) Alexander Serebrenik

"Charting the Course... Application Lifecycle Management Using Visual Studio 2010 (Agile) Course Summary

Uncovering Risk in Your ICD-10 Conversion. Key Risk & Effort Metrics for ICD Data Testing

Software Engineering Measurement and Fundamental Estimation Techniques.

Note 6. Software Metrics

TDDC88 Lab 5 Software Metrics and Quality Factors

Software Quality and Risk Analysis

CS SOFTWARE ENGINEERING QUESTION BANK

Software Measurement

Software Quality S O F T W A R E T E S T I N G. By: MSMZ

Personal SE Project Management Process Lecture/Week 1. A. Winsor Brown

12/04/ : Course Overview. Review to 1 st Exam. Process-based Software Quality. 2: Introduction to SQM. Software Standards

Industrial Automation course

MODERNIZATION PLATFORM AS A SERVICE (MODPAAS)

Reliability Engineering. RIT Software Engineering

Guaranteed Value Projects in Legacy Modernization. Michael Oara VP for R&D Relativity Technologies, Inc.

LEVERAGE EARNED VALUE MANAGEMENT WITH FUNCTION POINT ANALYSIS

How to improve the quality of your processes

Study of Lehman's Laws and Metrics during Software Evolution

using software metrics to detect refactorings Thomas Haug MATHEMA Software GmbH 209

How to improve the quality of your processes

Software Quality Management

Software Quality Management

THE CORRELATION BETWEEN DEVELOPER-ORIENTED AND USER-ORIENTED SOFTWARE QUALITY MEASUREMENTS (A CASE STUDY)

Software Process and Project Metrics

Agile Guru Q & A. Michael James Software Process Mentor and Scrum Trainer. March 29, 2013 ENTERPRISE CLOUD DEVELOPMENT 1

CORE APPLICATIONS ANALYSIS OF BUSINESS-CRITICAL ADABAS & NATURAL

Darshan Institute of Engineering & Technology for Diploma Studies

OBJECT ORIENTED SYSTEM USING SOFTWARE MATRICES

International Journal of Software and Web Sciences (IJSWS) Optimal solution of software component selection by using software metric

ECE-492 SENIOR ADVANCED DESIGN PROJECT

Software Measurement Software Economics lecture 3: metrics in organizations

Software Sustainability

Managing Projects with Microsoft Project Server 2010

Top Metrics for SPICE-compliant projects

Chapter 4 Software Process and Project Metrics

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE AND ENGINEERING SYLLABUS

The Myths Behind Software Metrics. Myths and Superstitions

Welcome to lecture 4 of Topic 2.9. In this lecture we focus on Phase 2 of the Project Management Lifecycle the planning phase

Software Project Planning The overall goal of project planning is to establish a pragmatic strategy for controlling, tracking, and monitoring a comple

A Proposed Model for Estimating Quality of Product Built Using Object Oriented Concept

Spreadsheet Simulation. Development and Learning Benefits. MPS Interactive Systems Limited. All rights reserved.

Process Improvement Measurement Workshop

Published by: PIONEER RESEARCH & DEVELOPMENT GROUP(

inter.noise 2000 The 29th International Congress and Exhibition on Noise Control Engineering August 2000, Nice, FRANCE

Software Project Management

Mastering Microsoft Project 2010

Schedule. Complexity of software systems. McCabe s cyclomatic complexity

MSc Software Testing MSc Prófun hugbúnaðar

Lecture 6 Software Quality Measurements

Cost, Complexity and Coverage

Project Planning. COSC345 Software Engineering 2016 Slides by Andrew Trotman given by O K

Managing Customer Specific Projects Tomas Nyström

Effective Test Automation of SAP Implementations

ARCHITECTING PROJECT MANAGEMENT for Enterprise Agility. Enable Organization with Agile using Tooling/Technology

Software Data Analytics. Nevena Lazarević

Dottie Acton Senior Fellow Lockheed Martin. Copyright 2009 Lockheed Martin Corporation. All Rights Reserved.

Software Process 2/12/01 Lecture #

MSc Software Testing and Maintenance MSc Prófun og viðhald hugbúnaðar

TDT4250 Modelling of information Systems Autumn Meta-modeling. John Krogstie IDI, NTNU and SINTEF

National Institute of Technology Calicut Department of Mechanical Engineering PRODUCTION PLANNING (AGGREGATE PLANNING)

Transcription:

Software Engineering 2007 Anton Litvinenko

2/51

3/51

You can t control what you can t measure Tom DeMarco Controlling Software Projects 4/51

Measurement Assignment of quantitative indications to product's attributes Mapping from real world to numbers Preserves empirical relation Quantitative attribute objective Variety of magnitudes Stand in relation to one another Not quantitative subjective Feelings, emotions 5/51

Example Empirical relation I am higher than Bill Gates 6/51

Example Empirical relation I am higher than Bill Gates Measurement My height is 192cm Bill's height is 178cm 7/51

Metrics quantitative representation of otherwise vague attributes GOAL IMPROVEMENT 8/51

One-timer Contribution size How much code developer has contributed during the last week 29. Aug. 2007 Anton's contribution was 600 lines of code What this number tells us? 9/51

10/51

Iterative I Sequence of steps executed multiple times (periodic, cyclic) not iterative as iterative development 1400 1200 1000 Anton Team Avg 800 600 400 200 0 01.08.07 08.08.07 15.08.07 22.08.07 29.08.07 05.09.07 11/51

Iterative II Gave Anton one week off (12.09.2007) 1600 1400 1200 Anton Team Avg 1000 800 600 400 200 0 01.08.07 08.08.07 15.08.07 22.08.07 29.08.07 05.09.07 12.09.07 19.09.07 26.09.07 12/51

Applications of Metrics Project progress estimation Product size, velocity,... Evaluation of tools and methods Growth of productivity and quality,... Product quality evaluation Quality of design and code, number of bugs,... Provide feedback to project team Developer reputation,... 13/51

What software metrics do you know? 14/51

Lines of Code Product size LOC, SLOC, CLOC,... 15/51

Lines of Code II 16/51

Lines of Code III Accurate, easy to measure How to interpret... Empty lines Comments Several statements on one line Depends on the language Doesn't respect complexity and content 17/51

Function Points Product size Use-Case evaluation Each use-case screened for: External Input: add new purchase External Output: monthly purchase breakdown External Inquiries: view client data Internal Logical Files: DB table with client data External Interface Files: warehouse interface For each such concept > complexity Low, Average, High Number of F-points using formula 18/51

Function Points II Low Average High External Input _ 3 _ 4 _ 6 External Output _ 4 _ 5 _ 7 External Inquiries _ 3 _ 4 _ 6 Internal Logical Files _ 7 _ 10 _ 15 External Interface Files _ 10 _ 15 _ 25 Unweighted Number of F-points: Σ 19/51

Function Points III: Example Ökonoom saab hallata ladu Võimalus lisada uut kaupa Võimalus eemaldada kaupa süsteemist Võimalus muuta kauba hinda, kogust ja nime NB! Given example is simplified 20/51

Function Points IV Independent of programming language Can be applied earlier in the project No source code needed Complexity estimation is subjective Not accurate 21/51

Lines of Code and F-points Size and productivity estimation and evaluation Previous project 1337 F-points and 24 man-months New project 876 F-points > man-months 22/51

McCabe s Cyclomatic Complexity Thomas McCabe, 1976 Measures complexity Number of linearly independent paths through a program (or method) Usually measured on the flow graph V(G) = e n + 2 e num of edges, n num of vertices V(G) = d + 1 d num of conditional statements (if, for, throw(s),...) 23/51

McCabe s Cyclomatic Complexity II 24/51

McCabe s Cyclomatic Complexity III 2: System.out.println("----------"); for (Client c : clients) e = 7 n = 6 V(G) = 3 4-5: System.out.println(c.getId() + " " + c.getfirstname()); if (clients.size() == 0) 8: System.out.println("\tNothing"); 10: System.out.println("----------"); 25/51

McCabe s Cyclomatic Complexity IV Comprehensibility V(G) >10 > probability of bugs rises Relation to software testing Lower bound for the number of paths through method Upper bound for the number of branches in the method Doesn't respect other complexities Data structure, data flows, interfaces 26/51

Software Metric Classification Measurement Subject 27/51

Software Development Process Measuring the efficiency of process application Examples of metrics Length of (development) iteration Number of changes in requirements Number of finished tasks 28/51

Resources Measuring resource usage and properties Examples of metrics Personnel competency Personnel fluctuation Personnel know-how in the project* 29/51

Product Measuring product attributes Size, complexity, performance,... Examples of metrics LOC, SLOC, CLOC, function points (McCabe s) cyclomatic complexity Code coverage (with tests) Code stability* 30/51

Software Metric Classification II Measuring vs Combining 31/51

Direct Metrics Directly measurable One measured attribute or entity Examples of Metrics LOC, SLOC, CLOC (entity: product) Number of methods Number of requirements (entity: requirement specification) 32/51

Indirect Metrics Derived metrics not possible to measure directly Combination of several metrics Involves many attributes or entities Examples of Metrics Requirement stability: initial num of req.-s/total num of req.-s Bug Density: number of bugs/loc 33/51

Software Metric Classification III Internal vs External 34/51

Internal Attributes Measured in terms of only the entity itself Measurement environment is not relevant Examples of Metrics LOC, Density of Comments Code coverage (with tests) Code reuse 35/51

External Attributes Measured with respect to environment Examples of Metrics Performance Usability Maintainability 36/51

Are software metrics good or evil? Why? 37/51

Critics People evaluation by numbers Emotions, people adjust Easy to mistreat Either meaningful or accurate Not both: LOC vs F-points Solution: set up clear goals and choose corresponding metrics 38/51

Frameworks GQM: Goal Question Metric PSM: Practical Software Measurement AMI:... Application of Metrics in Industry 39/51

Goal Question Metric Framework Conceptual Level: Goals Goal 1 Goal 2 DEFINITION Operational Level: Questions Quantitative Level: Metrics Q1 Q2 Q3 Q4 M1 M2 M3 M4 M5 ANALYSIS 40/51

GQM Exercise Any burning trouble in SE lab teams? 41/51

GQM Exercise Any burning trouble in SE lab teams? Some team members are much more committed than the others 42/51

GQM Naive Example Goal: 90% koodi keerukus on alla 10 Q1: Milline koodi keerukus hetkel on? Q2: Kuidas koodi keerukus paraneb? M1: Koodi keskmine keerukus M2: Koodi keerukus moodulite kaupa M3: Koodi keerukus meetodite kaupa M4: Koodi keerukus autorite kaupa M5: Koodi keerukuse muutus kuus 43/51

Some Tools Metrics for Java Open Source Teams* http://www.sourcekibitzer.org/ Metrics Eclipse Extension http://metrics.sourceforge.net/ JDepend http://clarkware.com/software/jdepend.html Chidamber and Kemerer Java Metrics http://www.spinellis.gr/sw/ckjm/ RefactorIT http://refactorit.com/... 44/51

Exercise Calculate following metrics for the given code sample LOC, SLOC McCabe's Cyclomatic Complexity Solution CODE SAMPLE McCabe's Cyclomatic Complexity FLOW GRAPH 45/51

Question Where is the highest probability of undetected bugs? (Given that all modules are tested equally well) in modules showing LARGEST number of known bugs in modules showing SMALLEST number of known bugs 46/51

Exercise Make up 10 metrics for evaluation of these slides: Metric Attribute of measurement Example Number of slides -> Presentation Size Ratio of pictures to the number of slides -> Presentation Complexity 47/51

Metric is... Goal:... The most important aspect of application:... If software metrics topic seems interesting to you: Anton Litvinenko email: anton.litvinenko@sourcekibitzer.com skype: anton.a.litvinenko 48/51

Please Keep in Mind is a tool helping us to perform better BUT it is NOT a SILVER BULLET! You have to be careful and know the context of measurements Otherwise you might end up with wrong interpretation of metrics values 49/51

References Wikipedia http://en.wikipedia.org/wiki/software_metric C. Lange, Metrics in Software Architecting http://www.win.tue.nl/~mchaudro/sa2007/metrics%20architecti M. Gökmen, Software Process and Project Metrics http://www3.itu.edu.tr/~gokmen/se-lecture-2.pdf H. Nestra, Metrics, Software Engineering 2005 http://courses.cs.ut.ee/2005/tvt/uploads/main/software_enginee GQM Approach http://www.goldpractices.com/practices/gqm/index.php More... http://www.laynetworks.com/software%20engineering.htm http://www.parlezuml.com/metrics/oo%20design%20principles 50/51

References II Lines of Code http://en.wikipedia.org/wiki/source_lines_of_code McCabe's Cyclomatic Complexity http://en.wikipedia.org/wiki/cyclomatic_complexity http://www.sei.cmu.edu/str/descriptions/cyclomatic_body.html http://www.stsc.hill.af.mil/crosstalk/1994/12/xt94d12b.asp Function Points http://www.csee.umbc.edu/~mikeg/cmsc645/function_point.html http://www.softwaremetrics.com/function%20point%20training% http://www.codeproject.com/gen/design/softwarecosting.asp http://www.ifpug.com/fpafund.htm 51/51