SlideShare a Scribd company logo
1 of 25
Download to read offline
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

What's hot

Sonarqube
SonarqubeSonarqube
SonarqubeCDS
 
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng NghĩaTech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng NghĩaNexus FrontierTech
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualityLarry Nung
 
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeJava Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeAngelin R
 
Managing code quality with SonarQube
Managing code quality with SonarQubeManaging code quality with SonarQube
Managing code quality with SonarQubeRadu Vunvulea
 
SonarQube: Continuous Code Inspection
SonarQube: Continuous Code InspectionSonarQube: Continuous Code Inspection
SonarQube: Continuous Code InspectionMichael Jesse
 
Code Quality Lightning Talk
Code Quality Lightning TalkCode Quality Lightning Talk
Code Quality Lightning TalkJonathan Gregory
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisPrashant Gupta
 
What is SonarQube in DevOps.docx
What is SonarQube in DevOps.docxWhat is SonarQube in DevOps.docx
What is SonarQube in DevOps.docxDevOps University
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDBatyr Nuryyev
 
Snyk Intro - Developer Security Essentials 2022
Snyk Intro - Developer Security Essentials 2022Snyk Intro - Developer Security Essentials 2022
Snyk Intro - Developer Security Essentials 2022Liran Tal
 
Static Analysis with Sonarlint
Static Analysis with SonarlintStatic Analysis with Sonarlint
Static Analysis with SonarlintUT, San Antonio
 

What's hot (20)

Sonarqube
SonarqubeSonarqube
Sonarqube
 
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng NghĩaTech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
Tech Talk #5 : Code Analysis SonarQube - Lương Trọng Nghĩa
 
SonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code QualitySonarQube - The leading platform for Continuous Code Quality
SonarQube - The leading platform for Continuous Code Quality
 
Sonar qube
Sonar qubeSonar qube
Sonar qube
 
Java Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQubeJava Source Code Analysis using SonarQube
Java Source Code Analysis using SonarQube
 
Track code quality with SonarQube
Track code quality with SonarQubeTrack code quality with SonarQube
Track code quality with SonarQube
 
Managing code quality with SonarQube
Managing code quality with SonarQubeManaging code quality with SonarQube
Managing code quality with SonarQube
 
SonarQube: Continuous Code Inspection
SonarQube: Continuous Code InspectionSonarQube: Continuous Code Inspection
SonarQube: Continuous Code Inspection
 
SonarQube Presentation.pptx
SonarQube Presentation.pptxSonarQube Presentation.pptx
SonarQube Presentation.pptx
 
Sonar Review
Sonar ReviewSonar Review
Sonar Review
 
Code Quality Lightning Talk
Code Quality Lightning TalkCode Quality Lightning Talk
Code Quality Lightning Talk
 
Sonar
SonarSonar
Sonar
 
Sonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysisSonar Tool - JAVA code analysis
Sonar Tool - JAVA code analysis
 
Jenkins with SonarQube
Jenkins with SonarQubeJenkins with SonarQube
Jenkins with SonarQube
 
What is SonarQube in DevOps.docx
What is SonarQube in DevOps.docxWhat is SonarQube in DevOps.docx
What is SonarQube in DevOps.docx
 
Sonar Overview
Sonar OverviewSonar Overview
Sonar Overview
 
Fundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CDFundamentals of DevOps and CI/CD
Fundamentals of DevOps and CI/CD
 
Snyk Intro - Developer Security Essentials 2022
Snyk Intro - Developer Security Essentials 2022Snyk Intro - Developer Security Essentials 2022
Snyk Intro - Developer Security Essentials 2022
 
Static Analysis with Sonarlint
Static Analysis with SonarlintStatic Analysis with Sonarlint
Static Analysis with Sonarlint
 
Code Quality
Code QualityCode Quality
Code Quality
 

Similar to Tracking and improving software quality with SonarQube

Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....Mozaic Works
 
ITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubeITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubePatroklos Papapetrou (Pat)
 
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)Ilya Zakharau
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratiehcderaad
 
Battle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java ProjectBattle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java ProjectGlobalLogic Ukraine
 
Continuous testing at scale
Continuous testing at scaleContinuous testing at scale
Continuous testing at scaleGergely Orosz
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplateStanislav Petrov
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scalaPaweł Panasewicz
 
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,..."Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...Vladimir Ivanov
 
The Ring programming language version 1.5.4 book - Part 177 of 185
The Ring programming language version 1.5.4 book - Part 177 of 185The Ring programming language version 1.5.4 book - Part 177 of 185
The Ring programming language version 1.5.4 book - Part 177 of 185Mahmoud Samir Fayed
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automationVishal Banthia
 
purely_functional_play_framework_application
purely_functional_play_framework_applicationpurely_functional_play_framework_application
purely_functional_play_framework_applicationNaoki Aoyama
 
A Declarative Approach for Performance Tests Execution in Continuous Software...
A Declarative Approach for Performance Tests Execution in Continuous Software...A Declarative Approach for Performance Tests Execution in Continuous Software...
A Declarative Approach for Performance Tests Execution in Continuous Software...Vincenzo Ferme
 
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech UpdateAdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Updatejamieayre
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present futurelolopetit
 
The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189Mahmoud Samir Fayed
 

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

Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
Patroklos Papapetrou: Holding Down Your Technical Debt With SonarQube at I T....
 
ITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with SonarqubeITAKE Unconference - Holding down your technical debt with Sonarqube
ITAKE Unconference - Holding down your technical debt with Sonarqube
 
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
UX Prototyping: New Principles and Tools (HTP Grodno, 20.03.2018)
 
postgres.pptx
postgres.pptxpostgres.pptx
postgres.pptx
 
2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie2014 11 20 Drupal 7 -> 8 test migratie
2014 11 20 Drupal 7 -> 8 test migratie
 
Battle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java ProjectBattle for Code Quality - A Story of One Java Project
Battle for Code Quality - A Story of One Java Project
 
Continuous testing at scale
Continuous testing at scaleContinuous testing at scale
Continuous testing at scale
 
Creating a reasonable project boilerplate
Creating a reasonable project boilerplateCreating a reasonable project boilerplate
Creating a reasonable project boilerplate
 
mydevops.pptx
mydevops.pptxmydevops.pptx
mydevops.pptx
 
Testing practicies not only in scala
Testing practicies not only in scalaTesting practicies not only in scala
Testing practicies not only in scala
 
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,..."Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
"Formal Verification in Java" by Shura Iline, Vladimir Ivanov @ JEEConf 2013,...
 
The Ring programming language version 1.5.4 book - Part 177 of 185
The Ring programming language version 1.5.4 book - Part 177 of 185The Ring programming language version 1.5.4 book - Part 177 of 185
The Ring programming language version 1.5.4 book - Part 177 of 185
 
Reliable mobile test automation
Reliable mobile test automationReliable mobile test automation
Reliable mobile test automation
 
purely_functional_play_framework_application
purely_functional_play_framework_applicationpurely_functional_play_framework_application
purely_functional_play_framework_application
 
A Declarative Approach for Performance Tests Execution in Continuous Software...
A Declarative Approach for Performance Tests Execution in Continuous Software...A Declarative Approach for Performance Tests Execution in Continuous Software...
A Declarative Approach for Performance Tests Execution in Continuous Software...
 
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech UpdateAdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
AdaCore Paris Tech Day 2016: Jose Ruiz - QGen Tech Update
 
ShubhamResume
ShubhamResumeShubhamResume
ShubhamResume
 
Counterclockwise past present future
Counterclockwise  past present futureCounterclockwise  past present future
Counterclockwise past present future
 
RishabhAgarwal
RishabhAgarwalRishabhAgarwal
RishabhAgarwal
 
The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189The Ring programming language version 1.6 book - Part 181 of 189
The Ring programming language version 1.6 book - Part 181 of 189
 

More from Patroklos Papapetrou (Pat)

More from Patroklos Papapetrou (Pat) (8)

Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
Voxxed Days Thessaloniki 2016 - JDK 9 : Big Changes To Make Java Smaller
 
The Art of Software Gardening
The Art of Software GardeningThe Art of Software Gardening
The Art of Software Gardening
 
Boost your development speed - ITAKE Unconference
Boost your development speed - ITAKE UnconferenceBoost your development speed - ITAKE Unconference
Boost your development speed - ITAKE Unconference
 
Thessaloniki rb-24
Thessaloniki rb-24Thessaloniki rb-24
Thessaloniki rb-24
 
Continous integration with jenkins
Continous integration with jenkinsContinous integration with jenkins
Continous integration with jenkins
 
Sonar platform
Sonar platformSonar platform
Sonar platform
 
Thessaloniki through history with images
Thessaloniki through history with imagesThessaloniki through history with images
Thessaloniki through history with images
 
J2EE Introduction
J2EE IntroductionJ2EE Introduction
J2EE Introduction
 

Recently uploaded

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptxHampshireHUG
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?Igalia
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Recently uploaded (20)

A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

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