Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Holding Down your Technical Debt with SonarQube
Search
Papapetrou Patroklos
May 23, 2014
Programming
3
1.5k
Holding Down your Technical Debt with SonarQube
Presentation slides about my talk during JEEConf 2014
Papapetrou Patroklos
May 23, 2014
Tweet
Share
More Decks by Papapetrou Patroklos
See All by Papapetrou Patroklos
Beyond Clean Code & Code Quality
ppapapetrou76
1
580
3 Years of Remote Working in 30'
ppapapetrou76
0
73
Things I learned after doing 2400 code reviews in 6 months
ppapapetrou76
1
84
Managing Global Teams - Lessons Learned
ppapapetrou76
1
67
Technical Debt - Simply Explained
ppapapetrou76
5
170
Managing Global teams @SwanCon 2015
ppapapetrou76
0
100
The Art of Software Gardening
ppapapetrou76
0
360
Tips to improve software development productivity
ppapapetrou76
2
330
Unit testing basics and more...
ppapapetrou76
2
80
Other Decks in Programming
See All in Programming
Ruby Function Composition
bkuhlmann
1
330
try! Swift Tokyo 初参加報告LT
hinakko2
0
220
[技育CAMPアカデミア]アイディアを形に!【超入門】スマホアプリ開発〜リリースまでの流れをご紹介
teamlab
PRO
0
370
SwiftUIで使いやすいToastの作り方 / How to build a Toast system which is easy to use in SwiftUI
lovee
3
140
Node.js v22 で変わること
yosuke_furukawa
PRO
9
3.4k
DMMプラットフォームがTiDB Cloudを採用した背景
pospome
8
4.1k
Snowflakeで眠ったデータを起こそう!
estie
0
120
if constexpr文はテンプレート世界のラムダ式である
faithandbrave
3
650
ゆるい個人開発のススメ
kuroppe1819
10
990
try!Swift Tokyo 2024 参加報告 LT
akidon0000
1
220
『Railsオワコン』と言われる時代に、なぜブルーモ証券はRailsを選ぶのか
free_world21
0
220
FigmaとPHPで作る1ミリたりとも表示崩れしない最強の帳票印刷ソリューション
ttskch
43
19k
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
5 minutes of I Can Smell Your CMS
philhawksworth
199
19k
In The Pink: A Labor of Love
frogandcode
138
21k
The Illustrated Children's Guide to Kubernetes
chrisshort
31
46k
We Have a Design System, Now What?
morganepeng
43
6.8k
GraphQLとの向き合い方2022年版
quramy
32
12k
Music & Morning Musume
bryan
41
5.6k
Teambox: Starting and Learning
jrom
128
8.4k
KATA
mclloyd
15
12k
Into the Great Unknown - MozCon
thekraken
10
990
Building Better People: How to give real-time feedback that sticks.
wjessup
355
18k
How GitHub Uses GitHub to Build GitHub
holman
468
290k
Transcript
Holding Down your Technical Debt with Patroklos Papapetrou @ppapapetrou76 Holding
Down your Technical Debt with
About me
Agenda • Code Quality (what, why, when and how?) •
The seven axes of quality • Technical Debt • SonarQube Introduction • 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 every system
Why measure? Developers don't write “new” software. They maintain “legacy”
systems.
Why measure? We, the developers are lazy monkeys
The broken window theory
When it's the right time to measure • From project's
day #0 • Continuosly • Prevention vs post-actions • Prioritize and plan
What we should measure; • Abstract numbers? (Almost) useless •
Evolution through time? Definitely! • Metrics? Yes but which ones? • Welcome to the seven deadly sins of developers
The seven axes of quality
The seven axes of quality Design Duplications Documentation Com plexity
Unit Tests Coding rules Potential Bug Technical 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)
This is how the source code looks like when we
don't pay off technical debt
“Good” & “Bad” Technical Debt
What is SonarQube; • Free & open source “Code Quality
Platform” • Provides moment-in-time quality snapshots • Gives trends of lagging and leading indicators • Tracks developers’ seven deadly sins
How it works? Reads and analyzes source code files Computes
hundreds of metrics Associates them with analysis snapshots and stores them Shows the results in dashboards and widgets accessible by any browser
SonarQube for everything... • Initially designed for Maven Java projects
• Today supports more than 20 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), Erlang
For testers / QA stuff. Which parts of the system
lack unit testing? … and for everyone For developers. Is my code “good”? How can I improve For architects. Is the initial design “broken”? How about complexity? For managers. Give me the numbers!!! Are we going up or down?
SonarQube star Features Dashboards
SonarQube star Features Historical Data
SonarQube star Features Differential Views
SonarQube star Features Components drilldown views
SonarQube star Features Quality Gates
DEMO TIME
The big picture Track and reduce Technical Debt on an
ongoing basis. (Clean up kitchen every day)
The big picture Engage 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