SlideShare a Scribd company logo
1 of 28
Software Quality Assessment Practices
Presented By : Moutasm Tamimi , 2018
Outline: Metrics on application
• Lines of Code (LOC)
• Lines of Comments
• Percentage Comment
• Number of IL Instructions
• Number of Assemblies
• Number of Namespaces
• Number of Types Number of Methods
• Number of Fields
• Number of Parameters
• Number of Variables
• Efferent coupling (Ce)
• Afferent coupling (Ca)
• Instability (I)
• Abstractness
• Cohesion metrics
• Relational Cohesion (H)
• Depth of inheritance tree (DIT)
• Number of children (NOC)
• Association between classes (ABC)
• Cyclomatic complexity (CC)
Presented By : Moutasm Tamimi , 2018
Software metric
A software metric is a standard of measure
of a degree to which a software system or
process possesses some property.
Presented By : Moutasm Tamimi , 2018
Lines of Code (LOC)
Metrics type description Example
Lines of Code (LOC) Physical Line of Code (LOC)=4
Logical Lines of Code (LLOC)=2
for (i = 0; i < 100; i++)
{
printf("hello");
}
Recommendations
1. Methods where NbLinesOfCode is higher than 20 are hard to understand and maintain
2. Methods where NbLinesOfCode is higher than 40 are extremely complex and should be split in
smaller methods
Presented By : Moutasm Tamimi , 2018
Lines of Comments
Metrics type Description Example
Lines of Comments a comment is a programmer-readable
explanation or annotation in the source code
of a computer program. They are added with
the purpose of making the source code easier
for humans to understand, and are generally
ignored by compilers and interpreters.
/* welcome to the system
…..
*/
Percentage Comment 100 * NbLinesOfComment / (
NbLinesOfComment + NbLinesOfCode)
NbLinesOfComment =10
NbLinesOfCode=50
Percentage Comment =
100*10/(10+50)= 16.6
Recommendations
This metric is not helpful to assess the quality of source code
Presented By : Moutasm Tamimi , 2018
Number of Intermediate language Instructions
Metrics type Description Example
Nb IL Instructions Intermediate language. Code exists on
many levels. Abstraction is a ladder. At the
highest levels of abstraction, we have C#
code. At a lower level, we have an
intermediate language.
Instructions. The IL has instructions
(opcodes - operation code) that manipulate
the stack. These instructions, called
intermediate language opcodes, reside in a
relational database called the metadata
Recommendations
NbILInstructions is higher than 100 are hard to understand and maintain.
Methods where NbILInstructions is higher than 200 are extremely complex and should be split in smaller methods
Presented By : Moutasm Tamimi , 2018
Assemblies, Namespace, Type, Method, Field
Metrics type Description Example
NbAssemblies Defined for application
An assembly provides a fundamental unit of physical code
grouping.
(Security, Type Identity
Reference Scope, Versioning
Deployment)
System.Windows.Forms.dll
assembly
NbNamespaces Defined for application, assemblies
A namespace provides a fundamental unit of logical code
grouping.
class library packages
NbTypes An abstract or a concrete class, a structure, an enumeration, a
delegate class or an interface.
Classes
NbMethods A method can be an abstract, virtual or non-virtual method, a
method declared in an interface, a constructor, a class
constructor, a finalizer, a property/indexer getter or setter, an
event adder or remover
Methods
Recommendations
NbMethods > 20 might be hard to understand and maintain but there might be cases where it is relevant to have a high value
for NbMethods
NbFields field can be a regular field, an enumeration's value or a read-
only or a const field
Int x;
Example
Presented By : Moutasm Tamimi , 2018
Package infrastructure
Presented By : Moutasm Tamimi , 2018
Outline: Metrics on application
• Lines of Code (LOC)
• Lines of Comments
• Percentage Comment
• Number of IL Instructions
• Number of Assemblies
• Number of Namespaces
• Number of Types Number of Methods
• Number of Fields
• Number of Parameters
• Number of Variables
• Efferent coupling (Ce)
• Afferent coupling (Ca)
• Instability (I)
• Abstractness
• Cohesion metrics
• Relational Cohesion (H)
• Depth of inheritance tree (DIT)
• Number of children (NOC)
• Association between classes (ABC)
• Cyclomatic complexity (CC)
Presented By : Moutasm Tamimi , 2018
Coupling
• The degree of interdependence between software modules; a
measure of how closely connected two routines or modules are; the
strength of the relationships between modules.
Presented By : Moutasm Tamimi , 2018
Coupling
• Tight coupling (high coupling) A module has many relations with
many other modules, less maintainability
• Loose coupling (low coupling) A module has fewer relationships with
other modules.
low coupling is better situation
• maintainability – changes are confined in a single module
• testability – modules involved in unit testing can be limited to a minimum
• readability – classes that need to be analyzed are kept at a minimum
• Understand one class without reading others
• Change one class without affecting others
Presented By : Moutasm Tamimi , 2018
Efferent coupling (Ce)
Efferent coupling (Ce) of types within this package
that depend on types outside this package.
Ex It measures the number of data types
Ex Outgoing Dependencies or the Number of Types
inside a Package that Depend on Types of other
Packages
A large efferent coupling can indicate that a
package is unfocussed and may also indicate that it
is unstable since it depends on the stability of all
the types to which it is coupled
Presented By : Moutasm Tamimi , 2018
Afferent coupling (Ca)
• Number of types outside this package that depend on types within
this package.
Presented By : Moutasm Tamimi , 2018
Instability (I)
• This metric is used to measure the relative susceptibility of class to
changes. According to the definition instability is the ration of
outgoing dependencies to all package dependencies and it accepts
value from 0 to 1.
• I=0 indicates a completely stable package, painful to modify.
• I=1 indicates a completely instable package.
Presented By : Moutasm Tamimi , 2018
Abstractness
• Abstractness (A): ratio of the number of internal abstract types to the
number of internal types.
• A=0 indicates a completely concrete package.
• A=1 indicates a completely abstract package
Presented By : Moutasm Tamimi , 2018
Cohesion metrics
• Cohesion metrics measure how well the methods of a class are related to
each other. A cohesive class performs one function. A non-cohesive class
performs two or more unrelated functions. A non-cohesive class may need
to be restructured into two or more smaller classes.
• Relational Cohesion (H): average number of internal relationships per
type:
• H = (R + 1) / N,
R = number of type relationships internal to the package,
N = number of types in the package.
• Classes inside an assembly should be strongly related, the cohesion should
be high. On the other hand, too high values may indicate over-coupling. A
good range is 1.5 ≤ H ≤ 4.0
Presented By : Moutasm Tamimi , 2018
Cohesion metrics
• Low Cohesion: Functionalities of a module are independent of each
other.
• High Cohesion: Functionalities of a module are strongly related.
- High cohesion is better situation.
• Readability – (closely) related functions are contained in a single module
• Maintainability – debugging tends to be contained in a single module
• Reusability – classes that have concentrated functionalities are not polluted
with useless functions
• Understand what a class or method does
• Use descriptive names
Presented By : Moutasm Tamimi , 2018
Cohesion and coupling
Presented By : Moutasm Tamimi , 2018
Example
Presented By : Moutasm Tamimi , 2018
Inheritance
• Depth of inheritance tree (DIT) for a class or a structure is its number
of base classes (including System.Object thus DIT ≥ 1).
Types where DIT > 6 might be hard to maintain.
Not a rule since sometime classes inherit from tier classes which have a high
DIT.
E.g., the average depth of inheritance for framework classes which derive from
System.Windows.Forms.Control is 5.3
• Number of children: (NOC) for a class is the number of types that
subclass it directly or indirectly. Number of children for an interface is
the number of types that implement it.
Presented By : Moutasm Tamimi , 2018
Example
Presented By : Moutasm Tamimi , 2018
lack of cohesion of methods
• The single responsibility principle states that
a class should not have more than one
reason to change.
• A high LCOM value generally pinpoints a
poorly cohesive class.
• Types where LCOM > 0.8 and |F| > 10 and
|M| >10 might be problematic. However, it is
very hard to avoid such non-cohesive types
Presented By : Moutasm Tamimi , 2018
Association between classes (ABC)
• The association between classes (ABC) is the number of members of
others types that a class directly uses in its the body of its methods.
Presented By : Moutasm Tamimi , 2018
Cyclomatic complexity (CC)
• Cyclomatic Complexity (CC) Number of these expressions in the
method body
• “if, while, for, foreach, case, default, continue, goto, &&, ||, catch, ?
: (ternary operator), ?? (nonnull operator)”
• These expressions are not counted:
• “else, do, switch, try, using, throw, finally, return, object creation,
method call, field access”
• CC > 15 are hard to understand, CC > 30 are extremely complex and
should be split into smaller methods (unless generated code)
Presented By : Moutasm Tamimi , 2018
IL Cyclomatic Complexity (ILCC)
• ILCC: Number of distinct code offsets targeted by jump/branch IL
instructions. Language independent.
• ILCC is generally larger than CC.
• ILCC( if ) = 1
• ILCC( for ) = 2
• ILCC( foreach ) = 3
• ILCC > 20 are hard to understand, ILCC > 40 are extremely complex and
should be split into smaller methods (unless generated code)
Presented By : Moutasm Tamimi , 2018
Thank you
• https://www.slideshare.net/moutasmtamimi/
“Keep in update content”
Speaker Information
 Moutasm tamimi
 Masters of Software Engineering
 Independent Consultant , IT Researcher.
 CEO at ITG7.com , IT-CRG.com
 Email: tamimi@itg7.com
Click Here
Click HereI T G 7
Click Here
Click HereIT-CRG

More Related Content

Similar to Software Quality Assessment Practices

C STANDARDS (C17).pptx
C STANDARDS (C17).pptxC STANDARDS (C17).pptx
C STANDARDS (C17).pptxSKUP1
 
C STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptxC STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptxSKUP ACADEMY
 
C STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptxC STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptxSKUP ACADEMY
 
C STANDARDS (C17).pptx
C STANDARDS (C17).pptxC STANDARDS (C17).pptx
C STANDARDS (C17).pptxLECO9
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave ImplicitMartin Odersky
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metricsTushar Sharma
 
Programming with C++
Programming with C++Programming with C++
Programming with C++ssuser802d47
 
Effective Software Design
Effective Software Design Effective Software Design
Effective Software Design Darshan Ashpal
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsAkhil Kaushik
 
Software Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsSoftware Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsProgrameter
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code MetricsDonald Belcham
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 

Similar to Software Quality Assessment Practices (20)

C++ Basics
C++ BasicsC++ Basics
C++ Basics
 
C STANDARDS (C17).pptx
C STANDARDS (C17).pptxC STANDARDS (C17).pptx
C STANDARDS (C17).pptx
 
C STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptxC STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptx
 
C STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptxC STANDARDS (C17) (1).pptx
C STANDARDS (C17) (1).pptx
 
C STANDARDS (C17).pptx
C STANDARDS (C17).pptxC STANDARDS (C17).pptx
C STANDARDS (C17).pptx
 
What To Leave Implicit
What To Leave ImplicitWhat To Leave Implicit
What To Leave Implicit
 
Understanding software metrics
Understanding software metricsUnderstanding software metrics
Understanding software metrics
 
Programming with C++
Programming with C++Programming with C++
Programming with C++
 
Effective Software Design
Effective Software Design Effective Software Design
Effective Software Design
 
Intro to Data Structure & Algorithms
Intro to Data Structure & AlgorithmsIntro to Data Structure & Algorithms
Intro to Data Structure & Algorithms
 
Rust presentation convergeconf
Rust presentation convergeconfRust presentation convergeconf
Rust presentation convergeconf
 
Software Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and MetricsSoftware Measurement: Lecture 1. Measures and Metrics
Software Measurement: Lecture 1. Measures and Metrics
 
Generics
GenericsGenerics
Generics
 
algo 1.ppt
algo 1.pptalgo 1.ppt
algo 1.ppt
 
Introduction
IntroductionIntroduction
Introduction
 
OOM Unit I - III.pdf
OOM Unit I - III.pdfOOM Unit I - III.pdf
OOM Unit I - III.pdf
 
Grasp principles
Grasp principlesGrasp principles
Grasp principles
 
The Dark Side of Code Metrics
The Dark Side of Code MetricsThe Dark Side of Code Metrics
The Dark Side of Code Metrics
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
12.6-12.9.pptx
12.6-12.9.pptx12.6-12.9.pptx
12.6-12.9.pptx
 

More from Moutasm Tamimi

Reengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software SpecificationsReengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software SpecificationsMoutasm Tamimi
 
Software Evolution and Maintenance Models
Software Evolution and Maintenance ModelsSoftware Evolution and Maintenance Models
Software Evolution and Maintenance ModelsMoutasm Tamimi
 
Software evolution and maintenance basic concepts and preliminaries
Software evolution and maintenance   basic concepts and preliminariesSoftware evolution and maintenance   basic concepts and preliminaries
Software evolution and maintenance basic concepts and preliminariesMoutasm Tamimi
 
An integrated security testing framework and tool
An integrated security testing framework  and toolAn integrated security testing framework  and tool
An integrated security testing framework and toolMoutasm Tamimi
 
Critical Success Factors along ERP life-cycle in Small medium enterprises
Critical Success Factors along ERP life-cycle in Small medium enterprises Critical Success Factors along ERP life-cycle in Small medium enterprises
Critical Success Factors along ERP life-cycle in Small medium enterprises Moutasm Tamimi
 
Critical Success Factors (CSFs) In International ERP Implementations with que...
Critical Success Factors (CSFs) In International ERP Implementations with que...Critical Success Factors (CSFs) In International ERP Implementations with que...
Critical Success Factors (CSFs) In International ERP Implementations with que...Moutasm Tamimi
 
Best Practices For Business Analyst - Part 3
Best Practices For Business Analyst - Part 3Best Practices For Business Analyst - Part 3
Best Practices For Business Analyst - Part 3Moutasm Tamimi
 
Concepts Of business analyst Practices - Part 1
Concepts Of business analyst Practices - Part 1Concepts Of business analyst Practices - Part 1
Concepts Of business analyst Practices - Part 1Moutasm Tamimi
 
Recovery in Multi database Systems
Recovery in Multi database SystemsRecovery in Multi database Systems
Recovery in Multi database SystemsMoutasm Tamimi
 
Software Quality Models: A Comparative Study paper
Software Quality Models: A Comparative Study  paperSoftware Quality Models: A Comparative Study  paper
Software Quality Models: A Comparative Study paperMoutasm Tamimi
 
ISO 29110 Software Quality Model For Software SMEs
ISO 29110 Software Quality Model For Software SMEsISO 29110 Software Quality Model For Software SMEs
ISO 29110 Software Quality Model For Software SMEsMoutasm Tamimi
 
Windows form application - C# Training
Windows form application - C# Training Windows form application - C# Training
Windows form application - C# Training Moutasm Tamimi
 
Asp.net Programming Training (Web design, Web development)
Asp.net Programming Training (Web design, Web  development)Asp.net Programming Training (Web design, Web  development)
Asp.net Programming Training (Web design, Web development)Moutasm Tamimi
 
Database Management System - SQL Advanced Training
Database Management System - SQL Advanced TrainingDatabase Management System - SQL Advanced Training
Database Management System - SQL Advanced TrainingMoutasm Tamimi
 
Database Management System - SQL beginner Training
Database Management System - SQL beginner Training Database Management System - SQL beginner Training
Database Management System - SQL beginner Training Moutasm Tamimi
 
Measurement and Quality in Object-Oriented Design
Measurement and Quality in Object-Oriented DesignMeasurement and Quality in Object-Oriented Design
Measurement and Quality in Object-Oriented DesignMoutasm Tamimi
 
SQL Injection and Clickjacking Attack in Web security
SQL Injection and Clickjacking Attack in Web securitySQL Injection and Clickjacking Attack in Web security
SQL Injection and Clickjacking Attack in Web securityMoutasm Tamimi
 

More from Moutasm Tamimi (17)

Reengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software SpecificationsReengineering PDF-Based Documents Targeting Complex Software Specifications
Reengineering PDF-Based Documents Targeting Complex Software Specifications
 
Software Evolution and Maintenance Models
Software Evolution and Maintenance ModelsSoftware Evolution and Maintenance Models
Software Evolution and Maintenance Models
 
Software evolution and maintenance basic concepts and preliminaries
Software evolution and maintenance   basic concepts and preliminariesSoftware evolution and maintenance   basic concepts and preliminaries
Software evolution and maintenance basic concepts and preliminaries
 
An integrated security testing framework and tool
An integrated security testing framework  and toolAn integrated security testing framework  and tool
An integrated security testing framework and tool
 
Critical Success Factors along ERP life-cycle in Small medium enterprises
Critical Success Factors along ERP life-cycle in Small medium enterprises Critical Success Factors along ERP life-cycle in Small medium enterprises
Critical Success Factors along ERP life-cycle in Small medium enterprises
 
Critical Success Factors (CSFs) In International ERP Implementations with que...
Critical Success Factors (CSFs) In International ERP Implementations with que...Critical Success Factors (CSFs) In International ERP Implementations with que...
Critical Success Factors (CSFs) In International ERP Implementations with que...
 
Best Practices For Business Analyst - Part 3
Best Practices For Business Analyst - Part 3Best Practices For Business Analyst - Part 3
Best Practices For Business Analyst - Part 3
 
Concepts Of business analyst Practices - Part 1
Concepts Of business analyst Practices - Part 1Concepts Of business analyst Practices - Part 1
Concepts Of business analyst Practices - Part 1
 
Recovery in Multi database Systems
Recovery in Multi database SystemsRecovery in Multi database Systems
Recovery in Multi database Systems
 
Software Quality Models: A Comparative Study paper
Software Quality Models: A Comparative Study  paperSoftware Quality Models: A Comparative Study  paper
Software Quality Models: A Comparative Study paper
 
ISO 29110 Software Quality Model For Software SMEs
ISO 29110 Software Quality Model For Software SMEsISO 29110 Software Quality Model For Software SMEs
ISO 29110 Software Quality Model For Software SMEs
 
Windows form application - C# Training
Windows form application - C# Training Windows form application - C# Training
Windows form application - C# Training
 
Asp.net Programming Training (Web design, Web development)
Asp.net Programming Training (Web design, Web  development)Asp.net Programming Training (Web design, Web  development)
Asp.net Programming Training (Web design, Web development)
 
Database Management System - SQL Advanced Training
Database Management System - SQL Advanced TrainingDatabase Management System - SQL Advanced Training
Database Management System - SQL Advanced Training
 
Database Management System - SQL beginner Training
Database Management System - SQL beginner Training Database Management System - SQL beginner Training
Database Management System - SQL beginner Training
 
Measurement and Quality in Object-Oriented Design
Measurement and Quality in Object-Oriented DesignMeasurement and Quality in Object-Oriented Design
Measurement and Quality in Object-Oriented Design
 
SQL Injection and Clickjacking Attack in Web security
SQL Injection and Clickjacking Attack in Web securitySQL Injection and Clickjacking Attack in Web security
SQL Injection and Clickjacking Attack in Web security
 

Recently uploaded

Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样umasea
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Andreas Granig
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 

Recently uploaded (20)

Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
办理学位证(UQ文凭证书)昆士兰大学毕业证成绩单原版一模一样
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024Automate your Kamailio Test Calls - Kamailio World 2024
Automate your Kamailio Test Calls - Kamailio World 2024
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 

Software Quality Assessment Practices

  • 1. Software Quality Assessment Practices Presented By : Moutasm Tamimi , 2018
  • 2. Outline: Metrics on application • Lines of Code (LOC) • Lines of Comments • Percentage Comment • Number of IL Instructions • Number of Assemblies • Number of Namespaces • Number of Types Number of Methods • Number of Fields • Number of Parameters • Number of Variables • Efferent coupling (Ce) • Afferent coupling (Ca) • Instability (I) • Abstractness • Cohesion metrics • Relational Cohesion (H) • Depth of inheritance tree (DIT) • Number of children (NOC) • Association between classes (ABC) • Cyclomatic complexity (CC) Presented By : Moutasm Tamimi , 2018
  • 3. Software metric A software metric is a standard of measure of a degree to which a software system or process possesses some property. Presented By : Moutasm Tamimi , 2018
  • 4. Lines of Code (LOC) Metrics type description Example Lines of Code (LOC) Physical Line of Code (LOC)=4 Logical Lines of Code (LLOC)=2 for (i = 0; i < 100; i++) { printf("hello"); } Recommendations 1. Methods where NbLinesOfCode is higher than 20 are hard to understand and maintain 2. Methods where NbLinesOfCode is higher than 40 are extremely complex and should be split in smaller methods Presented By : Moutasm Tamimi , 2018
  • 5. Lines of Comments Metrics type Description Example Lines of Comments a comment is a programmer-readable explanation or annotation in the source code of a computer program. They are added with the purpose of making the source code easier for humans to understand, and are generally ignored by compilers and interpreters. /* welcome to the system ….. */ Percentage Comment 100 * NbLinesOfComment / ( NbLinesOfComment + NbLinesOfCode) NbLinesOfComment =10 NbLinesOfCode=50 Percentage Comment = 100*10/(10+50)= 16.6 Recommendations This metric is not helpful to assess the quality of source code Presented By : Moutasm Tamimi , 2018
  • 6. Number of Intermediate language Instructions Metrics type Description Example Nb IL Instructions Intermediate language. Code exists on many levels. Abstraction is a ladder. At the highest levels of abstraction, we have C# code. At a lower level, we have an intermediate language. Instructions. The IL has instructions (opcodes - operation code) that manipulate the stack. These instructions, called intermediate language opcodes, reside in a relational database called the metadata Recommendations NbILInstructions is higher than 100 are hard to understand and maintain. Methods where NbILInstructions is higher than 200 are extremely complex and should be split in smaller methods Presented By : Moutasm Tamimi , 2018
  • 7. Assemblies, Namespace, Type, Method, Field Metrics type Description Example NbAssemblies Defined for application An assembly provides a fundamental unit of physical code grouping. (Security, Type Identity Reference Scope, Versioning Deployment) System.Windows.Forms.dll assembly NbNamespaces Defined for application, assemblies A namespace provides a fundamental unit of logical code grouping. class library packages NbTypes An abstract or a concrete class, a structure, an enumeration, a delegate class or an interface. Classes NbMethods A method can be an abstract, virtual or non-virtual method, a method declared in an interface, a constructor, a class constructor, a finalizer, a property/indexer getter or setter, an event adder or remover Methods Recommendations NbMethods > 20 might be hard to understand and maintain but there might be cases where it is relevant to have a high value for NbMethods NbFields field can be a regular field, an enumeration's value or a read- only or a const field Int x;
  • 8. Example Presented By : Moutasm Tamimi , 2018
  • 9. Package infrastructure Presented By : Moutasm Tamimi , 2018
  • 10. Outline: Metrics on application • Lines of Code (LOC) • Lines of Comments • Percentage Comment • Number of IL Instructions • Number of Assemblies • Number of Namespaces • Number of Types Number of Methods • Number of Fields • Number of Parameters • Number of Variables • Efferent coupling (Ce) • Afferent coupling (Ca) • Instability (I) • Abstractness • Cohesion metrics • Relational Cohesion (H) • Depth of inheritance tree (DIT) • Number of children (NOC) • Association between classes (ABC) • Cyclomatic complexity (CC) Presented By : Moutasm Tamimi , 2018
  • 11. Coupling • The degree of interdependence between software modules; a measure of how closely connected two routines or modules are; the strength of the relationships between modules. Presented By : Moutasm Tamimi , 2018
  • 12. Coupling • Tight coupling (high coupling) A module has many relations with many other modules, less maintainability • Loose coupling (low coupling) A module has fewer relationships with other modules. low coupling is better situation • maintainability – changes are confined in a single module • testability – modules involved in unit testing can be limited to a minimum • readability – classes that need to be analyzed are kept at a minimum • Understand one class without reading others • Change one class without affecting others Presented By : Moutasm Tamimi , 2018
  • 13. Efferent coupling (Ce) Efferent coupling (Ce) of types within this package that depend on types outside this package. Ex It measures the number of data types Ex Outgoing Dependencies or the Number of Types inside a Package that Depend on Types of other Packages A large efferent coupling can indicate that a package is unfocussed and may also indicate that it is unstable since it depends on the stability of all the types to which it is coupled Presented By : Moutasm Tamimi , 2018
  • 14. Afferent coupling (Ca) • Number of types outside this package that depend on types within this package. Presented By : Moutasm Tamimi , 2018
  • 15. Instability (I) • This metric is used to measure the relative susceptibility of class to changes. According to the definition instability is the ration of outgoing dependencies to all package dependencies and it accepts value from 0 to 1. • I=0 indicates a completely stable package, painful to modify. • I=1 indicates a completely instable package. Presented By : Moutasm Tamimi , 2018
  • 16. Abstractness • Abstractness (A): ratio of the number of internal abstract types to the number of internal types. • A=0 indicates a completely concrete package. • A=1 indicates a completely abstract package Presented By : Moutasm Tamimi , 2018
  • 17. Cohesion metrics • Cohesion metrics measure how well the methods of a class are related to each other. A cohesive class performs one function. A non-cohesive class performs two or more unrelated functions. A non-cohesive class may need to be restructured into two or more smaller classes. • Relational Cohesion (H): average number of internal relationships per type: • H = (R + 1) / N, R = number of type relationships internal to the package, N = number of types in the package. • Classes inside an assembly should be strongly related, the cohesion should be high. On the other hand, too high values may indicate over-coupling. A good range is 1.5 ≤ H ≤ 4.0 Presented By : Moutasm Tamimi , 2018
  • 18. Cohesion metrics • Low Cohesion: Functionalities of a module are independent of each other. • High Cohesion: Functionalities of a module are strongly related. - High cohesion is better situation. • Readability – (closely) related functions are contained in a single module • Maintainability – debugging tends to be contained in a single module • Reusability – classes that have concentrated functionalities are not polluted with useless functions • Understand what a class or method does • Use descriptive names Presented By : Moutasm Tamimi , 2018
  • 19. Cohesion and coupling Presented By : Moutasm Tamimi , 2018
  • 20. Example Presented By : Moutasm Tamimi , 2018
  • 21. Inheritance • Depth of inheritance tree (DIT) for a class or a structure is its number of base classes (including System.Object thus DIT ≥ 1). Types where DIT > 6 might be hard to maintain. Not a rule since sometime classes inherit from tier classes which have a high DIT. E.g., the average depth of inheritance for framework classes which derive from System.Windows.Forms.Control is 5.3 • Number of children: (NOC) for a class is the number of types that subclass it directly or indirectly. Number of children for an interface is the number of types that implement it. Presented By : Moutasm Tamimi , 2018
  • 22. Example Presented By : Moutasm Tamimi , 2018
  • 23. lack of cohesion of methods • The single responsibility principle states that a class should not have more than one reason to change. • A high LCOM value generally pinpoints a poorly cohesive class. • Types where LCOM > 0.8 and |F| > 10 and |M| >10 might be problematic. However, it is very hard to avoid such non-cohesive types Presented By : Moutasm Tamimi , 2018
  • 24. Association between classes (ABC) • The association between classes (ABC) is the number of members of others types that a class directly uses in its the body of its methods. Presented By : Moutasm Tamimi , 2018
  • 25. Cyclomatic complexity (CC) • Cyclomatic Complexity (CC) Number of these expressions in the method body • “if, while, for, foreach, case, default, continue, goto, &&, ||, catch, ? : (ternary operator), ?? (nonnull operator)” • These expressions are not counted: • “else, do, switch, try, using, throw, finally, return, object creation, method call, field access” • CC > 15 are hard to understand, CC > 30 are extremely complex and should be split into smaller methods (unless generated code) Presented By : Moutasm Tamimi , 2018
  • 26. IL Cyclomatic Complexity (ILCC) • ILCC: Number of distinct code offsets targeted by jump/branch IL instructions. Language independent. • ILCC is generally larger than CC. • ILCC( if ) = 1 • ILCC( for ) = 2 • ILCC( foreach ) = 3 • ILCC > 20 are hard to understand, ILCC > 40 are extremely complex and should be split into smaller methods (unless generated code) Presented By : Moutasm Tamimi , 2018
  • 28. Speaker Information  Moutasm tamimi  Masters of Software Engineering  Independent Consultant , IT Researcher.  CEO at ITG7.com , IT-CRG.com  Email: tamimi@itg7.com Click Here Click HereI T G 7 Click Here Click HereIT-CRG