Visual Studio Tips and Tricks Code Metrics Zain Naboulsi Sr. Developer Evangelist Microsoft Blog: blogs.msdn.com/

Slides:



Advertisements
Similar presentations
SPEC Workshop 2008 Laboratory for Computer Architecture1/27/2008 On the Object Orientedness of C++ programs in SPEC CPU 2006 Ciji Isen & Lizy K. John University.
Advertisements

Bartłomiej Bodziechowski 1, Eryk Ciepiela 2, Marian Bubak 1,2 1 AGH University of Science and Technology, Department of Computer Science AGH, 2 AGH University.
NTFS - The workhorse file system for the Windows Platform
Matthew Kubicina CIS 764 Kansas State University.
MSDN Connection Get personalised information on the topics and technologies you want Profile yourself today and get updates via RSS Get personalised information.
Metrics for OO Design Distinct & measurable characteristics of OO design:- Size:-it is defined as – population,volume,length & functionality Population.
Software Metrics for Object Oriented Design
Computer CPU BUS Memory VM Back Channel Memory BUS Node 1 Node 2 VM.
Prediction of fault-proneness at early phase in object-oriented development Toshihiro Kamiya †, Shinji Kusumoto † and Katsuro Inoue †‡ † Osaka University.
Figures – Chapter 24.
Metrics for Object Oriented Design Shyam R. Chidamber Chris F. Kemerer Presented by Ambikadevi Damodaran.
Applying and Interpreting Object Oriented Metrics
March 25, R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity Comment percentage Length of identifiers Depth of conditional.
Nov R. McFadyen1 Metrics Fan-in/fan-out Lines of code Cyclomatic complexity* Comment percentage Length of identifiers Depth of conditional.
Design Metrics Software Engineering Fall 2003 Aditya P. Mathur Last update: October 28, 2003.
Object-Oriented Metrics
March R. McFadyen1 Software Metrics Software metrics help evaluate development and testing efforts needed, understandability, maintainability.
1 Complexity metrics  measure certain aspects of the software (lines of code, # of if-statements, depth of nesting, …)  use these numbers as a criterion.
Predicting Class Testability using Object-Oriented Metrics M. Bruntink and A. van Deursen Presented by Tom Chappell.
Object Oriented Metrics XP project group – Saskia Schmitz.
Chapter 9: Software Metrics
Comp 587 Parker Li Bobby Kolski. Automated testing tools assist software engineers to gauge the quality of software by automating the mechanical aspects.
Visual Studio Tips and Tricks. Credits Zain Naboulsi Microsoft Developer Evangelist isbn:
1 The Relationship of Cyclomatic Complexity, Essential Complexity and Error Rates Mike Chapman and Dan Solomon
Cyclomatic Complexity Dan Fleck Fall 2009 Dan Fleck Fall 2009.
1 NASA OSMA SAS02 Software Reliability Modeling: Traditional and Non-Parametric Dolores R. Wallace Victor Laing SRS Information Services Software Assurance.
Chidamber & Kemerer Suite of Metrics
ITF11006.NET Industrial Programming. Guidelines – Development Guidelines – UX Guidelines Quality Measures – Code Metrics – Code Analyses Robustness –
Design Space Exploration
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University 1 Refactoring.
Object-Oriented Metrics Alex Evans Jonathan Jakse Cole Fleming Matt Keran Michael Ababio.
Paradigm Independent Software Complexity Metrics Dr. Zoltán Porkoláb Department of Programming Languages and Compilers Eötvös Loránd University, Faculty.
1 Software Engineering: A Practitioner’s Approach, 6/e Chapter 15b: Product Metrics for Software Software Engineering: A Practitioner’s Approach, 6/e Chapter.
Product Metrics An overview. What are metrics? “ A quantitative measure of the degree to which a system, component, or process possesses a given attribute.”
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
1 OO Metrics-Sept2001 Principal Components of Orthogonal Object-Oriented Metrics Victor Laing SRS Information Services Software Assurance Technology Center.
The CK Metrics Suite. Weighted Methods Per Class b To use this metric, the software engineer must repeat this process n times, where n is the number of.
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.
1 Metrics and lessons learned for OO projects Kan Ch 12 Steve Chenoweth, RHIT Above – New chapter, same Halstead. He also predicted various other project.
Software Metrics Cmpe 550 Fall Software Metrics.
CSc 461/561 Information Systems Engineering Lecture 5 – Software Metrics.
Object-Oriented (OO) estimation Martin Vigo Gabriel H. Lozano M.
Ontology Support for Abstraction Layer Modularization Hyun Cho, Jeff Gray Department of Computer Science University of Alabama
Object Oriented Metrics
Software Engineering Lecture 19: Object-Oriented Testing & Technical Metrics.
Cyclomatic complexity (or conditional complexity) is a software metric (measurement). Its gives the number of indepented paths through strongly connected.
Microsoft Corporation. Announcement Visual Studio® Team System 2008 Enables you to Build Quality Code Be More Productive Collaborate at the Next Level.
1 OO Technical Metrics CIS 375 Bruce R. Maxim UM-Dearborn.
Software Engineering Object Oriented Metrics. Objectives 1.To describe the distinguishing characteristics of Object-Oriented Metrics. 2.To introduce metrics.
CS223: Software Engineering Lecture 21: Unit Testing Metric.
1 Week 7 Software Engineering Spring Term 2016 Marymount University School of Business Administration Professor Suydam.
Briand4 1 Property-Based Software Engineering Measurement Lionel Briand, Sandro Morasca, Victor Basili IEEE TOSE Jan 96.
Design Metrics CS 406 Software Engineering I Fall 2001 Aditya P. Mathur Last update: October 23, 2001.
Object Oriented Metrics
School of Business Administration
A Hierarchical Model for Object-Oriented Design Quality Assessment
Industrial Programming
Assessment of Geant4 Software Quality
Software Metrics 1.
Course Notes Set 12: Object-Oriented Metrics
Design Characteristics and Metrics
Towards a Multi-paradigm Complexity Measure
Object-Oriented Metrics
CS427: Software Engineering I
Design Metrics Software Engineering Fall 2003
Design Metrics Software Engineering Fall 2003
Mei-Huei Tang October 25, 2000 Computer Science Department SUNY Albany
Software Metrics SAD ::: Fall 2015 Sabbir Muhammad Saleh.
Software Metrics using EiffelStudio
Chapter 8: Design: Characteristics and Metrics
Presentation transcript:

Visual Studio Tips and Tricks Code Metrics Zain Naboulsi Sr. Developer Evangelist Microsoft Blog: blogs.msdn.com/ zainnab

Code Metrics What are they? Why should I care? Lines of Code (LOC) Cyclomatic Complexity Class Coupling / Coupling Between Objects (CBO) Depth of Inheritance Tree (DIT) Maintainability Index Using the Tool Window

What are they? “[…]a measure of some property of a piece of software or its specifications […]” “[…] a set of software measures […]”

Why should I care? Find those areas that are (statistically) more likely to produce problems Determine where to focus limited resources Understand the current state of a solution / project Keep track of where we have been and where we are going

Lines of Code (LOC) Basic Info Raw count of IL lines Not a good measure by itself Stats N/A when used alone Code Analysis N/A

Cyclomatic Complexity Basic Info Count of decisions More decisions means more errors Used often with LOC Stats 10 Suggested upper limit Code Analysis CA Upper limit

Depth of Inheritance (DIT) Basic Info The maximum length from the node to the root of the inheritance tree Three assumptions Deeper == harder to predict behavior Deeper == greater design complexity Deeper == more reuse of code Stats Low Less complex Less reuse of code High More complex More reuse of code 5 or 6 for upper limit Code Analysis CA OOD_ChidamberKemerer94.pdf

Class Coupling / Coupling Between Objects (CBO) Basic Info Number of classes a single class uses Stats 9 Upper limit Code Analysis CA for class 30 for method Kemerer94.pdf

Maintainability Index Basic Info Calculates an index value between 0 and 100 that represents the relative ease of maintaining the code Stats High == good Low == bad Ratings Green (20 – 100) Yellow (10 – 19) Red (0 – 9) Code Analysis CA or lower threshold

Using the Tool Window