Treat Your Code as a Crime Scene @AdamTornhill Empear AB http://www.adamtornhill.com/
Understanding Code
@AdamTornhill
Cyclomatic Complexity @AdamTornhill
“Syntactic complexity metrics cannot capture the whole picture of software complexity” (Herraiz & Hassan) “The use of metrics to manage software projects has not even reached a state of infancy” (Glass) @AdamTornhill
Intuition Doesn’t Scale
Forensic Psychology
g n i l fi o r P r e d n e f f O l a c i h p a r g o e G - n o i t c u d o r t n I s e t u n i M 2 a
Profiling the Ripper
How can we use this in Code ?
A geography of code @AdamTornhill Code City, http://www.inf.usi.ch/phd/wettel/codecity.html
Spatial Movement in Code When? Who? [0a05fba] Adam Tornhill 2013-09-17 Added an identity analysis as debug aid 5 1 README.md 5 5 src/code_maat/analysis/authors.clj 3 4 src/code_maat/app/app.clj 1 1 src/code_maat/core.clj 18 1 test/code_maat/end_to_end/scenario_tests.clj Where! @AdamTornhill
Geographical profiling of Code @AdamTornhill
Geographical profiling of Code Hotspot @AdamTornhill
Case Study 400.000 Lines of Code 89 Software Developers 18 Months 18 258 Commits to the codebase @AdamTornhill
Hotspot Hotspot From: https://pragprog.com/book/atcrime/code-as-a-crime-scene
Hotspots and Defects 7 out of 8 most defect dense parts 4 % of the Code , 72 % of all defects !
Improve 4 % of your code , get rid of most defects @AdamTornhill
Evolution of a Program Time
Complexity Trend method-to-ir.c Complexity 2010 Time 2014
Software Development is a social activity @AdamTornhill
e ? i L e Doesn’t d o C
Temporal Coupling Commit #1 Commit #2 Commit #3 FuelInjector.cs Diagnostics.cs Combustion.cs Time @AdamTornhill
Physical coupling Logical coupling ? @AdamTornhill
Temporal Coupling @AdamTornhill
Conway’s Law Legacy Code ? and
@AdamTornhill
A Perfect World Team #1 Team #2 Team #3 @AdamTornhill
Team #2 Team #1 Team #4 Team #3 @AdamTornhill
Team #1 Team #2 Team #4 Team #3 @AdamTornhill
Align Your Architecture and Organisation
y t i l a u Q Number of Programmers
Fractal Figures @AdamTornhill Idea from: Fractal Figures: Visualizing Development Effort for CVS Entities (D’Ambros, Lanza, & Gall)
Identify Main developers Main Developer “Knowledge Owner” @AdamTornhill
Your map as a Guide @AdamTornhill
Team #1 Team #2 Team #3 @AdamTornhill
Social Networks in Code @AdamTornhill
Loss of Knowledge @AdamTornhill
Abandoned subsystem @AdamTornhill
Code <3 Forensics @AdamTornhill
The Book: https://pragprog.com/book/atcrime/your-code-as-a-crime-scene Read More: http://www.adamtornhill.com/ @AdamTornhill adam.tornhill@empear.com Empear AB
Recommend
More recommend