continuous inspection with sonar

35
Continuous Inspection Fight back the 7 deadly sins of the developer! Olivier Gaudin [email protected] @gaudol JEE Conf

Upload: gaudol

Post on 09-May-2015

2.091 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Continuous inspection with Sonar

Continuous InspectionFight back the 7 deadly sinsof the developer!

Olivier [email protected]@gaudol

JEE Conf

Page 2: Continuous inspection with Sonar

Back in old times

Page 3: Continuous inspection with Sonar

The genius

Page 4: Continuous inspection with Sonar

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

This is my toy

Page 6: Continuous inspection with Sonar

Fear of changes

Page 7: Continuous inspection with Sonar

Industrialisation has entered the game...

● Project under version control● Project under continuous

integration● Technical and functional

traceability

Page 8: Continuous inspection with Sonar

What is the mission of today's developer ?

?

Page 9: Continuous inspection with Sonar

Sustainable development

Page 10: Continuous inspection with Sonar

(Almost) Everything is maintenance !

Creation of anapplication

Maintenance of an application

Page 11: Continuous inspection with Sonar

Nothing is more important than codeBut source code is nothing alone

Page 12: Continuous inspection with Sonar

Old times are over

Page 13: Continuous inspection with Sonar

Developing for others

Page 14: Continuous inspection with Sonar

Methodology

Page 15: Continuous inspection with Sonar

Transparency

Page 16: Continuous inspection with Sonar

Software factories evolve

Makefile

SCM

Issue Tracker

ContinuousIntegration

IDERefactoring

VI /Emacs

Unit Tests

ContinuousInspection

Page 17: Continuous inspection with Sonar

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

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

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

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

The end does not justify the means

Doing the right software

Doing the software right

Page 22: Continuous inspection with Sonar

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

How to measure quality ?

Page 24: Continuous inspection with Sonar

The technical debt

Page 25: Continuous inspection with Sonar

The 7 deadly sinsof the developer

Sins

TechnicalDebt

Page 26: Continuous inspection with Sonar

The 7 deadly sins ?Applied to source code

● ?● ?● ?● ?● ?● ?● ?

Page 27: Continuous inspection with Sonar

● 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

The mission of Sonar

Declare open the hunt of the developer's 7 deadly sins

Page 29: Continuous inspection with Sonar

The mission of Sonar

Augment everybody's capability to reduce, reuse and recycle

source code

More seriously

Page 30: Continuous inspection with Sonar

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

Demo

Page 32: Continuous inspection with Sonar

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

The « Done, Done, Done, Done »

● Developed● Tested● Approved by the « Product Owner »

● Technical debt under control

Page 34: Continuous inspection with Sonar

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

Questions & Answers

Thank You ! http://www.sonarsource.org http://www.sonarsource.com