continuous inspection with sonar
TRANSCRIPT
![Page 1: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/1.jpg)
Continuous InspectionFight back the 7 deadly sinsof the developer!
Olivier [email protected]@gaudol
JEE Conf
![Page 2: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/2.jpg)
Back in old times
![Page 3: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/3.jpg)
The genius
![Page 4: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/4.jpg)
The super hero
Au fin fond de l'Univers, à des années et des années-lumière de la Terre,Veille celui que le gouvernement intersidéral appelle quand il n'est plusCapable de trouver une solution à ses problèmes, quand il ne reste plusAucun espoir :
le Capitaine FLAM !
![Page 5: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/5.jpg)
This is my toy
![Page 6: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/6.jpg)
Fear of changes
![Page 7: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/7.jpg)
Industrialisation has entered the game...
● Project under version control● Project under continuous
integration● Technical and functional
traceability
![Page 8: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/8.jpg)
What is the mission of today's developer ?
?
![Page 9: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/9.jpg)
Sustainable development
![Page 10: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/10.jpg)
(Almost) Everything is maintenance !
Creation of anapplication
Maintenance of an application
![Page 11: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/11.jpg)
Nothing is more important than codeBut source code is nothing alone
![Page 12: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/12.jpg)
Old times are over
![Page 13: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/13.jpg)
Developing for others
![Page 14: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/14.jpg)
Methodology
![Page 15: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/15.jpg)
Transparency
![Page 16: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/16.jpg)
Software factories evolve
Makefile
SCM
Issue Tracker
ContinuousIntegration
IDERefactoring
VI /Emacs
Unit Tests
ContinuousInspection
![Page 17: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/17.jpg)
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
![Page 18: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/18.jpg)
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
![Page 19: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/19.jpg)
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
● ...
![Page 20: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/20.jpg)
BUT...
● Insuring technical traceabilityConfiguration Manager
● Insuring functional traceabilityIssue Manager
● Insuring build stabilityContinuous Integration
● Insuring source code qualityContinuous Inspection (Sonar)
Maturity steps should be followed
![Page 21: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/21.jpg)
The end does not justify the means
Doing the right software
Doing the software right
![Page 22: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/22.jpg)
What is quality?
« A well-written program is a program where the cost of implementing a feature
is constant throughout the program's lifetime. »
Itay Maman
![Page 23: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/23.jpg)
How to measure quality ?
![Page 24: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/24.jpg)
The technical debt
![Page 25: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/25.jpg)
The 7 deadly sinsof the developer
Sins
TechnicalDebt
![Page 26: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/26.jpg)
The 7 deadly sins ?Applied to source code
● ?● ?● ?● ?● ?● ?● ?
![Page 27: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/27.jpg)
● Duplications● Bad distribution of complexity● Spaghetti Design● Lack of unit tests● No coding standards● Potential bugs● Not enough or too many comments
The 7 deadly sins ?Applied to source code
![Page 28: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/28.jpg)
The mission of Sonar
Declare open the hunt of the developer's 7 deadly sins
![Page 29: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/29.jpg)
The mission of Sonar
Augment everybody's capability to reduce, reuse and recycle
source code
More seriously
![Page 30: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/30.jpg)
Sonar: a reality
X?,000 instances in the world
6,000+ downloads per month (300 in 2008)
1,300+ subscribers to mailing list
150,000 downloads
60 plugins in the open source forge
![Page 31: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/31.jpg)
Demo
![Page 32: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/32.jpg)
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
![Page 33: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/33.jpg)
The « Done, Done, Done, Done »
● Developed● Tested● Approved by the « Product Owner »
● Technical debt under control
![Page 34: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/34.jpg)
Roadmap 2012
Track changes
Expand rules and metrics
Review Process
Developer Cockpit
Sonar-cpd
Sonar IDE
Governance dashboards
Code Churn
PL/SQL
VB .NET ABAP 2.0C++
Quality of Unit Tests
![Page 35: Continuous inspection with Sonar](https://reader034.vdocuments.net/reader034/viewer/2022052505/554dd624b4c905c70e8b4bb5/html5/thumbnails/35.jpg)
Questions & Answers
Thank You ! http://www.sonarsource.org http://www.sonarsource.com