SOFTWARE METRICS. Software Process Revisited The Software Process has a common process framework containing: u framework activities - for all software.

Slides:



Advertisements
Similar presentations
Cost as a Business Driver 1 John Brown C Eng MIEE mr_ Software Cost Estimation.
Advertisements

Software Engineering CSE470: Process 15 Software Engineering Phases Definition: What? Development: How? Maintenance: Managing change Umbrella Activities:
Chapter 2 The Software Process
These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 6/e and are provided with permission by.
Metrics for Process and Projects
1 These courseware materials are to be used in conjunction with Software Engineering: A Practitioner’s Approach, 5/e and are provided with permission by.
Software Construction
ICS Management Poor management is the downfall of many software projects Software project management is different from other engineering management.
Software Configuration Management
Soft. Eng. II, Spr. 02Dr Driss Kettani, from I. Sommerville1 CSC-3325: Chapter 6 Title : The Software Quality Reading: I. Sommerville, Chap: 24.
R R R CSE870: Advanced Software Engineering (Cheng): Intro to Software Engineering1 Advanced Software Engineering Dr. Cheng Overview of Software Engineering.
Software Project Planning CS 414 – Software Engineering I Donald J. Bagert Rose-Hulman Institute of Technology December 12, 2002.
SOFTWARE PROJECT MANAGEMENT AND COST ESTIMATION © University of LiverpoolCOMP 319slide 1.
Software Process and Product Metrics
Chapter : Software Process
University of Toronto Department of Computer Science © 2001, Steve Easterbrook CSC444 Lec22 1 Lecture 22: Software Measurement Basics of software measurement.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 22 Slide 1 Verification and Validation.
System Analysis and Design
Dillon: CSE470: SE, Process1 Software Engineering Phases l Definition: What? l Development: How? l Maintenance: Managing change l Umbrella Activities:
Introduction to Software Engineering LECTURE 2 By Umm-e-Laila 1Compiled by: Umm-e-Laila.
Software Engineering Software Process and Project Metrics.
Chapter 6 : Software Metrics
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 26 Slide 1 Software cost estimation 1.
©Ian Sommerville 2000Software Engineering, 6th edition. Chapter 23Slide 1 Chapter 23 Software Cost Estimation.
Software Measurement & Metrics
Software Project Management With Usage of Metrics Candaş BOZKURT - Tekin MENTEŞ Delta Aerospace May 21, 2004.
Software cost estimation Predicting the resources required for a software development process 1.
Product Metrics An overview. What are metrics? “ A quantitative measure of the degree to which a system, component, or process possesses a given attribute.”
Software Metrics Software Engineering.
Software Engineering SM ? 1. Outline of this presentation What is SM The Need for SM Type of SM Size Oriented Metric Function Oriented Metric 218/10/2015.
Software Project Management Lecture # 3. Outline Chapter 22- “Metrics for Process & Projects”  Measurement  Measures  Metrics  Software Metrics Process.
Lecture 4 Software Metrics
Cost Estimation What is estimated? –resources (humans, components, tools) –cost (person-months) –schedule (months) Why? –Personnel allocation –Contract.
Quality Software Project Management Software Size and Reuse Estimating.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Disciplined Software Engineering Lecture #2 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #2 Software Engineering.
Computing and SE II Chapter 15: Software Process Management Er-Yu Ding Software Institute, NJU.
Chapter 3: Software Project Management Metrics
©Ian Sommerville 2000Software Engineering, 7th edition. Chapter 26Slide 1 Software cost estimation l Predicting the resources required for a software development.
Cmpe 589 Spring 2006 Lecture 2. Software Engineering Definition –A strategy for producing high quality software.
Introduction to Measurement. According to Lord Kelvin “When you can measure what you are speaking about and express it in numbers, you know something.
SOFTWARE PROCESS AND PROJECT METRICS. Topic Covered  Metrics in the process and project domains  Process, project and measurement  Process Metrics.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
CS 350: Introduction to Software Engineering Slide Set 2 Process Measurement C. M. Overstreet Old Dominion University Fall 2005.
Carnegie Mellon Software Engineering Institute © 2006 by Carnegie Mellon University Software Process Performance Measures James Over Software Engineering.
Advanced Software Engineering Lecture 4: Process & Project Metrics.
©Ian Sommerville 2004Software Engineering, 7th edition. Chapter 21 Slide 1 Software evolution.
Cost Estimation Cost Estimation “The most unsuccessful three years in the education of cost estimators appears to be fifth-grade arithmetic. »Norman.
Software Engineering (CSI 321) Software Process: A Generic View 1.
1 These slides are designed to accompany Software Engineering: A Practitioner’s Approach, 7/e (McGraw-Hill 2009). Slides copyright 2009 by Roger Pressman.
Project Planning. Overview Planning and the software process Estimating duration and cost Software project management plan components Software project.
Software Test Metrics When you can measure what you are speaking about and express it in numbers, you know something about it; but when you cannot measure,
Advanced Software Engineering Dr. Cheng
Estimate Testing Size and Effort Using Test Case Point Analysis
Software Metrics 1.
Chapter 18 Maintaining Information Systems
Why Do We Measure? assess the status of an ongoing project
Software Quality Engineering
SLOC and Size Reporting
Personal Software Process Software Estimation
Chapter 9 – Software Evolution and Maintenance
Software Metrics “How do we measure the software?”
Why Do We Measure? assess the status of an ongoing project
Software Engineering I
Software metrics.
Measurement What is it and why do it? 2/23/2019
Why Do We Measure? assess the status of an ongoing project
Why Do We Measure? assess the status of an ongoing project
Software Effort Estimation
Presentation transcript:

SOFTWARE METRICS

Software Process Revisited The Software Process has a common process framework containing: u framework activities - for all software projects u work tasks u project milestones u software work products and deliverables u quality assurance points u umbrella activities - occur throughout the process u software quality assurance u software configuration management u software metrics or measurement

Measurement Measurement is fundamental to engineering ‘ When you can measure what you are speaking about and express it in numbers, you know something about it; but when you cannot measure, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind’. (Lord Kelvin)

Software Metrics Software Metrics refers to measurements relating to computer software. Software Metrics can assist in: –Improving the software process by: Assessing productivity and estimating Controlling the project and its quality –Assessing the quality of a software product

Scope of Software Metrics u Software Metrics has two main fields of application: –Measure/assessment of a software product or process (eg a baseline – as it is now) –Prediction of critical features involved in a software project (ie a future estimate)

Software Product/Process Measurement u An integral part of the Project Plan u Aims to provide data which can be used to better control the production of software “You cannot control what you cannot measure” Tom de Marco (1982)

The Need for Software Metrics Software Production suffers from –Excessive Costs (especially Maintenance) –Low Productivity & Poor Quality –Lack of Standards, Professionalism because we fail to set measurable targets: –Measure the ‘real’ costs in projects –Quantify the quality –Properly evaluate new tools and techniques

The Need for Software Metrics.... Managers need to: –Measure System Costs to determine a realistic price –Measure Productivity of Staff, to set company-wide productivity goals –Measure ‘whole of system’ costs to better estimate complexity, schedule, resources and budgets –Measure the ‘added value’ of the project to the organisation

The Need for Software Metrics.... u Software Developers need to: –Monitor the quality of evolving systems by making regular process measurements –Specify quality and performance requirements in measurable terms –Identify potentially complex components –Measure the reliability of the product –Measure the quality of software, to determine methods, baselines, targets etc

Main Issues Software Metrics are used to help improve these aspects of a system: u Visibility u Quality u Productivity u Planning and control

Cost Estimation Process

To estimate the Cost of a system –it is important to know the Size of the system –Typical Size measures are: LOC – Lines of Code FP – Function Points

Software Size and Complexity u Estimating/Measuring Software Size Measures must be:  Useful for planning  Precise  Automatically countable Estimate must be:  Available early in the life-cycle u Estimation of Effort  requires knowledge of the Complexity of a system  Useful technique is COCOMO

Software Size... u Usefulness of Measures for Planning... –Development time is a function of program size the time it takes to develop a program depends upon the size (and the complexity) of the program –On a large project there may be many kinds of products –Product size measures should correlate to the effort/ hours you need to develop them –Source Lines of Code (SLOC) is a common size measure

LOC... u Lines of Code (LOC) or SLOC – Source Lines of Code Defining LOC »use complete definitions »you or your organisation should develop a Standard »(eg C++ SLOC Counting Standard – refer Attachment)

LOC... u What factors influence a definition of LOC? –Language –Count Type: Logical or physical –Compiler Directives –Comments »Not general practice to include comments but there should be a coding standard to cover this »Comments are part of the Eiffel standard so should be included in the LOC –Blank lines - not usually counted

LOC... u What factors influence a definition of LOC? –Statement Type »Executable - but what about u class_monitor.my_menu.activate u thisPage.PrintL(Mylist.GetString(ThisData,1)) u Logical constructs if..then..else u Reused code »Declarations u class MONITOR I,J : INTEGER u Preconditions, postconditions u begin..end

LOC... u Physical LOC Counters –Simplest type of counter –Ignore blank lines –Comment lines? –It is useful to keep totals for each program unit »What units should we keep totals for? (Eiffel class?) »How would we determine the start / end of a unit? Exercise: Produce a Physical LOC count standard for Eiffel

LOC... u Logical LOC Counters Works the same as a Physical LOC counter, but Line-counter stepping is more complex »Establish a logical line-count standard »No one counting method superior to another »BE CONSISTENT! You could set coding standards to write one Logical LOC per line then you would combine two methods in one.

LOC... Using the LOC Count u Measurement Types –An Eiffel LOC count is different from »a C++ LOC count »an Assembler LOC count –You should not mix LOC counts for »test code, support code, product code

LOC... Using the LOC Count... u Meaning of LOC –If 2 programmers code the same program »Programmer A produced 1200 LOC in 117 hours »Programmer B produced 793 LOC in 61 hours –therefore Programmer B »took much less time, »produced 30% more LOC per hour What does LOC tell us?

LOC... u LOC and Project Evaluation –Estimated time to develop Historical information from the same type of project will give an estimated LOC per working hour –Total defects found per LOC or defects/KLOC A standard measurement –Maintenance Small code changes to large programs are a significant quality concern Small code changes are almost 40 times as error prone as new development

LOC... Counting Issues –For software reuse: Do we count reused code? –Reused code affects: Definition of productivity – LOC per day Quality measurement – defects per KLOC –If reuse should be rewarded, it should be counted!!! –For maintenance: Do we count modified code and deleted code?

LOC... u LOC Counting Methods –You can get almost any numbers you want... Option LOCProductivity (LOC/hour) Added Added + Modified Added + Modified + Deleted Added + Modified + Reused Added + Modified + Deleted + Reused Total Finished Product

LOC... u Problems with LOC for Estimation  Hard to judge at project start  All software projects unique  Historical data may assist  Need to determine the difference between new project and last Need a proxy, a stand-in for LOC

OO Metrics Proxies 1. Classes as Proxies Satisfy criteria: »Related to development effort »Automatically countable »easily visualized at project start 2. Routines/Features as Proxies »Gives finer-grained measure »You could weight a class by the number of routines it contains

OO Metrics... Categories of Classes Three broad categories of classes in an application: »Model u application classes »View u menus, windows etc. »Controller u Commands Do the classes in each category exhibit different size characteristics? Is the code in each easier or harder to write?

OO Metrics... For your assignment, calculate: u For each class category: Number of classes For each class: For each routine implemented here LOC count for each routine Average length / class in the category u Note the difference –In average length of class / category

Summary ‘You cannot control what you cannot measure’ Tom de Marco