Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Technical Debt & SonarQube

Technical Debt & SonarQube

I will explain about Technical Debt. What are important causes which to be considered and give demo of SonarQube, how it can help us to track metrics

Prakash Bhagat

December 27, 2015
Tweet

Other Decks in Technology

Transcript

  1. TECHNICAL DEBT & SONARQUBE Prakash Bhagat Sr. Software Engineer Infostretch

    Corporation prakashdbhagat prakashdbhagat +PrakashBhagatD
  2. AGENDA • Technical Debt (What, Causes) • Code Quality •

    The Seven Axes Of Quality • SonarQube Introduction • SonarQube Features
  3. TECHNICAL DEBT “is a metaphor referring to the eventual consequences

    of any system design, software architecture or software development within a codebase.” – Wiki
  4. TECHNICAL DEBT (CONT..) “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)
  5. TECHNICAL DEBT – CAUSES Business pressures Lack of process or

    understanding Lack of building loosely coupled components Lack of test suite Lack of documentation Lack of collaboration Parallel development Delayed refactoring Lack of alignment to standards
  6. 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()); }
  7. WHAT IS CODE QUALITY? "It’s an indicator about how quickly

    developers can add business value to a software system"
  8. WHAT? • Abstract numbers? (Almost) useless • Evolution through time?

    Definitely! • Metrics? Yes but which ones? • Welcome to the seven deadly sins of developers
  9. WHAT IS SONAR QUBE? • Free & open source “Code

    Quality Platform” • Provides moment-in-time quality snapshots • Gives trends of lagging and leading indicators • Tracks developers’ seven deadly sins
  10. 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
  11. SONARQUBE FOR EVERYTHING... • Initially designed for Maven Java projects

    • Today supports more than 20 languages  Commercial : Swift, Objective C, 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
  12. … AND FOR EVERYONE For developers. Is my code "good"?

    How can I improve For testers / QA stuff. 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
  13. THE BIG PICTURE Track and reduce Technical Debt on an

    ongoing basis. (Clean up street every day)
  14. FUTURE ...that one day code quality management will be as

    much as important and essential is today source code management
  15. SOURCES Holding down your Technical Debt with SonarQube SonarQube in

    Action Book Technical Debt Wiki How Agile is your code?