itake unconference - holding down your technical debt with sonarqube

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

Upload: patroklos-papapetrou

Post on 07-Aug-2015

401 views

Category:

Software


1 download

TRANSCRIPT

Patroklos Papapetrou @ppapapetrou76

Holding down your technical debt with

#itakeunconf #SonarQube

Agenda

● Code Quality in a nutshell

● The seven axes of quality

● Technical Debt

● SonarQube Demo Time

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()); }

What is code quality?

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()); }

What is code quality?

“It’s an indicator about how quickly

developers can add business value to a

software system”

Why measure?

Source code is the heart of every system

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

maintain “legacy” systems.

The broken window theory

What we should measure;

● Abstract numbers? (Almost) useless

● Evolution through time? Definitely!

● Metrics? Yes but which ones?

● Welcome to the seven axes of quality

The seven axes of quality

The seven axes of quality

Design

Duplications

Documentation

Com

plexity

Un

it T

ests

Coding rules

Po

tential B

ug

sTechnical Debt

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)

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)

This is how the source code looks like when we

don't pay off technical debt

SonarQube star FeaturesDashboards

SonarQube star FeaturesHistorical Data

SonarQube star FeaturesDifferential Views

SonarQube star FeaturesComponents drilldown views

SonarQube star FeaturesQuality Gates

DEMO TIME

The big pictureTrack and reduce Technical Debt on an

ongoing basis. (Clean up kitchen every day)

The big pictureEngage all devs from day #1

(Not only mums wash the dishes )

I have a dream…

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

Thank you

ppapapetrou76

@ppapapetrou76

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

1