12
Technical Debt Sonar Analysis John Heintz [email protected] [email protected] Senior Consultant, Cutter Consortium President, Gist Labs Israel Gat [email protected] Director of Agile Practice, Cutter Consortium

Technical Debt Sonar Analysis - Austin Java Users … · Technical Debt Sonar Analysis John Heintz [email protected] [email protected] Senior Consultant, Cutter Consortium President,

Embed Size (px)

Citation preview

Technical Debt Sonar Analysis John Heintz [email protected] [email protected] Senior Consultant, Cutter Consortium President, Gist Labs Israel Gat [email protected] Director of Agile Practice, Cutter Consortium

© Cutter Consortium

About John Heintz n  Developer since 1995

n  Agilist since 1999

n  Founded Gist Labs in 2008

n  Also with Cutter Consortium

n  Developer, Mentor, Consultant

n  Intuitive, Abstract, Precise

2

Kool-Aids I’ve drank:

Agile/Lean/Kanban, OO, TDD, REST, Mentoring, Craftsmanship, Emergent/Progressive Design, InnovationGames®, Systems and Complexity Theory

What Really is Technical Debt? •  What’s in a Metaphor? •  Why Worry? •  Code Analysis •  Monetized Technical Debt •  Sonar Project Dashboard

© Cutter Consortium

What’s in a Metaphor? n  Ward Cunningham’s Metaphor:

•  “A little debt speeds development so long as it is paid back promptly with a rewrite”

n  Definition for today: •  “Quality issues in the code other than function/feature completeness”

–  It is about doing the system right (“Intrinsic Quality”) –  Not about doing the right system (“Extrinsic Quality”)

n  Typical technical debt components: •  Complexity •  Duplication •  Rule violations •  Test coverage •  Documentation

4

© Cutter Consortium

Why Worry About Technical Debt?

5

© Cutter Consortium

Error Prone Modules n  Cyclomatic complexity in excess of ~30 per file for a significant

number of Java files

6

(Source: http://www.enerjy.com/blog/?p=198)

© Cutter Consortium 7 7

Error Feedback Ratio

Num

ber o

f Bug

s

Time to Complete Testing

Source: Gerald Weinberg, Quality Software Management: System Thinking

EFR=0.3 EFR=0.36 EFR=0.396

© Cutter Consortium

The Strategic Effect of Technical Debt

8

© Cutter Consortium

Code Analysis n  One technical debt tends to pile over another, which piles over yet

another technical debt that piles… •  To find your current level of debt, you can’t simply add the week you

borrowed last year to the two weeks you borrowed three months ago •  Rather, you need to inspect the code

9

Code Analysis

Quality Deficits

Time to Fix per Deficit

Aggregate time to Fix

Aggregate $$ to Fix

© Cutter Consortium

Monetized Technical Debt n  Accrued technical debt in the amount of $500K

n  On 200K lines of code

n  The makeup of the debt is represented in the pie chart below

10

© Cutter Consortium

Analysis of the Cassandra Code

11

Since the 0.4.0 release both Complexity (per class) and

Technical Debt have increased.

© Cutter Consortium

Project Dashboard

12 Source: Chris Sterling