SlideShare a Scribd company logo
Tracking and improving
software quality with
Sonar(Qube)
SonarQube and me
(Patroklos Papapetrou)
● 15 years experience in software engineering
● Agile team leader
● Active member of the SonarQube user and
development list
● SonarQube plugins contributor
● Addicted to software quality and Continuous
Inspection
● Co-author of SonarQube in Action
Overview
● Code quality (what, why and when)
● The 7 Axes of quality and the Technical Debt
● SonarQube introduction
● SonarQube to the rescue (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?
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 each system
● Developers don’t write new software. They
maintain “legacy” systems
● A system is (almost) never “finished”
● You can’t improve if you don’t measure
● Broken window theory
The broken windows theory
When you should measure?
● From project day #0
● Continuously
● Prevent vs post-actions
● Prioritize and plan
What you should measure?
● Not just abstract numbers
● Evolution through time
● Metrics?
● Welcome to the 7 deadly sins of devs
The seven axes of quality
Co

xi

e
pl
ty

Tes
t

m

ver

Co

age

The seven axes of quality

l Bugs
a
otenti

P

ation

up
D

ment

o

ati
lic

ns

Docu

Architecture & Design
Technical Debt
Co

din
g

Ru

les
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)
This is your source code
when you don’t pay your
technical debt
“Good” & “Bad” Technical Debt
How to deal with Technical Debt
What SonarQube is / does
● Free & open source “Code Quality Platform”
● Provides moment-in-time quality snapshots
● Gives trends of lagging and leading
indicators
● Tracks developers’ seven deadly sins (seven
axes of quality )
How does it work?
● Analyzes source code and byte code
● Computes hundreds of metrics
● Associates metrics with analysis snapshots
● Shows the results in dashboards and
widgets accessible by any browser
SonarQube for everything
● Initially developed only for Java projects
● Today supports over twenty languages
Commercial : ABAP, C, C++, Cobol, Natural, PL/SQL,
Visual Basic
Open Source : C++, C#, Flex, Groovy, Android,
Javascript, PHP, Python, XML,
Web(xhtml, jsp , jsf, )
… and for everyone
For developers. Is my code “good”?
How can I improve it?
For testers / QA staff. Which parts of
the system lack unit testing?
For architects. Is the initial design
“broken”? How about complexity?
For managers. Give me the numbers!!
Are we going up or down?
Managing code quality
● Dashboards
● Historical data
● Differential views
● Compare service
● Code reviews
● Action plans
Managing code quality

DEMO TIME
The big picture
● Track and reduce Technical Debt on an
ongoing basis. (Clean up kitchen every day)
● Engage all developers from project day #1
(Not only mums wash the dishes)
● Get alerted when Technical debt is beyond a
threshold (when someone is leaving the
kitchen in a mess)
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
Patroklos Papapetrou
@ppapapetrou76
http://www.linkedin.com/in/ppapapetrou

More Related Content

PPTX
Track code quality with SonarQube - short version
PPTX
SonarQube - The leading platform for Continuous Code Quality
PDF
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
PDF
Continuous Inspection of Code Quality: SonarQube
PPTX
Track code quality with SonarQube
PPTX
Sonarqube
PPTX
SonarQube: Continuous Code Inspection
PPTX
Track code quality with SonarQube - short version
SonarQube - The leading platform for Continuous Code Quality
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Continuous Inspection of Code Quality: SonarQube
Track code quality with SonarQube
Sonarqube
SonarQube: Continuous Code Inspection

What's hot (20)

PDF
SonarQube - Should I Stay or Should I Go ?
PDF
SonarQube
PPTX
SonarQube Presentation.pptx
PDF
Java Source Code Analysis using SonarQube
PPT
SonarQube Overview
PPTX
Introduction to CI/CD
PDF
Introduction to CICD
ODP
An Introduction To Jenkins
PDF
The story of SonarQube told to a DevOps Engineer
PDF
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
PPTX
CI/CD
PPTX
Sonar Review
PPTX
CI/CD Overview
PPTX
Jenkins CI presentation
PDF
DevOps
PPT
Jenkins Overview
PPTX
Jenkins CI
PPTX
Sonar qube
SonarQube - Should I Stay or Should I Go ?
SonarQube
SonarQube Presentation.pptx
Java Source Code Analysis using SonarQube
SonarQube Overview
Introduction to CI/CD
Introduction to CICD
An Introduction To Jenkins
The story of SonarQube told to a DevOps Engineer
CI CD Pipeline Using Jenkins | Continuous Integration and Deployment | DevOps...
CI/CD
Sonar Review
CI/CD Overview
Jenkins CI presentation
DevOps
Jenkins Overview
Jenkins CI
Sonar qube
Ad

Similar to Tracking and improving software quality with SonarQube (20)

PDF
ITAKE Unconference - Holding down your technical debt with Sonarqube
PDF
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
DOCX
What is SonarQube in DevOps.docx
PDF
Code Quality Lightning Talk
PPTX
postgres.pptx
PPTX
Test driven development with sonarQube
PPTX
mastering-code-quality-an-in-depth-guide-to-sonarqube.pptx
PPTX
Tracking your Technical Debt with Sonarqube
PPTX
A year of SonarQube and TFS/VSTS
PDF
Control source code quality using the SonarQube platform
PPTX
SonarQube.pptx
PPTX
mydevops.pptx
PPTX
Sonar qube to impove code quality
PPTX
postdev.pptx
PDF
Sonar In Action 20110302-vn
PDF
Quality Metrics: The Dirty Word in the Room
PPT
CiklumJavaSat15112011:Alexey Trusov-Code quality management
PDF
Continuous inspection with Sonar
PDF
Ady beleanu automate-theprocessdelivery
PDF
Rtc2014 automate the_process_deliver_quality_ady_beleanu
ITAKE Unconference - Holding down your technical debt with Sonarqube
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
What is SonarQube in DevOps.docx
Code Quality Lightning Talk
postgres.pptx
Test driven development with sonarQube
mastering-code-quality-an-in-depth-guide-to-sonarqube.pptx
Tracking your Technical Debt with Sonarqube
A year of SonarQube and TFS/VSTS
Control source code quality using the SonarQube platform
SonarQube.pptx
mydevops.pptx
Sonar qube to impove code quality
postdev.pptx
Sonar In Action 20110302-vn
Quality Metrics: The Dirty Word in the Room
CiklumJavaSat15112011:Alexey Trusov-Code quality management
Continuous inspection with Sonar
Ady beleanu automate-theprocessdelivery
Rtc2014 automate the_process_deliver_quality_ady_beleanu
Ad

More from Patroklos Papapetrou (Pat) (8)

PDF
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
PDF
The Art of Software Gardening
PDF
Boost your development speed - ITAKE Unconference
ODP
Thessaloniki rb-24
PPT
Continous integration with jenkins
PPTX
PPS
Thessaloniki through history with images
PDF
J2EE Introduction
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
The Art of Software Gardening
Boost your development speed - ITAKE Unconference
Thessaloniki rb-24
Continous integration with jenkins
Thessaloniki through history with images
J2EE Introduction

Recently uploaded (20)

PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
cuic standard and advanced reporting.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
KodekX | Application Modernization Development
PPTX
MYSQL Presentation for SQL database connectivity
PPTX
Cloud computing and distributed systems.
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PPT
Teaching material agriculture food technology
PDF
Electronic commerce courselecture one. Pdf
PDF
Encapsulation theory and applications.pdf
PPTX
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
cuic standard and advanced reporting.pdf
Understanding_Digital_Forensics_Presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
KodekX | Application Modernization Development
MYSQL Presentation for SQL database connectivity
Cloud computing and distributed systems.
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
Teaching material agriculture food technology
Electronic commerce courselecture one. Pdf
Encapsulation theory and applications.pdf
PA Analog/Digital System: The Backbone of Modern Surveillance and Communication
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Chapter 3 Spatial Domain Image Processing.pdf
Unlocking AI with Model Context Protocol (MCP)

Tracking and improving software quality with SonarQube

  • 1. Tracking and improving software quality with Sonar(Qube)
  • 2. SonarQube and me (Patroklos Papapetrou) ● 15 years experience in software engineering ● Agile team leader ● Active member of the SonarQube user and development list ● SonarQube plugins contributor ● Addicted to software quality and Continuous Inspection ● Co-author of SonarQube in Action
  • 3. Overview ● Code quality (what, why and when) ● The 7 Axes of quality and the Technical Debt ● SonarQube introduction ● SonarQube to the rescue (demo time)
  • 4. 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()); }
  • 5. What is code quality?
  • 6. What is code quality? “It’s an indicator about how quickly developers can add business value to a software system”
  • 7. Why measure? ● Source code is the heart of each system ● Developers don’t write new software. They maintain “legacy” systems ● A system is (almost) never “finished” ● You can’t improve if you don’t measure ● Broken window theory
  • 9. When you should measure? ● From project day #0 ● Continuously ● Prevent vs post-actions ● Prioritize and plan
  • 10. What you should measure? ● Not just abstract numbers ● Evolution through time ● Metrics? ● Welcome to the 7 deadly sins of devs
  • 11. The seven axes of quality
  • 12. Co xi e pl ty Tes t m ver Co age The seven axes of quality l Bugs a otenti P ation up D ment o ati lic ns Docu Architecture & Design Technical Debt Co din g Ru les
  • 13. 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)
  • 14. This is your source code when you don’t pay your technical debt
  • 15. “Good” & “Bad” Technical Debt
  • 16. How to deal with Technical Debt
  • 17. What SonarQube is / does ● Free & open source “Code Quality Platform” ● Provides moment-in-time quality snapshots ● Gives trends of lagging and leading indicators ● Tracks developers’ seven deadly sins (seven axes of quality )
  • 18. How does it work? ● Analyzes source code and byte code ● Computes hundreds of metrics ● Associates metrics with analysis snapshots ● Shows the results in dashboards and widgets accessible by any browser
  • 19. SonarQube for everything ● Initially developed only for Java projects ● Today supports over twenty languages Commercial : ABAP, C, C++, Cobol, Natural, PL/SQL, Visual Basic Open Source : C++, C#, Flex, Groovy, Android, Javascript, PHP, Python, XML, Web(xhtml, jsp , jsf, )
  • 20. … and for everyone For developers. Is my code “good”? How can I improve it? For testers / QA staff. Which parts of the system lack unit testing? For architects. Is the initial design “broken”? How about complexity? For managers. Give me the numbers!! Are we going up or down?
  • 21. Managing code quality ● Dashboards ● Historical data ● Differential views ● Compare service ● Code reviews ● Action plans
  • 23. The big picture ● Track and reduce Technical Debt on an ongoing basis. (Clean up kitchen every day) ● Engage all developers from project day #1 (Not only mums wash the dishes) ● Get alerted when Technical debt is beyond a threshold (when someone is leaving the kitchen in a mess)
  • 24. I have a dream… ...that one day code quality management will be as much as important and essential is today source code management