sqale meaningful insights into your technical debt

46
The SQALE method: Meaningful insights into your Technical Debt* Jean-Louis Letouzey August 2012 * The technical debt visible in your source code

Upload: drewz-lin

Post on 11-May-2015

490 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Sqale meaningful insights into your technical debt

The SQALE method: Meaningful insights into your Technical Debt*

Jean-Louis Letouzey

August 2012

* The technical debt visible in your source code

Page 2: Sqale meaningful insights into your technical debt

Presentation

© inspearit-2012 2

Jean-Louis Letouzey

Expert consultant at inspearit France

Product Audit, Technical Debt assessment

Author of the SQALE method

Preaching, Teaching SQALE

SQALE tailoring and coaching in large organizations

Page 3: Sqale meaningful insights into your technical debt

Table of Contents

Reminder on Quality and Technical Debt

Technical Debt: a powerful Paradigm Shift

The SQALE method: Structure

Analyzing Technical Debt with SQALE

Paying back Technical Debt with SQALE

Summary and Conclusion

Demonstration

3

Page 4: Sqale meaningful insights into your technical debt

Quality

Quality is:compliance to requirement

Before measuring Quality, you first need to define it

At project level or

Organization level

4

If you don’t define it, you won’t get it !

© inspearit-2012

Page 5: Sqale meaningful insights into your technical debt

Technical Debt

“Every minute spent on not-quite-rightcode counts as interest”

Ward Cunningham

at OOPSLA 92:“Shipping first time code is like going into debt. A little debt speeds development so long as it is paid back promptly with a rewrite…”

5© inspearit-2012

Page 6: Sqale meaningful insights into your technical debt

Technical Debt

A strong communication tool

Understandable by managers (fits well in Excel sheets)

Many blogs, definitions from experts

Product – Process

Voluntary – involuntary

One reference book:

6© inspearit-2012

Page 7: Sqale meaningful insights into your technical debt

Technical Debt

In a recent (2012) interview* Ward Cunningham provided some clarifications:

“We can say that the CODE is of high quality when productivity remains high in the presence of change in TEAMand GOALS.”

7

Technical debt = Work to be done = PrincipalImpact = Lost of productivity = Interest

© inspearit-2012

* www.techdebt.org

Page 8: Sqale meaningful insights into your technical debt

Technical Debt and Agility

Agile considers the source code as one major deliverable (not design model, not documentation)

The definition of « right code » should be considered for the Definition(s) of Done « DoD »

List of source code quality requirements

Type and acceptable level of Technical Debt

Agile promotes transparency

Technical Debt shall be identified and monitored

Project shall plan and prioritize activities for repaying and limiting this debt

8© inspearit-2012

Page 9: Sqale meaningful insights into your technical debt

Technical Debt and Agile Projects

9

Definition of « Right Code »Acceptable type

and level of debt

« Continuous inspection »

Monitoring TD

Part of debt to be repayed within the

sprint

© inspearit-2012

Page 10: Sqale meaningful insights into your technical debt

What Managing Technical Debt Means?

© inspearit-2012 10

To Manage TD means at least:

1. Define what creates TD

2. Define how to calculate TD

3. Set Goals at organizational or project level

4. Monitor the TD against the goals

5. Compare TD across versions, projects, subcontractors…

6. Analyze TD (age, location and impact)

7. Set Pay down goals

8. Set Pay down plan/priorities

9. …

Page 11: Sqale meaningful insights into your technical debt

Table of Content

Reminder on Quality and Technical Debt

Technical Debt: a powerful Paradigm Shift

The SQALE method: Structure

Analyzing Technical Debt with SQALE

Paying back Technical Debt with SQALE

Summary and Conclusion

Demonstration

11

Page 12: Sqale meaningful insights into your technical debt

Technical Debt: a Paradigm Shift

© inspearit-2012 12

Since the 70’s, the Software community is trying to measure « Quality » and Quality of source code

Technical debt is measuring « Non Quality »!

Measu

res

« Good Code »

« Bad Code »

« Bad Code »

« Right Code »

Measu

res

0

0

Page 13: Sqale meaningful insights into your technical debt

What is « right code »

13

« Right code » is not « perfect code »

Perfect Code

No formal definition of « perfect code »

« Right code » area

« Not right code » area

As soon as one attribute is in the unacceptable area (i.e. potentially decreasing productivity), the code is « not right »

Att

rib

ute

1

© inspearit-2012

Page 14: Sqale meaningful insights into your technical debt

Formulas: 5 days training!

Des formules complexesMAINTAINABILITY INDEX

MI4 = 171 - 3.42ln(aveE) - 0.23aveV(g') - 16.2ln(aveLOC) + (50 x sin(sqrt(2.46 x aveCM))

CLASS COHESION

LCOM = LCOM = ((1/a x ΣA) - m)/(1 - m)Where a is the number of attributes of the class, Σ A is the sum across the set ofattributes of the number of methods that access each attribute, and m is the number of methods of the class.

14© inspearit-2012

Page 15: Sqale meaningful insights into your technical debt

Aggregations: Averages!

15© inspearit-2012

Page 16: Sqale meaningful insights into your technical debt

TD Specificities Benefits at measure level

No masking, no false positive

Objective

Precise

Easy to understand

Aggregation by addition

Inverse direction

« Right » vs « Perfect »

Benefits from the Paradigm Shift

© inspearit-2012 16

Technical debt is a much more powerful system compared to everything used previously to measure source code

Page 17: Sqale meaningful insights into your technical debt

Table of Content

Reminder on Quality and Technical Debt

Technical Debt: a powerful Paradigm Shift

The SQALE method: Structure

Analyzing the Technical Debt with SQALE

Paying back Technical Debt with SQALE

Summary and Conclusion

Demonstration

17

Page 18: Sqale meaningful insights into your technical debt

The SQALE method: Context

Implementation/Tools

9 Fundamental Principles

4 concepts

Tailoring

Measurement theory and representativity

© inspearit-2012 18

SQALE: Software Quality Assessment based on Lifecycle Expectations

• Based on TD• Open source• Generic• Tool independant• Widely used

Definition document, articles, tools list are on sqale.org

Page 19: Sqale meaningful insights into your technical debt

SQALE Structure

SourceCode

Analysis tools

1 Quality Model 2 Analysis Models

« Right Code »Definition

Source code related

requirements

Estim

ation models

19

Findings Table

1 3

5

6

1

1

2

CostsTables

d. / h. / $ ….

3 9

1

2

4

1

6

Indicators43 Indices

SQI

STISRI…

SQID…

Testabilité Fiabilité Evolutivité Efficacité Maintenabi lité

Maintenabilité 589

Efficacité 248 248

Evolutivité 1 480 1 480 1 480

Fiabilité 548 548 548 548

Testabilité 6 535 6 535 6 535 6 535 6 535

6 535 7 083 8 563 8 811 9 400

EA

Σ

d. / h. / $ ….

Technical Debt

© inspearit-2012

Page 20: Sqale meaningful insights into your technical debt

The SQALE Quality Model: Source Code Requirements

Reuse

Maintain

Deliver

Evolve

Test

Code

Testability

Reliability

Changeability

Efficiency

Maintainability

Reusability

Security

Portability

TestabilityTestability

ReliabilityReliability

ChangeabilityChangeability

EfficiencyEfficiency

SecuritySecurity

MaintainabilityMaintainability

PortabilityPortability

ReusabilityReusability

Ordered characteristics

« Right Code »

Source code related

requirements

SQALE asks you to associate each of your expectations (requirements) with a quality characteristic

20

Requirements appear only once within the Quality Model, when they are first needed. >>> orthogonal model

Iso 25010abilities

© inspearit-2012

Page 21: Sqale meaningful insights into your technical debt

SQALE: 2 Estimation Models

21

Estimation models transform findings in costs

One for the Technical Perspective > Technical Debt

One for the Business Perspective > Business Impact

Architecture

Structure

Logic

Instruction

Presentation

Naming

« Right Code »Definition

Requirement

Remediation Cost

Depends on the type and the amount of technical activities to perform in order to remediate the violations(remediation life cycle)

These 2 derived measures are on a ratio scale and c an be added without breaching the representation clause

Vio

lations

Test Coverage

n

Non-Remediation Cost

Depends on the negative impact on the business activities. The penalty that will cover all damages that will or may happened from delivering with violations

© inspearit-2012

Page 22: Sqale meaningful insights into your technical debt

Table of Content

Reminder on Quality and Technical Debt

Technical Debt: a powerful Paradigm Shift

The SQALE method: Structure

Analyzing Technical Debt with SQALE

Paying back Technical Debt with SQALE

Summary and Conclusion

Demonstration

22

Page 23: Sqale meaningful insights into your technical debt

SQALE Structure

« Right Code »Definition

Source code related

requirements

SourceCode

Analysis tools

1 Quality Model 2 Analysis Models

Estim

ation models

23

Findings Table

1 3

5

6

1

1

2

CostsTables

d. / h. / $ ….

3 9

1

2

4

1

6

3 Indices

SQI

Σ

d. / h. / $ ….

Technical Debt

© inspearit-2012

Page 24: Sqale meaningful insights into your technical debt

What Managing Technical Debt Means?

© inspearit-2012 24

To Manage TD means at least:

1. Define what creates TD

2. Define how you calculate TD

3. Set Goals at organizational or project level

4. Monitor the TD against the goals

5. Compare TD across versions, projects, subcontractors…

6. Analyze TD (age, location and impact)

7. Set Pay down goals

8. Set Pay down plan/priorities

9. …

SQALE:

Quality ModelRemediation Function

Page 25: Sqale meaningful insights into your technical debt

Index: Technical Debt Density

© inspearit-2012 25

SQALE defines Density indicators

You divide your TD by the size of your artifact

Size may be measured in function points, KSLOC…

SQID (SQALE Quality Index Density = Technical Debt Density)

Allows to compare projects, versions, subcontractors…

Allows to set goals without knowing the size in advance

Page 26: Sqale meaningful insights into your technical debt

Indicator: The SQALE rating

26

E

Technic

al D

ebt

AB

CD

Develo

pm

ent

Cost

© inspearit

A synthetic indicator dedicated to management dashboards

Based on the ratio between the Technical Debt and the Development Cost

Page 27: Sqale meaningful insights into your technical debt

What Managing Technical Debt Means?

© inspearit-2012 27

To Manage TD means at least:

1. Define what creates TD

2. Define how you calculate TD

3. Set Goals at organizational or project level

4. Monitor the TD against the goals

5. Compare TD across versions, projects, subcontractors…

6. Analyze TD (age, location and impact)

7. Set Pay down goals

8. Set Pay down plan/priorities

9. …

SQALE:

Quality ModelRemediation Function

Index DensitiesRating

Page 28: Sqale meaningful insights into your technical debt

The SQALE Pyramid: 2 points of view

© inspearit-2012 28

TestabilityTestability

ReliabilityReliability

ChangeabilityChangeability

EfficiencyEfficiency

MaintainabilityMaintainability

An analytic view provided by orthogonal characteristicsOne understands impact of each Non-Conformity and improvement on quality characteristic and life cycle issues.

Σ

Σ

Σ

An external view that represents the perceived

quality evaluated by consolidation of the

hierarchy of characteristics

Σ

Page 29: Sqale meaningful insights into your technical debt

Analyze your Technical Debt

The SQALE Pyramid provides a technical perspective : Impacton the project’s activities

© inspearit-2012 29

Page 30: Sqale meaningful insights into your technical debt

Which code is more « agile »?

© inspearit-2012 30

Page 31: Sqale meaningful insights into your technical debt

What Managing Technical Debt Means?

© inspearit-2012 31

To Manage TD means at least:

1. Define what creates TD

2. Define how you calculate TD

3. Set Goals at organizational or project level

4. Monitor the TD against the goals

5. Compare TD across versions, projects, subcontractors…

6. Analyze TD (age, location and impact)

7. Set Pay down goals

8. Set Pay down plan/priorities

9. …

SQALE:

Quality ModelRemediation Function

Index DensitiesRating

Pyramid

Page 32: Sqale meaningful insights into your technical debt

Table of Content

Reminder on Quality and Technical Debt

Technical Debt: a powerful Paradigm Shift

The SQALE method: Structure

Analyzing Technical Debt with SQALE

Paying back Technical Debt with SQALE

Summary and Conclusion

Demonstration

32

Page 33: Sqale meaningful insights into your technical debt

The 2 ways to change code

© inspearit-2012 33

(In many cases), there are 2 ways to make a change

The « logical » way = long term view

The « quick and dirty » way = short term view

The 2 perspectives are commonly considered to prioritize features. The same logic is applicable to Non-Conformities

Features

TechnicalPerspective

BusinessPerspective

Development Cost Business Value

Priorities/Decision

Features List

����

����

����

����

����

����

Non-Conformities

TechnicalPerspective

BusinessPerspective

Technical Debt Business Impact

Priorities/Decision

N.C. List

����

����

����

����

����

����

Page 34: Sqale meaningful insights into your technical debt

Paying back your Technique Debt

The SQALE pyramid defines a logical priority for remediation actions

Reuse

Maintain

Deliver

Evolve

Test

Code

Testability

Reliability

Changeability

Efficiency

Maintainability

Reusability

Security

Portability

Rem

edia

tions

© inspearit-2012 34

Page 35: Sqale meaningful insights into your technical debt

Deliver with a residual debt

Technical Debt is permanently monitored and analyzed for identifying and performing immediate remediationsT

ech

nic

al D

eb

t

Time

© inspearit-2012 35

AcceptableLevel

Page 36: Sqale meaningful insights into your technical debt

Deliver with a residual debt

Technical Debt is permanently monitored and analyzed for identifying and performing immediate remediationsT

ech

nic

al D

eb

t

Time

Optimization phase: One need to take into account the Businessperspective in order to minimize the impact of the residual debt

Impact

Residual Technical Debt

© inspearit-2012 36

AcceptableLevel

Page 37: Sqale meaningful insights into your technical debt

Analyze your Technical Debt

The business perspective upon « Severity », « Importance »

© inspearit-2012 37

Page 38: Sqale meaningful insights into your technical debt

The SQALE Debt Map

© inspearit-2012 38

An analysis indicator valid at all artefact level

Non-r

em

edia

tion C

ost

Remediation Cost

Busin

ess I

mpact

- File- Component- Application

Technical Debt

Page 39: Sqale meaningful insights into your technical debt

Optimize your remediation budget

© inspearit-2012 39

Use the impact/cost ratio

Non-r

em

edia

tion C

ost

Remediation Cost

Busin

ess I

mpact

Technical Debt

Page 40: Sqale meaningful insights into your technical debt

Table of Content

Reminder on Quality and Technical Debt

Technical Debt: a powerful Paradigm Shift

The SQALE method: Structure

Analyzing Technical Debt with SQALE

Paying back Technical Debt with SQALE

Summary and Conclusion

Demonstration

40

Page 41: Sqale meaningful insights into your technical debt

A simple but powerful paradigm

© inspearit-2012 41

• Simple calculation

• Simple aggregation

• Objectivity

• Wide public

• Few false positives

• Representativeness

• Clear rating rule

• Comparisons

• Remediation priorities

• Analysis perspectives

Technical Debt

SQALE method

Page 42: Sqale meaningful insights into your technical debt

Paying back the TD with SQALE

© inspearit-2012 42

SQALE support 3 different strategies:

1st strategy: Follow the technical Logic (avoid useless rework)

Use the SQALE pyramid

2nd strategy: decrease the business impact by starting fixing the Non-conformities with the highest business impact

Use the SQALE Business Impact (SBI)

Use the Debt Map

3rd strategy: optimize your ROI by starting fixing the non-conformities with the highest ROI

Use the Business Impact/Remediation cost ratio

Use the Debt Map

Technical Debt

Page 43: Sqale meaningful insights into your technical debt

SQALE deployment

1 Initialization 2 Tailoring Deployment43 Pilot

Planning Stakeholders’Scope…

Method trainingTailoring the SQALEbasic models

Model ValidationBuilding a ready to deploy solution

Tools installation & integrationAwareness and Coaching sessions

A simple technical part

Setting your own SQALE models

Tool implementation and validation

A « Change management » part

Fighting against old ideas about code measurement

Addressing a large population43

Page 44: Sqale meaningful insights into your technical debt

The SQALE method: Summary

44

Easy to understand and to deploy

A strong and powerful implementation of the Technical Debt concept

Open source and tool independent

Used worldwide

Expert recognition

“In the domain of software quality evaluation, I find SQALE – Software Quality Assessment based on Life Cycle Expectations – a great tool for implementing my mantra. It interprets source code analysis in terms of what really matters in the specific client environment. In so doing, it transforms an overwhelming set of measurement data to actionable insights which are meaningful at multiple levels of the firm.”

Israel Gat, Cutter Consortium

© inspearit-2012

Page 45: Sqale meaningful insights into your technical debt

Table of Content

Reminder on Quality and Technical Debt

The SQALE method and the Technical Debt

The SQALE method and the Business Perspective

Managing your Technical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

45

Page 46: Sqale meaningful insights into your technical debt

Thanks

Questions?

46

just sqale it

http: /www.sqale.org

[email protected]© inspearit