SonarQubetm 
to improve code quality !
Introduction 
- quick show of hands about SonarQubetm (previously Sonar) 
- code-base in Java, maybe some Python & Javascr...
Demo 
- git logs 
- Sonar Dashboard widgets (for e.g. Quality metrics tab) 
- show source code 
- show changesets and pull...
Strategy (method to madness) 
- Most violated rules (Blockers, Critical, Major, Minor violations) 
- Unit test coverage: E...
Strategy (haven’t applied, very but interesting) 
- Squale - Technical Debt pyramid 
- LCOM 
- Toxicity Chart & Clouds 
- ...
Benefits 
- Learn Checkstyle, Findbugs & PMD rules as you go 
- Learn through repetition & build muscle memory 
- Measure ...
Resources 
● SonarQube resources 
● Installing SonarQube (formerly Sonar) on MacOsX Mountain Lion 
● Using SonarQube on Ma...
Q & A 
Its your time to share your methods and help 
me improve my craft ! 
http://bit.ly/1lk8NDW
Thanks 
- Chris Jeffrey, Brad & Rachel 
- LSCC 
- Socrates (UK & Germany) 
http://bit.ly/1lk8NDW
Feedback 
mani 
@theNeomatrix369 
http://bit.ly/1lk8NDW
Upcoming SlideShare
Loading in …5
×

Sonar qube to impove code quality

2,419 views

Published on

A presentation on SonarQube and my personal experience using it to learn about a project - presented at the Software Craftsmanship unconference - Socrates UK.

Published in: Software

Sonar qube to impove code quality

  1. 1. SonarQubetm to improve code quality !
  2. 2. Introduction - quick show of hands about SonarQubetm (previously Sonar) - code-base in Java, maybe some Python & Javascript - Definition of code crinkliness: from the static analysis and code-coverage point of views - not an expert, still learning about SonarQube - still learning to write quality code - build this session as we go, learn and improve together - lots of room for improvement http://bit.ly/1lk8NDW
  3. 3. Demo - git logs - Sonar Dashboard widgets (for e.g. Quality metrics tab) - show source code - show changesets and pull requests - strategy (continuously improving) http://bit.ly/1lk8NDW
  4. 4. Strategy (method to madness) - Most violated rules (Blockers, Critical, Major, Minor violations) - Unit test coverage: Emma, IntelliJ Code Coverage check - Integration test coverage - Performance / non-functional testing, GC analysis (Java/JVM platforms only, JMH benchmarking) - Package Tangle Index (complexity) - Complexity (method / function, class-level) - Apply SonarGraph http://bit.ly/1lk8NDW
  5. 5. Strategy (haven’t applied, very but interesting) - Squale - Technical Debt pyramid - LCOM - Toxicity Chart & Clouds - Apply PIT Mutation testing - Apply generative tests (QuickCheck) - Apply Mutability Detector library - Analyse using JitWatch (improve Jit compilation attempts) http://bit.ly/1lk8NDW
  6. 6. Benefits - Learn Checkstyle, Findbugs & PMD rules as you go - Learn through repetition & build muscle memory - Measure the improvement (history, timeline) - Measure your progress - Build quality profiles & dashboards - Identify unused / dead code - Identify Hotspot (areas of concern, maybe ready for refactoring) - Pairing an entity that gives consistent results (when you don’t have a human-partner to pair with) - A powerful ally when tweaked and fine-tuned - A short-feedback loop http://bit.ly/1lk8NDW
  7. 7. Resources ● SonarQube resources ● Installing SonarQube (formerly Sonar) on MacOsX Mountain Lion ● Using SonarQube on MacOsX Mountain Lion ● SonarGraph (http://www.hello2morrow.com/products/sonargraph) ● Jitwatch: http://github.com/AdoptOpenJDK/jitwatch ● Book: Sonar in Action (http://www.manning.com/papapetrou/) ● QuickCheck (https://bitbucket.org/blob79/quickcheck) ● PIT Mutation Testing (http://pitest.org/) ● Mutability Detector (https://github.com/MutabilityDetector/) ● Presentation on Sonar strategies (link to follow) http://bit.ly/1lk8NDW
  8. 8. Q & A Its your time to share your methods and help me improve my craft ! http://bit.ly/1lk8NDW
  9. 9. Thanks - Chris Jeffrey, Brad & Rachel - LSCC - Socrates (UK & Germany) http://bit.ly/1lk8NDW
  10. 10. Feedback mani @theNeomatrix369 http://bit.ly/1lk8NDW

×