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

Help my Code Quality is not Manageable

Help my Code Quality is not Manageable

Slides from my talk @CodingSerbia 2014

Papapetrou Patroklos

October 17, 2014

More Decks by Papapetrou Patroklos

Other Decks in Programming


  1. Agenda • Code Quality in a nutshell • The seven

    axes of quality • Technical Debt • SonarQube in Action
  2. 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()); }
  3. What is code quality? “It’s an indicator about how quickly

    developers can add business value to a software system”
  4. What we should measure; • Abstract numbers? (Almost) useless •

    Evolution through time? Definitely! • Metrics? Yes but which ones? • Welcome to the seven axes of quality
  5. The seven axes of quality Design Duplications Documentation Com plexity

    Unit Tests Coding rules Potential Bug Technical Debt
  6. 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)
  7. This is how the source code looks like when we

    don't pay off technical debt
  8. 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 and Technical Debt
  9. The big picture Track and reduce Technical Debt on an

    ongoing basis. (Clean up kitchen every day)
  10. I have a dream… ...that one day code quality management

    will be as much as important and essential is today source code management