• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Tracking and improving software quality with SonarQube
 

Tracking and improving software quality with SonarQube

on

  • 3,192 views

Presentation at java day riga 2013, about code quality, technical debt and SonarQube

Presentation at java day riga 2013, about code quality, technical debt and SonarQube

Statistics

Views

Total Views
3,192
Views on SlideShare
2,309
Embed Views
883

Actions

Likes
5
Downloads
83
Comments
0

7 Embeds 883

http://www.scoop.it 792
http://lanyrd.com 66
https://twitter.com 17
http://eventifier.com 3
http://www.linkedin.com 2
http://www.google.fr 2
http://eventifier.co 1
More...

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Tracking and improving software quality with SonarQube Tracking and improving software quality with SonarQube Presentation Transcript

    • 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