Agile and CMMI - a potential blend
-
Upload
mosesraj-r -
Category
Technology
-
view
214 -
download
0
description
Transcript of Agile and CMMI - a potential blend
1
Agile with CMMi - A potent blend…
Mosesraj RCollabera Solutions
Bangalore
CMMI & Agile
2
Engineering Practice Requirements
Management
Practice
Requirements
Quantitative
Improvement
y = f(xn)
Level 2/3
Level 4/5
Principles
Practices
Retrosp
ective
Manifesto
SCRUM/XP
Organization focus
Project level focus
3
Fundamental challenge - measurability
Pe
op
le
P r o c e s sE n g i n e e r i n g
4
Genrich Altshuller scanned 400,000 patent descriptions, and found that only 2% were really new. This means, 98% of all new problems can be solved using previous experience/learning(s).
5
JIDOKA
AUTONOMATION
6
Requirement changesIss
ues
Defects
Requirementsstructure
Test caseadequacyCode
structure
Arch
itect
ural
Robu
stne
ss
Coup
ling
&
cohe
sion
Structural application profile
“ . . . .Yo u r h a n d s c a n ’ t
h i t w h a t yo u r e ye s
c a n ’ t s e e … . .”
M u h a m m a d A l i
7
Requirements
Architecture
Design &
Coding
Unit Testing
System /Functio
nal Testing
Requirements & Architecture
Baseline
Continuous Integration & Iteration Releases
T y p i c a l L i f e c y c l e i n C o l l a b e r a
8
9
10
Can ‘defect prone’ tendency be isolated?
• A study on eclipse (published in PROMISE 2007)– Defects are mapped to less than 15% of files
• Study on Firefox– Security issues are mapped a low % of code
(predominantly java script interpreter)• Publication from CAST– In a US based bank around 30% defects in tests
are attributed to identifiable poor code structures
11
Cyclomatic complexity
%Branch Statements
Depth of InheritanceCalls/method
Methods / Class
Class Coupling
Maintainability Index Boolean Expression
complexity
Class Data Abstraction coupling
Class Fan Out Complexity
Npath Complexity
Java NCSS
% comment Lines Density of comment linesPublic undocumented API
Duplicated lines
Duplicated blocks
Number of children
Afferent couplings
Lack of cohesion methods
Package dependencies to cut
Violations
Complexity distribution by method
Complexity distribution by class
File dependencies to cut
The problem of plenty…
II
B r i d g i n g t h e e a g l e ’ s e y e a n d w o r m ’ s v i e w Slide 12
% Branches Block Depth
Cyclomatic Complexity
Correlating SIT with engineering metrics
% Branches Block Depth
Max Cyclomatic Complexity
12
Influence of complexity attribute
Composite parameter analysis
92%
4%2% 1%1%
Number of Class vs SIT defects
8% of classes is contributing to 100% of SIT defects
Study from European university
Key parameters measured Cyclomatic complexity/LOC No. of methods/class No. of Calls/method LOC/method
13
Toxicity Analysis
14
Detailed study of the data shows most of the SIT & AT defects are occurring amongst the top four Java classes shown in the sample data above which have highly toxic code with high method length
Correlates to AT & SIT defects
15
2.3.10.1
2.3.9.22.3.6.2
2.3.53.2
2.3.52.2
2.3.5.22.3.4.22.3.36.2
2.3.35.2
2.3.34.2
2.3.33.2
2.3.32.22.3.30.22.3.20.22.3.19.2
2.3.10.2
2.3.7.2
2.3.50.2
2.3.49.2
2.3.20.2
2.3.13.22.3.44.22.3.43.22.3.42.22.3.41.2
2.3.40.2
2.3.39.2
2.3.38.2
2.3.37.2
2.3.11.2
2.3.12.2
2.3.27.2
2.3.2.2
2.3.1.2
2.3.48.2
2.3.47.2
2.3.46.2
2.3.45.2
2.3.26.2
2.3.25.2
2.3.23.2
2.3.22.2
2.3.18.2
2.3.17.2
2.3.16.2
2.3.15.2
UC complexity v/s cyclomatic complexity
16
See code akin to a city map...
Developer’s Structural Analysis Kit
17
Parameters
• Max /Avg. Cyclomatic Complexity
• Methods Per Class• Avg Statements Per Method• % Branch statements• Max Block Depth• Cyclomatic complexity• No. of Calls/method• LOC/method• LOC/Program • Fan out• Data abstraction coupling
Tools
• Source monitor• PMD• Checkstyle• iPlasma & Code city• Sonar
Process
• Integration to build tools• Prior to code review• Analysis before release
Shifting to the better – Project level
18
19
Shifting to the better – Org level
Max Code Complexity
Methods per Class
Statement per Method
Branches % Max Block Depth
0
2
4
6
8
10
12
14
16
18
Dec-10Dec-11
20
Improved Pre-SIT Detection
Dec-09 Dec-11 Till Date
Shift in defect distribution
Requirements & Design review
Code Review Unit Test System Test Post Release
Pre Post
21
22
Customer Satisfaction
Engage
ment Plan
ning
Engage
ment Exe
cution
Engage
ment Resu
lts
People
Overall Engagement Level View
Overall 2010
23
Qualitative Benefits• Objective measures; language of developer
• Improve ability to isolate and deal with the defective ones
• Improved risk management and transparency