SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
1
Sonar in Action
by Frédéric DROUET and Arnaud HERITIER
02/03/2011
2
Agenda
» How do we measure the code quality ?
» The 7 worst practices
» The Goals of Sonar
» Demonstration on YOUR code
3
3
Why do we need this kind of tool
4
How do we measure the code quality ?
In the past
5
How do we measure the code quality ?
That is not sufficient !
6
How do we measure the code quality ?
Today : we need to measure the Technical Debt …
7
How do we measure the code quality ?
… and to monitor this Technical Debt …
… to take corrective actions without being blind
8
The 7 worst practices
9
The 7 worst practices
1- Duplicated code
»  Which one do you prefer ?
10
The 7 worst practices
2- Maldistribution of the complexity
»  What is the best ?
»  1 method with a complexity of 30
»  10 methods with a complexity of 3
11
The 7 worst practices
3- Bad design
»  Which package / class
is responsible of what ?
12
The 7 worst practices
4- Potential bugs
13
The 7 worst practices
5- Little or no use of unit tests
»  Please add a new case
BUT
without any regression of course
14
The 7 worst practices
6- Non-compliance with standards
»  We have opened a dedicated Wiki Space for Development Standards for eXo
»  https://wiki-int.exoplatform.org/display/DEVSTD
15
The 7 worst practices
7- No comment or too many comments
16
The goals of Sonar
17
The goals of Sonar
» Help the developer to find the problems
» Help the managers to monitor the health of the codebase
and to follow the trends
18
Demonstration
19
Demonstration
» https://sonar.exoplatform.org

Contenu connexe

En vedette

CRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieArnaud Héritier
 
2013.07.05 [IBM] Cloud Ecosystem Forum - Atelier Directions Techniques
2013.07.05   [IBM] Cloud Ecosystem Forum - Atelier Directions Techniques2013.07.05   [IBM] Cloud Ecosystem Forum - Atelier Directions Techniques
2013.07.05 [IBM] Cloud Ecosystem Forum - Atelier Directions TechniquesClub Cloud des Partenaires
 
Agora cms 2014 - Méthodes agiles et culture Devops au service du Web
Agora cms 2014 - Méthodes agiles et culture Devops au service du WebAgora cms 2014 - Méthodes agiles et culture Devops au service du Web
Agora cms 2014 - Méthodes agiles et culture Devops au service du WebVanessa David
 
Quand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsQuand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsArnaud Héritier
 
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011Henri Gomez
 
Devops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMAArnaud Héritier
 
Matinale DevOps / Docker
Matinale DevOps / DockerMatinale DevOps / Docker
Matinale DevOps / DockerZenika
 
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoftdevops REX
 
Introduction à la démarche Devops
Introduction à la démarche DevopsIntroduction à la démarche Devops
Introduction à la démarche DevopsRomain Chalumeau
 

En vedette (10)

CRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - QuickieCRaSH @ JUGSummerCamp 2012 - Quickie
CRaSH @ JUGSummerCamp 2012 - Quickie
 
2013.07.05 [IBM] Cloud Ecosystem Forum - Atelier Directions Techniques
2013.07.05   [IBM] Cloud Ecosystem Forum - Atelier Directions Techniques2013.07.05   [IBM] Cloud Ecosystem Forum - Atelier Directions Techniques
2013.07.05 [IBM] Cloud Ecosystem Forum - Atelier Directions Techniques
 
Agora cms 2014 - Méthodes agiles et culture Devops au service du Web
Agora cms 2014 - Méthodes agiles et culture Devops au service du WebAgora cms 2014 - Méthodes agiles et culture Devops au service du Web
Agora cms 2014 - Méthodes agiles et culture Devops au service du Web
 
Quand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les railsQuand java prend de la vitesse, apache maven vous garde sur les rails
Quand java prend de la vitesse, apache maven vous garde sur les rails
 
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
DevOps - Retour d'expérience - MarsJug du 29 Juin 2011
 
The DevOps Wonder @ PHPTour Lyon 2014
The DevOps Wonder @ PHPTour Lyon 2014The DevOps Wonder @ PHPTour Lyon 2014
The DevOps Wonder @ PHPTour Lyon 2014
 
Devops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMADevops Recto-Verso @ DevoxxMA
Devops Recto-Verso @ DevoxxMA
 
Matinale DevOps / Docker
Matinale DevOps / DockerMatinale DevOps / Docker
Matinale DevOps / Docker
 
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
[devops REX 2016] Retour d’expérience de la transformation DevOps de Microsoft
 
Introduction à la démarche Devops
Introduction à la démarche DevopsIntroduction à la démarche Devops
Introduction à la démarche Devops
 

Similaire à Sonar In Action 20110302-vn

From ensembles to computer networks
From ensembles to computer networksFrom ensembles to computer networks
From ensembles to computer networksCSIRO
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008vipulkocher
 
Global Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul EventGlobal Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul EventLemi Orhan Ergin
 
Lessons learned after 190M lessons served
Lessons learned after 190M lessons servedLessons learned after 190M lessons served
Lessons learned after 190M lessons servedRicardo Bánffy
 
Anomalies! You can't escape them.
Anomalies! You can't escape them.Anomalies! You can't escape them.
Anomalies! You can't escape them.CSIRO
 
Software Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code GamesSoftware Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code GamesMike Clement
 
Fighting Software Inefficiency Through Automated Bug Detection
 Fighting Software Inefficiency Through Automated Bug Detection Fighting Software Inefficiency Through Automated Bug Detection
Fighting Software Inefficiency Through Automated Bug DetectionMd E. Haque
 
David Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest IrelandDavid Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest IrelandDavid O'Dowd
 
Easy to use correctly, hard to use incorrectly
Easy to use correctly, hard to use incorrectlyEasy to use correctly, hard to use incorrectly
Easy to use correctly, hard to use incorrectlyChristophe Addinquy
 
Bug debug keynote - Present problems and future solutions
Bug debug keynote - Present problems and future solutionsBug debug keynote - Present problems and future solutions
Bug debug keynote - Present problems and future solutionsRIA RUI Society
 
Hybrid teaching: Hidden skills and knowledge gaps
Hybrid teaching: Hidden skills and knowledge gapsHybrid teaching: Hidden skills and knowledge gaps
Hybrid teaching: Hidden skills and knowledge gapsDominik Lukes
 
Caveon Webinar Series - Discrete Option Multiple Choice April 2014
Caveon Webinar Series -  Discrete Option Multiple Choice April 2014 Caveon Webinar Series -  Discrete Option Multiple Choice April 2014
Caveon Webinar Series - Discrete Option Multiple Choice April 2014 Caveon Test Security
 
Dark Matter, Public Health, and Scientific Computing
Dark Matter, Public Health, and Scientific ComputingDark Matter, Public Health, and Scientific Computing
Dark Matter, Public Health, and Scientific ComputingGreg Wilson
 
Don’t Let Missed Bugs Cause Mayhem in your Organization!
Don’t Let Missed Bugs Cause Mayhem in your Organization!Don’t Let Missed Bugs Cause Mayhem in your Organization!
Don’t Let Missed Bugs Cause Mayhem in your Organization!Qualitest
 
Unleashing the power of Unit Testing - Franck Ninsabira.pdf
Unleashing the power of Unit Testing - Franck Ninsabira.pdfUnleashing the power of Unit Testing - Franck Ninsabira.pdf
Unleashing the power of Unit Testing - Franck Ninsabira.pdfGDG Bujumbura
 
Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?Michaela Greiler
 

Similaire à Sonar In Action 20110302-vn (20)

From ensembles to computer networks
From ensembles to computer networksFrom ensembles to computer networks
From ensembles to computer networks
 
FutureOfTesting2008
FutureOfTesting2008FutureOfTesting2008
FutureOfTesting2008
 
2011_esc.pdf
2011_esc.pdf2011_esc.pdf
2011_esc.pdf
 
Global Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul EventGlobal Day of Coderetreat'14 - Istanbul Event
Global Day of Coderetreat'14 - Istanbul Event
 
The art of project estimation
The art of project estimationThe art of project estimation
The art of project estimation
 
Lessons learned after 190M lessons served
Lessons learned after 190M lessons servedLessons learned after 190M lessons served
Lessons learned after 190M lessons served
 
Anomalies! You can't escape them.
Anomalies! You can't escape them.Anomalies! You can't escape them.
Anomalies! You can't escape them.
 
Software Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code GamesSoftware Craftsmanship and Agile Code Games
Software Craftsmanship and Agile Code Games
 
Fighting Software Inefficiency Through Automated Bug Detection
 Fighting Software Inefficiency Through Automated Bug Detection Fighting Software Inefficiency Through Automated Bug Detection
Fighting Software Inefficiency Through Automated Bug Detection
 
David Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest IrelandDavid Parnas - Documentation Based Software Testing - SoftTest Ireland
David Parnas - Documentation Based Software Testing - SoftTest Ireland
 
Easy to use correctly, hard to use incorrectly
Easy to use correctly, hard to use incorrectlyEasy to use correctly, hard to use incorrectly
Easy to use correctly, hard to use incorrectly
 
Bug debug keynote - Present problems and future solutions
Bug debug keynote - Present problems and future solutionsBug debug keynote - Present problems and future solutions
Bug debug keynote - Present problems and future solutions
 
The Art of Project Estimation
The Art of Project EstimationThe Art of Project Estimation
The Art of Project Estimation
 
Hybrid teaching: Hidden skills and knowledge gaps
Hybrid teaching: Hidden skills and knowledge gapsHybrid teaching: Hidden skills and knowledge gaps
Hybrid teaching: Hidden skills and knowledge gaps
 
Ready, Set, Refactor
Ready, Set, RefactorReady, Set, Refactor
Ready, Set, Refactor
 
Caveon Webinar Series - Discrete Option Multiple Choice April 2014
Caveon Webinar Series -  Discrete Option Multiple Choice April 2014 Caveon Webinar Series -  Discrete Option Multiple Choice April 2014
Caveon Webinar Series - Discrete Option Multiple Choice April 2014
 
Dark Matter, Public Health, and Scientific Computing
Dark Matter, Public Health, and Scientific ComputingDark Matter, Public Health, and Scientific Computing
Dark Matter, Public Health, and Scientific Computing
 
Don’t Let Missed Bugs Cause Mayhem in your Organization!
Don’t Let Missed Bugs Cause Mayhem in your Organization!Don’t Let Missed Bugs Cause Mayhem in your Organization!
Don’t Let Missed Bugs Cause Mayhem in your Organization!
 
Unleashing the power of Unit Testing - Franck Ninsabira.pdf
Unleashing the power of Unit Testing - Franck Ninsabira.pdfUnleashing the power of Unit Testing - Franck Ninsabira.pdf
Unleashing the power of Unit Testing - Franck Ninsabira.pdf
 
Can we induce change with what we measure?
Can we induce change with what we measure?Can we induce change with what we measure?
Can we induce change with what we measure?
 

Plus de Arnaud Héritier

Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentationArnaud Héritier
 
Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXoArnaud Héritier
 
Jenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsJenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsArnaud Héritier
 
ToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesArnaud Héritier
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationArnaud Héritier
 
LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?Arnaud Héritier
 
Lorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenArnaud Héritier
 
Riviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - MavenRiviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - MavenArnaud Héritier
 
Lausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - MavenLausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - MavenArnaud Héritier
 
Geneva Jug (30th March, 2010) - Maven
Geneva Jug (30th March, 2010) - MavenGeneva Jug (30th March, 2010) - Maven
Geneva Jug (30th March, 2010) - MavenArnaud Héritier
 
Alpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache MavenAlpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache MavenArnaud Héritier
 
20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache MavenArnaud Héritier
 
20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation MavenArnaud Héritier
 
20081008 - Tours Jug - Apache Maven
20081008  - Tours Jug - Apache Maven20081008  - Tours Jug - Apache Maven
20081008 - Tours Jug - Apache MavenArnaud Héritier
 
20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation MavenArnaud Héritier
 
20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La Demande20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La DemandeArnaud Héritier
 
20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache MavenArnaud Héritier
 

Plus de Arnaud Héritier (20)

Apache Maven - eXo TN presentation
Apache Maven - eXo TN presentationApache Maven - eXo TN presentation
Apache Maven - eXo TN presentation
 
Mobile developments at eXo
Mobile developments at eXoMobile developments at eXo
Mobile developments at eXo
 
Jenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of JenkinsJenkins User Meetup - eXo usages of Jenkins
Jenkins User Meetup - eXo usages of Jenkins
 
ToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promisesToursJUG-Maven 3.x, will it lives up to its promises
ToursJUG-Maven 3.x, will it lives up to its promises
 
BordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promisesBordeauxJUG-Maven 3.x, will it lives up to its promises
BordeauxJUG-Maven 3.x, will it lives up to its promises
 
ToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promisesToulouseJUG-Maven 3.x, will it lives up to its promises
ToulouseJUG-Maven 3.x, will it lives up to its promises
 
Apache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentationApache Maven - eXo VN office presentation
Apache Maven - eXo VN office presentation
 
LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?LyonJUG - Maven 3.x, will it live up to its promises?
LyonJUG - Maven 3.x, will it live up to its promises?
 
Lorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - MavenLorraine JUG (1st June, 2010) - Maven
Lorraine JUG (1st June, 2010) - Maven
 
Riviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - MavenRiviera JUG (20th April, 2010) - Maven
Riviera JUG (20th April, 2010) - Maven
 
Lausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - MavenLausanne Jug (08th April, 2010) - Maven
Lausanne Jug (08th April, 2010) - Maven
 
Geneva Jug (30th March, 2010) - Maven
Geneva Jug (30th March, 2010) - MavenGeneva Jug (30th March, 2010) - Maven
Geneva Jug (30th March, 2010) - Maven
 
Alpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache MavenAlpes Jug (29th March, 2010) - Apache Maven
Alpes Jug (29th March, 2010) - Apache Maven
 
Maven for eXo VN
Maven for eXo VNMaven for eXo VN
Maven for eXo VN
 
20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven20091112 - Mars Jug - Apache Maven
20091112 - Mars Jug - Apache Maven
 
20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven20080311 - Paris Vi Master STL TA - Initiation Maven
20080311 - Paris Vi Master STL TA - Initiation Maven
 
20081008 - Tours Jug - Apache Maven
20081008  - Tours Jug - Apache Maven20081008  - Tours Jug - Apache Maven
20081008 - Tours Jug - Apache Maven
 
20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven20081023 - Paris Vi Master STL TA - Initiation Maven
20081023 - Paris Vi Master STL TA - Initiation Maven
 
20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La Demande20080513 - Paris Jug - Maven à La Demande
20080513 - Paris Jug - Maven à La Demande
 
20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven20081113 - Nantes Jug - Apache Maven
20081113 - Nantes Jug - Apache Maven
 

Sonar In Action 20110302-vn

  • 1. 1 Sonar in Action by Frédéric DROUET and Arnaud HERITIER 02/03/2011
  • 2. 2 Agenda » How do we measure the code quality ? » The 7 worst practices » The Goals of Sonar » Demonstration on YOUR code
  • 3. 3 3 Why do we need this kind of tool
  • 4. 4 How do we measure the code quality ? In the past
  • 5. 5 How do we measure the code quality ? That is not sufficient !
  • 6. 6 How do we measure the code quality ? Today : we need to measure the Technical Debt …
  • 7. 7 How do we measure the code quality ? … and to monitor this Technical Debt … … to take corrective actions without being blind
  • 8. 8 The 7 worst practices
  • 9. 9 The 7 worst practices 1- Duplicated code »  Which one do you prefer ?
  • 10. 10 The 7 worst practices 2- Maldistribution of the complexity »  What is the best ? »  1 method with a complexity of 30 »  10 methods with a complexity of 3
  • 11. 11 The 7 worst practices 3- Bad design »  Which package / class is responsible of what ?
  • 12. 12 The 7 worst practices 4- Potential bugs
  • 13. 13 The 7 worst practices 5- Little or no use of unit tests »  Please add a new case BUT without any regression of course
  • 14. 14 The 7 worst practices 6- Non-compliance with standards »  We have opened a dedicated Wiki Space for Development Standards for eXo »  https://wiki-int.exoplatform.org/display/DEVSTD
  • 15. 15 The 7 worst practices 7- No comment or too many comments
  • 17. 17 The goals of Sonar » Help the developer to find the problems » Help the managers to monitor the health of the codebase and to follow the trends