Treat Your
Code as a Crime Scene
@AdamTornhill Empear AB http://www.adamtornhill.com/
Code as a Crime Scene @AdamTornhill Empear AB - - PowerPoint PPT Presentation
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
Treat Your
@AdamTornhill Empear AB http://www.adamtornhill.com/
@AdamTornhill
@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
G e
r a p h i c a l
2 M i n u t e s
Code City, http://www.inf.usi.ch/phd/wettel/codecity.html
@AdamTornhill
[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
Who? When? Where!
@AdamTornhill
@AdamTornhill
Hotspot
@AdamTornhill
400.000 Lines of Code 89 Software Developers 18 Months 18 258 Commits to the codebase
@AdamTornhill
From: https://pragprog.com/book/atcrime/code-as-a-crime-scene
Hotspot Hotspot
@AdamTornhill
method-to-ir.c
2010 2014 Time Complexity
@AdamTornhill
FuelInjector.cs
Diagnostics.cs Combustion.cs Commit #1 Commit #2 Commit #3 Time
@AdamTornhill
Logical coupling Physical coupling
@AdamTornhill
Temporal Coupling
@AdamTornhill
Legacy Code?
and
@AdamTornhill
Team #1 Team #2 Team #3
@AdamTornhill
Team #2 Team #3 Team #1 Team #4
@AdamTornhill
Team #1 Team #2 Team #3 Team #4
@AdamTornhill
Number of Programmers Q u a l i t y
Idea from: Fractal Figures: Visualizing Development Effort for CVS Entities (D’Ambros, Lanza, & Gall)
@AdamTornhill
Main Developer “Knowledge Owner”
@AdamTornhill
@AdamTornhill
Team #1 Team #2 Team #3
@AdamTornhill
@AdamTornhill
@AdamTornhill
Abandoned subsystem
@AdamTornhill
@AdamTornhill
@AdamTornhill adam.tornhill@empear.com Empear AB
Read More: http://www.adamtornhill.com/ The Book: https://pragprog.com/book/atcrime/your-code-as-a-crime-scene