whistle blowers | stop bad code on its tracks
DESCRIPTION
Presented at XP2013 conference at Vienna.TRANSCRIPT
Whistle blowers
Image courtesy of David Castello Dominici | FreeDigitalPhotos.net
Habitability
Image courtesy of David Castello Dominici | FreeDigitalPhotos.net
Culture
Image courtesy of David Castello Dominici | FreeDigitalPhotos.net
Broken Window
Image courtesy of artur84 | FreeDigitalPhotos.net
Fair play
Image courtesy of olovedog| FreeDigitalPhotos.net
Discipline
Image courtesy of imagerymajestic| FreeDigitalPhotos.net
Violations
Image courtesy of artur84 | FreeDigitalPhotos.net
Referee
Image courtesy of David Castello Dominici | FreeDigitalPhotos.net
Team Work
Image courtesy of ddpavamba | FreeDigitalPhotos.net
Rot begins with a small step
Image courtesy of Robert Cochrane| FreeDigitalPhotos.net
Big ball of mud
Image courtesy of http://www.flickr.com/photos/joka2000/
Lazy developer
Image courtesy of papaja2008| FreeDigitalPhotos.net
Rush Hour
Image courtesy of twobee| FreeDigitalPhotos.net
Stuck to the routine
Image courtesy of Renjith Krishnan| FreeDigitalPhotos.net
Common Problems
Image courtesy of Renjith Krishnan| FreeDigitalPhotos.net
Duplicate Code
Image courtesy of Stuart Miles| FreeDigitalPhotos.net
Long methods and classes
Image courtesy of Akeeris| FreeDigitalPhotos.net
Poor test coverage
Image courtesy of Jscreationzs | FreeDigitalPhotos.net
Procedural Code
Dev Huddles
Image courtesy of Danilo Rizzuti| FreeDigitalPhotos.net
What is the solution?
Image courtesy of Renjith Krishnan| FreeDigitalPhotos.net
Game of life
Game of life
Game of life
Few Simple rules
Few simple rules
– No duplicate code
– Method length not more than 12
– Npath complexity not more than 5
– Path Coverage not < 95 & Branch Coverage not < 80
Human
Image courtesy of phanlop88| FreeDigitalPhotos.net
Machine
Fail on violation – Blow the whistle
Image courtesy of artur84 | FreeDigitalPhotos.net
Did it work?
Image courtesy of Paul| FreeDigitalPhotos.net
Didn’t people override settings?
Image courtesy of Chanpipat| FreeDigitalPhotos.net
Learnings
Image courtesy of Digital Art| FreeDigitalPhotos.net
Lombok
LambdaJ
Tools Used
Summary
• Small changes can produce big results...but the areas of highest leverage are often the least obvious. –Peter Senge, “The Fifth Discipline”