The SQALE method: Meaningful insights into your Technical … · The SQALE method: Meaningful...

42
The SQALE method: Meaningful insights into your Technical Debt Jean-Louis Letouzey 2012

Transcript of The SQALE method: Meaningful insights into your Technical … · The SQALE method: Meaningful...

The SQALE method: Meaningful insights into your Technical Debt

Jean-Louis Letouzey

2012

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 Techical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

2

Quality

Quality is:compliance to requirement

Before measuring Quality, you first need to define it

At project level or

Organization level

© inspearit 3

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…

© inspearit 4

Technical Debt

© inspearit

A strong communication tool

Definition may differ from experts

Product – Process

Voluntary – involuntary

Short term – Long term

A specificity: Technical Debt disappears at the end of the Software’s life

What realy matters is the nature and duration of the interests

One reference book:

5

Technical Debt and Agility

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

Agile promotes transparency

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

Technical Debt shall be identified and monitored

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

© inspearit 6

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 Techical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

7

The SQALE method

8© inspearit

Public under an open source licence

GenericTool independant

Language independant

Development Process independant

Widely used

RemediationcostsTable

d. / h. / $ ….

3 9

1

6

2

4

1

The SQALE method is simple

SourceCode

Analysis Tools

« Right Code »

Source code related

requirements

1 Quality Model Indicators43 Indices

9© inspearit

ΣTechnical

Debt

d. / h. / $ ….

Findings Table

1 3

5

2

6

1

1

Rem

ediation functions

2 Analysis Model

The SQALE method is simple

SourceCode

Analysis tools

« Right Code »

Source code related

requirementsFindings

Table

1 3

5

1 Quality Model 2 Analysis Model

RemediationcostsTable

d. / h. / $ ….

3 9

1

Rem

ediation functions

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

10© inspearit

6

1

1

2

4

1

2 6

EA

Σ

Indicators43 Indices

d. / h. / $ ….

Ordered Requirements

Reuse

Maintain

Deliver

Evolve

Test

Code

Testability

Reliability

Changeability

Efficiency

Maintainability

Reusability

Security

Portability

TestabilityTestability

ReliabilityReliability

ChangeabilityChangeability

EfficiencyEfficiency

SecuritySecurity

MaintainabilityMaintainability

PortabilityPortability

ReusabilityReusability

Characteristics

« Right Code »

Source code related

requirements

Upon their relative importance (low, … , blocking)

Upon Life Cycle activities

© inspearit 11

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

Any type of requirements

Any type of code related requirements are accepted, provided they are justified and verifiable

12

Copy and Paste,Method’s structure

Potential errors due to: logic, exception handling …

High coupling, Wrong dependencies, harcodedconstants …

Useless codeoptimizable codePresentation, Namming

Unstructurness

It is possible to remove characteristics

Generaly, depending on project or organization’s con text, a SQALE Quality model contains between 40 and 100 req uirements

TestabilityTestability

ReliabilityReliability

ChangeabilityChangeability

EfficiencyEfficiency

MaintainabilityMaintainability

The SQALE Pyramid: 2 points of view

© inspearit 13

TestabilityTestability

ReliabilityReliability

ChangeabilityChangeability

EfficiencyEfficiency

MaintainabilityMaintainability

An analytic view providedby orthogonal characteristicsOne understands impact of each Non Conformityand improvement on quality characteristic and life cycle issues.

Σ

Σ

Σ

An external view thatrepresents the percieved

quality evaluated by consolidation of the

hierarchy of characteristics

Σ

The SQALE rating

14

E

Technic

alD

ebt

AB

CD

Devlo

pm

ent

Cost

© inspearit

A synthetic indicator dedicated to management dashboards

Based on the ration between the Technical Debt and the development cost

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 Techical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

15

The Non-remediation Cost

© inspearit-2012 16

To fix non « right code » has an impact on the technical activities and an associated remediation cost: The Technical Debt

To keep and deliver non « right code » has an impact on the business activities and an associated non-remediation cost: The Business Impact

In SQALE this Business impact is estimated/quantified to help the analysis and the prioritization of remediation activities

The Non-remediation functions

© inspearit-2012 17

Non-remediationcostsTable

d. / h. / $ ….

100

1

6

10

« Right Code »

Source code related

requirements

1 Quality Model Indicators43 Indices

ΣBusiness

Impact

d. / h. / $ ….

Findings Table

1

5

6

1

Non

-remediation functions

2 Analysis Model

A Non-remediation function is associated to each requirement to represent its relative « importance »

The SQALE Debt Map

© inspearit-2012 18

An analysis indicator valid at all artefact level

Non-r

em

edia

tion

Cost

Remediation Cost

Busin

ess I

mpact - File

- Component- Application

Technical Debt

Managing upon agile principles

Priorities are established upon the « Value/Price » ratio

© inspearit 19

Features

TechnicalPerspective

BusinessPerspective

Development Cost Business Value

Priorities/Decision

Features List

����

����

����

����

����

����

Non-Conformities

TechnicalPerspective

BusinessPerspective

Technical Debt Business Impact

Priorities/Decision

N.C. List

����

����

����

����

����

����

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 Techical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

20

Managing your Technical Debt

SQALE Indices &indicators

SQALE

Quality Model

Analysis Model

SQI

Identify your Technical Debt

Define what produce debt

Define your debt estimation model

Calculate your debt

Analyze your debt (upon its origin, impact, age…)

Pay your debt back with an optimizedplan

For new agile project

For agile project with a « legacy » part

© inspearit 21

Analyze 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

édia

tions

© inspearit 22

Analyze your Technique Debt

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

© inspearit 23

Which code is more « agile »?

© inspearit 24

Deliver with a residual debt

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

ech

nic

alD

eb

t

Time

© inspearit 25

AcceptableLevel

Deliver with a residual debt

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

ech

nic

alD

eb

t

Time

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

Severity

Residual Technical Debt

© inspearit 26

AcceptableLevel

Analyze your Technical Debt

The business perspective upon « Severity », « Importance »

© inspearit 27

Optimize your remediation budget

© inspearit-2012 28

Use the impact/cost ratio

Non-r

em

edia

tion

Cost

Remediation Cost

Busin

ess I

mpact

Technical Debt

Dealing with « Legacy » code

Technical Debt is offen too hight to be resorbed

Several strategies:

Limit the global growth of the debt (i.e.: <2%)

Resorb the debt related to blocking or critical (the violations associated to high Non-Remediation Costs

« The boy scout rule »: we should leave the code cleaner than we found it.….

Identify your strategic applications and plan specific budget and ressources for cleaning up part of the debt and decrease the future « interest »

© inspearit 29

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 Techical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

30

The need for a new paradigm

Source code measurement project have difficulties when deployed on a large perimeter

An SEI report states a high failure ration

80% of projets are stopped before 24 months

© inspearit 31

Let’s try to identify some causes…

Formulas

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.

© inspearit 32

Dashboards

© inspearit 33

Aggregations

© inspearit 34

On the opposite, Technical Debt is simple

Findings Quotation

© inspearit 35

A simple but powerfull paradigm

© inspearit-2012 36

• Simple calculation

• Simple aggregation

• Objectivity

• Wide public

• Few false positive

• Representativity

• Clear rating rule

• Comparisons

• Remediation priorities

• Analysis perspectives

Technical Debt

SQALE method

Balance

New Past

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 Techical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

37

SQALE deployment

1 Initialization 2 Tailoring Deployment43 Pilot

PlanificationStakeholdersPerimeter…

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 population38

The SQALE method: Summary

39

Easy to understand and to deploy

A strong and powerfull implementation of the Technical Debt concept

Open source and tool independant

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

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 Techical Debt with SQALE

A powerful paradigm shift

How to deploy/use the SQALE method

Demonstration

40

Topics to cover during demo (15 mn)

© inspearit-2012 41

Sonar architecture and eco-system

Setting a SQALE Quality Model (= Sonar profile)

Setting the SQALE Sonar pluginMapping requirements to characteristics and subchars

Setting the Remediation Functions

Setting the Rating threshold

Setting Non-Remediation factors

Using SQALE Dasboards and indicatorsBuilding a dashboard

Analyzing the Technical Debt and Business Impact

Navigation down to the source code

Other featuresTechnical debt history

Treemap for portfolio management

Thanks

Questions?

42

just sqale it

http: /www.sqale.org

[email protected]© inspearit