technical debt:technical debt: assessment and reduction · 2019-12-16 · typyp gical stakeholders...

44
Technical Debt: Technical Debt: Assessment and Reduction Israel Gat Agile 2011 Salt Lake City, UT August 8, 2011

Upload: others

Post on 06-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Technical Debt:Technical Debt:Assessment and Reduction

Israel Gat

Agile 2011Salt Lake City, UTy,August 8, 2011

Page 2: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Agenda Part I: Technical Debt in the Overall Context of the Software

Process

Part II: What Really is Technical Debt?

Part III : Case Study – NotMyCompany, Inc.y y p y,

Part IV: The Tricky Nature of Technical Debt

Part V: Unified Governance

Part VI: Process Control Models

Part VII: Reducing Technical Debt

Part VIII: Takeaways

© Cutter Consortium

Part VIII: Takeaways

2

Page 3: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part I:Technical Debt in theTechnical Debt in the Overall Context of the Software Process

• A Holistic Model of the Software Process• Two Aspects of Output• Three Aspects of Technical Debt• Six Aspects of Software

Page 4: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

A Holistic Model of the Software Process

Process

Output

Outcome

Output

Outcome

© Cutter Consortium 4

Page 5: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Two Aspects of Outputp p

ProcessProductivity

OutputQ lit

Outcome

OutputQuality

Outcome

© Cutter Consortium 5

Page 6: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Three Aspects of Technical Debtp

ProcessProductivity

OutputTechnicalD bt

Outcome

OutputDebt

OutcomeAssessment Prevention

© Cutter Consortium 6

Reduction

Page 7: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Six Aspects of Softwarep

Portfolio Governance

Product Planning

Release Management

Project Management

Release Management

Iteration Management

© Cutter Consortium 7

Technical Practices

Page 8: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part II: Wh t R ll i T h i l D bt?What Really is Technical Debt?• What’s in a Metaphor?• Code Analysis• Time is Money

Moneti ing Technical Debt• Monetizing Technical Debt• Typical Stakeholder Dialog Around Technical Debt• Analysis of the Cassandra Codey• Project Dashboard

Page 9: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

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

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

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”)

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

© Cutter Consortium

g• Documentation

9

Page 10: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Code Analysisy 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, y p

Code Analysis

Quality Deficits

Time to Fix per DeficitTime to Fix per Deficit

Aggregate time to Fix

© Cutter Consortium 10

Aggregate $$ to Fix

Page 11: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Time is Moneyy Think of the amount of money the borrowed time represents –

the $$ grand total required to eliminate all issues found in the code

© Cutter Consortium 11

Page 12: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Example I: Monetized Technical Debtp Accrued technical debt in the amount of $500K

O 200K li f d On 200K lines of code

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

© Cutter Consortium 12

Page 13: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Typical Stakeholders Dialog Around Technical Debtyp g “Technical debt of $500K over 200K lines of code”

“60% f th d bt i d t l k f it t t ” “60% of the debt is due to lack of unit test coverage”

“‘Pay back’ 70% of unit test coverage debt prior to shipping the software”software”

“Other kinds of debt will be paid back during the first year after release”release

“Rule violation will be the #1 priority during the period after release”

“Once we reach technical debt level of $100K we will shift back resources from technical debt reduction to feature development”

© Cutter Consortium 13

Page 14: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Example II: Analysis of the Cassandra Codep y

© Cutter Consortium 14

Since the 0.4.0 release both Complexity (per class) and Technical Debt have increased.

Page 15: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Example III: Project Dashboardp j

© Cutter Consortium 15Source: Chris Sterling

Page 16: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part III: Case Study –yNotMyCompany, Inc.

• NotMyCompany Highlights• Modernizing Legacy Code• Error Proneness

Page 17: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

NotMyCompany Highlightsy p y g g Hosted eCommerce platform for small retailers:

• One stop shoppingp pp g• White-glove service• Three nines availability• Business as a service (warehousing distribution)• Business as a service (warehousing, distribution)

Challenges:• Legacy code – 200KLOC - $500K technical debt• Legacy code – 200KLOC - $500K technical debt

• Expansion – the SoftwareAreUs acquisition• The software process control debate

© Cutter Consortium

• Agile vis-avis ITIL

17

Page 18: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

NotMyCompany Highlights (Cont’d)y p y g g ( )• Expansion – Acquisition of SocialAreUS• How Often Should the Line be Stopped?• Agile Versus ITIL

© Cutter Consortium 18

Page 19: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Exercise #1 – Modernizing L C dLegacy Code

© Cutter Consortium 19

Page 20: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Exercise – Modernizing Legacy Codeg g y Read the NotMyCompany case study through the section entitled

Exercise #1 in the handout

Discuss the following questions in your table/group:1. Does the strategy summarized in the slide “Typical Stakeholders Dialog” make

sense as a debt reduction strategy?sense as a debt reduction strategy?2. Which best practices would you recommend for implementing this strategy?3. What would be a compelling argument for adopting a ‘Reduce Complexity

First’ strategy?gy

Report back

Ti ll ti 40 i t Time allocation – 40 minutes: • 30 minutes for reading the case study and group discussion• 10 minutes for group reports

© Cutter Consortium 20

Page 21: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Continue Reading Only After Reporting Back on the Exercise

© Cutter Consortium 21

Page 22: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Answer to Question #3 in Exercise #1 Cyclomatic complexity in excess of ~30 per file for a significant

number of Java files

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

© Cutter Consortium 22

Page 23: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part IV: The Tricky Nature of T h i l D btTechnical Debt• The Explicit Form of Technical Debt• The Implicit Form of Technical Debt• The Strategic Impact of Technical Debt

No Good Strateg Follo ing Prolonged Neglect• No Good Strategy Following Prolonged Neglect

Page 24: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

The Explicit Form of Technical Debtp Resource allocation decisions:

• “Functional testing is good enough for us… no need to waste precious g g g presources to do unit testing…”

[Confession of a VP of development with numerous Cyclomatic complexity readings in the hundreds…]

© Cutter Consortium 24

Page 25: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

The Implicit Form of Technical Debtp Implicit forms – in the nature of things:

• Relentless function/feature pressure leads to taking technical debt and p gneglecting measures to keep software decay in check

© Cutter Consortium 25

Page 26: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

The Vicious Cycle of Technical Debty

(More) Relentless Pressure

Take Technical

D btDiminished

Dev Velocity DebtDev Velocity

Fail to Pay Debt Back

Technical Debt

A Debt Back

Neglect Maintenance

Accrues

© Cutter Consortium 26

Maintenance

Page 27: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

The Strategic Effect of Technical Debtg

© Cutter Consortium 27

Page 28: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

No Good Strategy Following Prolonged Neglectgy g g g “Indeed, the economic value of lagging applications is questionable

after about three to five years. The degradation of initial structure and the increasing difficulty of making updates without ‘bad fixes’ tends towards negative returns on investment (ROI) within a few years.”

© Cutter Consortium 28

Page 29: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part V: Unified GovernancePart V: Unified Governance• How We View Success• Three Core Metrics• Productivity, Affordability, Risk• What is the Real ROI?

Page 30: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

How We View Success: An Agile Approach to g ppGovernance

© Cutter Consortium 30 Jim Highsmith

Page 31: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Three Core Metrics

ValueN t P t V l (NPV) $$Net Present Value (NPV) - $$

ConstraintsQualityCost - $$Technical Debt - $$

© Cutter Consortium 31 Israel Gat

Page 32: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Productivity, Affordability, Risky, y, Long-term productivity: Cost > Technical Debt

L t ff d bilit V l C t T h i l D bt Long-term affordability: Value >> Cost + Technical Debt

Unifying equation: Value >> Cost > Technical Debt

Risk: Imbalance(s) between the three core metrics

Value

Net Present Value (NPV) - $$

ConstraintsQuality

© Cutter Consortium 32

Constraints

Cost - $$Quality

Technical Debt - $$ Israel Gat

Page 33: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

What is the Real ROI?

Is your rate of return on investment 900% or is it actually 233%?!

Expected Final Value of Investment - $10M

Cost - $1MTechnical Debt - $2M

© Cutter Consortium 33

Page 34: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part VI: Process Control ModelsPart VI: Process Control Models• A Typical Technical Debt Pattern• Process Control View of Scrum• Integration of Technical Debt in the Agile Process• Using Statistical Process Control Methods

Page 35: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

A Typical Technical Debt Patternyp

$$NPVNPV

Key:Z1=Get Well ZoneZ2 St bili ti Z

C

Z2=Stabilization ZoneZ3=Pay Off Zone

Z1 Z2 Z3

C

Z1

TimeTD

© Cutter Consortium 35

T1 T2 T3

Israel Gat

Page 36: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Process Control View of Scrum

© Cutter Consortium 36

Source: Agile Software Development with Scrum

Page 37: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Integration of Technical Debt in the Agile Processg g

© Cutter Consortium 37

Page 38: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Using Statistical Process Control Methodsg Use Statistical Process Control methods on Technical Debt samples

• In the example below, Cyclomatic Complexity per Java Class can be p y p y pused as the Quality Characteristic

© Cutter Consortium 38

Source: Wikipedia

Page 39: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part VII: Reducing Technical DebtDebt• A Framework for Thinking about and Acting on Technical Debt Issues• Portfolio Governance

Page 40: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

A Framework for the Technical Debt Initiative To become actionable, follow the technical debt assessment with a

technical debt reduction initiative:• SWAT team• Evangelism• Agile methodsAgile methods• Technical debt items as an integral part of the product backlog of

every team:– If you are starting the technical debt initiative amidst converting to Agile introduceIf you are starting the technical debt initiative amidst converting to Agile, introduce

technical debt as part of the conversion to Agile

• Governance of the Technical Debt Initiative as a strategic investment theme

© Cutter Consortium 40

Page 41: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Portfolio Governance Intentionality through Technical Debt as a Strategic Investment

Theme

Sample Strategic AllocationsN M k tNew Markets

Strategic CustomersCustomersTechnical Debt

Maintenance

Sales OpportunitiesT ti T l

© Cutter Consortium 41

Testing Tools

Page 42: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Part VIII: TakeawayPart VIII: Takeaway• Nine Simple Takeaway• Connecting the dots

Page 43: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Nine Simple Takeawaysp y Technical debt shifts the emphasis in software development from

proficiency of the software process to the output of the process

It enables moving on and up from Random Checks to Continuous Inspection of the code

It changes the playing fields from qualitative assessment to quantitative measurement of the quality of software

It is an effective antidote to the relentless function/feature pressure

It is applicable to any amount of code It is applicable to any amount of code

It can be applied at any point in time in the software life-cycle

© Cutter Consortium

It can be used with any software method, not “just” Agile

43

Page 44: Technical Debt:Technical Debt: Assessment and Reduction · 2019-12-16 · Typyp gical Stakeholders Dialog Around Technical Debt “Technical debt of $500K over 200K lines of code”

Nine Simple Takeaways (Cont’d)p y ( ) It enables effective governance of the software process

It bl ff ti f th d t tf li It enables effective governance of the product portfolio

© Cutter Consortium 44