Top Banner
Patroklos Papapetrou @ppapapetrou76 Holding down your technical debt with #itakeunconf #SonarQube
27

Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Aug 06, 2015

Download

Software

Mozaic Works
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Patroklos Papapetrou @ppapapetrou76

Holding down your technical debt with

#itakeunconf #SonarQube

Page 2: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Agenda

● Code Quality in a nutshell

● The seven axes of quality

● Technical Debt

● SonarQube Demo Time

Page 3: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

private String _ugly_name; private String ANOTHER_$UGLY___NAME; private static String am_i_static;

public void please_work(ArrayList objects){ for (Object object : objects){ if (object == null){ String toString = object.toString(); } else am_i_static = object.toString(); doSomething(object); } } private void doSomething(Object object) throws NullPointerException { throw new NullPointerException(object.toString()); }

Page 4: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

What is code quality?

Page 5: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

private String _ugly_name; private String ANOTHER_$UGLY___NAME; private static String am_i_static;

public void please_work(ArrayList objects){ for (Object object : objects){ if (object == null){ String toString = object.toString(); } else am_i_static = object.toString(); doSomething(object); } } private void doSomething(Object object) throws NullPointerException { throw new NullPointerException(object.toString()); }

Page 6: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

What is code quality?

“It’s an indicator about how quickly

developers can add business value to a

software system”

Page 7: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Why measure?

Source code is the heart of every system

Page 8: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Why measure?Developers don't write “new” software. They

maintain “legacy” systems.

Page 9: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

The broken window theory

Page 10: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

What we should measure;

● Abstract numbers? (Almost) useless

● Evolution through time? Definitely!

● Metrics? Yes but which ones?

● Welcome to the seven axes of quality

Page 11: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

The seven axes of quality

Page 12: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015
Page 13: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

The seven axes of quality

Design

Duplications

Documentation

Com

plexity

Un

it T

ests

Coding rules

Po

tential B

ug

sTechnical Debt

Page 14: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Technical Debt

“If the debt grows large enough, eventually the company will spend more on servicing its debt than it invests in increasing

the value of its other assets”

Steve McConnell(Author of code complete)

Page 15: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Technical Debt – My take

“Technical debt for software systems what salt is for cooking. You need it, you can't see it but if you don't control

it it's too late”

Patroklos Papapetrou(Yet another software gardener)

Page 16: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

This is how the source code looks like when we

don't pay off technical debt

Page 17: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015
Page 18: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

SonarQube star FeaturesDashboards

Page 19: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

SonarQube star FeaturesHistorical Data

Page 20: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

SonarQube star FeaturesDifferential Views

Page 21: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

SonarQube star FeaturesComponents drilldown views

Page 22: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

SonarQube star FeaturesQuality Gates

Page 23: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

DEMO TIME

Page 24: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

The big pictureTrack and reduce Technical Debt on an

ongoing basis. (Clean up kitchen every day)

Page 25: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

The big pictureEngage all devs from day #1

(Not only mums wash the dishes )

Page 26: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

I have a dream…

...that one day code quality management will be as much as important and essential is today source code management

Page 27: Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T.A.K.E. Unconference 2015

Thank you

ppapapetrou76

@ppapapetrou76

http://www.linkedin.com/in/ppapapetrou

1