Presented at SAM 2015 (2nd International Workshop on Software Architecture and Metrics): http://www.sei.cmu.edu/community/sam2015/speakers/
Nowadays we have tools that compute a myriad of metrics and throw at us thousands of warnings. Managers are gazing ecstatically at complex dashboards full of complex and vividly colored charts and trend lines. Sophisticated "technical debt calculators" are converting, with great boldness, internal quality issues to scary financial figures. With such an impressive arsenal of methodologies, techniques, and tools, software projects should be under full control. Except they are not! Often, metrics leave us clueless on how to improve the quality of our software; even worse, following blindly the goal of fixing some metric values usually leads to a degradation of a system's quality. In this talk, I will share some of the practical lessons learned on how to use software metrics to actually improve a system's design. I will also discuss the need to find new ways of correlating the various sources of information about a project, in order to move from raw data to insightful knowledge that can lead to real improvement actions.
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Measuring Software: From Data to Actionable Knowledge
1. Measuring Software:
From Data to Actionable Knowledge
16 May 2015
International Workshop on Software Architecture and Metrics
Radu Marinescu
radumarinescu@me.com
@radu_marinescu
2.
3. ogo
lori
Culoare pentru o institu]ie unic - clar, curat, u[or de recunoscut - culoarea
este elementul cel mai u[or de recunoscut, albastru indigo reflect personalitatea
institu]ieide<nv]m>ntsuperiortehnic-ferm,puternic,darintrospectiv,valorizator.
Este o combina]ie de albastru [i ro[u, <n care dominant este albastrul cu atributele
sale introspective. Griul neutru pune <n valoare albastrul, accentu>nd valorile sale.
4. ogo
ulori
Culoare pentru o institu]ie unic - clar, curat, u[or de recunoscut - culoarea
este elementul cel mai u[or de recunoscut, albastru indigo reflect personalitatea
institu]ieide<nv]m>ntsuperiortehnic-ferm,puternic,darintrospectiv,valorizator.
Este o combina]ie de albastru [i ro[u, <n care dominant este albastrul cu atributele
sale introspective. Griul neutru pune <n valoare albastrul, accentu>nd valorile sale.
5. Logo
culori
Culoare pentru o institu]ie unic - clar, curat, u[or de recunoscut - culoarea
este elementul cel mai u[or de recunoscut, albastru indigo reflect personalitatea
institu]ieide<nv]m>ntsuperiortehnic-ferm,puternic,darintrospectiv,valorizator.
Este o combina]ie de albastru [i ro[u, <n care dominant este albastrul cu atributele
sale introspective. Griul neutru pune <n valoare albastrul, accentu>nd valorile sale.
6. Logo
culori
Culoare pentru o institu]ie unic - clar, curat, u[or de recunoscut - culoarea
este elementul cel mai u[or de recunoscut, albastru indigo reflect personalitatea
institu]ieide<nv]m>ntsuperiortehnic-ferm,puternic,darintrospectiv,valorizator.
Este o combina]ie de albastru [i ro[u, <n care dominant este albastrul cu atributele
sale introspective. Griul neutru pune <n valoare albastrul, accentu>nd valorile sale.
7. Michele Lanza
Radu Marinescu
Object-Oriented
Metrics
in Practice
Using Software Metrics to
Characterize, Evaluate, and Improve
the Design of Object-Oriented Systems
Foreword by Stéphane Ducasse
1 3
1000+reprinted2010/2015
MIPICSME’14
84. Most maintenance effort goes into
understanding
messy code
47%
19%
6%
28%
Testing Documenting
Coding Understanding
M. Ben-Menachem and G. S. Marliss. Software quality: Producing practical, consistent software. International Thomson Computer Press, 1997
104. public class TarHeader{
/**
* The entry's name.
*/
public StringBuffer name;
/**
* The entry's permission mode.
*/
public int mode;
/**
* The entry's user id.
*/
public int userId;
/**
* The entry's group id.
*/
public int groupId;
}
105. public
/**
* The entry's name.
*/
/**
* The entry's permission mode.
*/
int
/**
* The entry's user id.
*/
/**
* The entry's group id.
*/
int
}
public
public
public
public
106. public
/**
* The entry's name.
*/
/**
* The entry's permission mode.
*/
int
/**
* The entry's user id.
*/
/**
* The entry's group id.
*/
int
}
public
public
public
public
Data
Class
107. public
/**
* The entry's name.
*/
/**
* The entry's permission mode.
*/
/**
* The entry's user id.
*/
/**
* The entry's group id.
*/
int
}
108. public
/**
* The entry's name.
*/
/**
* The entry's permission mode.
*/
/**
* The entry's user id.
*/
/**
* The entry's group id.
*/
int
}
private
private
private
private
109. public
/**
* The entry's name.
*/
/**
* The entry's permission mode.
*/
/**
* The entry's user id.
*/
/**
* The entry's group id.
*/
int
}
private
private
private
private
Encapsulate public data
(in TarHeader)1
125. vs.
Extract method
(out of the duplicated code)1
Move the newly created method
(in TarHeader)2
Encapsulate public data
(in TarHeader)3
Move data
(TarHeader > TarEntry)1
Encapsulate public data
(in TarEntry)2
126. vs.
Which solution is best?
Extract method
(out of the duplicated code)1
Move the newly created method
(in TarHeader)2
Encapsulate public data
(in TarHeader)3
Move data
(TarHeader > TarEntry)1
Encapsulate public data
(in TarEntry)2
130. Lorenz, Kidd, 1994
Chidamber, Kemerer, 1994
LOC - number of lines of code
CYCLO - cyclomatic complexity of a function
NOF - number of functions
FANOUT - outgoing coupling
NOA - number of attributes
DIT - depth of inheritance tree
TCC - tight class cohesion
…
143. ATFD > FEW
Class uses directly more than a
few attributes of other classes
WMC ≥ VERY HIGH
Functional complexity of the
class is very high
TCC < ONE THIRD
Class cohesion is low
AND GodClass
from M.Lanza, R.Marinescu - Object-Oriented Metrics in Prac
165. “ ”
A single arrow is easily broken, but not ten in a bundle.
Japanese proverb
166. Measuring Software:
From Data to Actionable Knowledge
16 May 2015
International Workshop on Software Architecture and Metrics
Radu Marinescu
radumarinescu@me.com
@radu_marinescu