Continuous inspection with Sonar


Published on

Published in: Technology

Continuous inspection with Sonar

  1. 1. JEE Conf Continuous Inspection Fight back the 7 deadly sins of the developer! Olivier Gaudin @gaudol
  2. 2. Back in old times
  3. 3. The genius
  4. 4. The super heroAu fin fond de lUnivers, à des annéeset des années-lumière de la Terre,Veille celui que le gouvernementintersidéral appelle quand il nest plusCapable de trouver une solution àses problèmes, quand il ne reste plusAucun espoir :le Capitaine FLAM !
  5. 5. This is my toy
  6. 6. Fear of changes
  7. 7. Industrialisation has entered the game... ● Project under version control ● Project under continuous integration ● Technical and functional traceability
  8. 8. What is the mission of todays developer ? ?
  9. 9. Sustainable development
  10. 10. (Almost) Everything is maintenance ! Creation of an application Maintenance of an application
  11. 11. Nothing is more important than codeBut source code is nothing alone
  12. 12. Old times are over
  13. 13. Developing for others
  14. 14. Methodology
  15. 15. Transparency
  16. 16. Software factories evolve Makefile Issue Tracker IDE Continuous Refactoring Inspection VI / SCM Continuous Unit TestsEmacs Integration
  17. 17. Pushed by requirementsConfiguration Manager● No change should be authorized to production system without being in configuration manager● The complete version of an application should be found easily in the source control manager
  18. 18. Pushed by requirementsContinuous Integration● Projects in SCM can be built by anybody at any time● Executing unit tests is part of the build process● The output of a build is an artifact “ready to be used”● If one of those requirements is not fulfilled, nothing is more important than fixing it
  19. 19. Pushed by requirementsContinuous Inspection● Any new code should ship with corresponding unit tests● No new method should exceed a pre-defined level of complexity● No cycle between packages should be introduced● ...
  20. 20. BUT...Maturity steps should be followed● Insuring technical traceability Configuration Manager● Insuring functional traceability Issue Manager● Insuring build stability Continuous Integration● Insuring source code quality Continuous Inspection (Sonar)
  21. 21. The end does not justify the means Doing the right software Doing the software right
  22. 22. What is quality? « A well-written program is a program where the cost of implementing a feature is constant throughout the programs lifetime. » Itay Maman
  23. 23. How to measure quality ?
  24. 24. The technical debt
  25. 25. The 7 deadly sinsof the developer Sins Technical Debt
  26. 26. The 7 deadly sins ?Applied to source code● ?● ?● ?● ?● ?● ?● ?
  27. 27. The 7 deadly sins ?Applied to source code● Duplications● Bad distribution of complexity● Spaghetti Design● Lack of unit tests● No coding standards● Potential bugs● Not enough or too many comments
  28. 28. The mission of Sonar Declare open the hunt of the developers 7 deadly sins
  29. 29. The mission of SonarMore seriouslyAugment everybodys capability to reduce, reuse and recycle source code
  30. 30. Sonar: a reality 6,000+ downloads per month (300 in 2008) 1,300+ subscribers to mailing list 60 plugins in the open source forge 150,000 downloads X?,000 instances in the world
  31. 31. Demo
  32. 32. Sonar is only a tool !● What should happen in case new defects are added ?● How, when and who should make quality standards evolve ?● How to train new joiners ?● Any measure reported must be analysed
  33. 33. The « Done, Done, Done, Done »● Developed● Tested● Approved by the « Product Owner »● Technical debt under control
  34. 34. Roadmap 2012Review Expand rulesProcess and metrics Governance dashboards Sonar IDE Quality of Track changes Unit Tests PL/SQL Code Churn Developer Cockpit Sonar-cpd VB .NET ABAP 2.0 C++
  35. 35. Questions & Answers Thank You !