@AdamTornhill adam.tornhill@empear.com http://www.empear.com/
Embrace The Past How Software Evolution Lets You Understand Large - - PowerPoint PPT Presentation
Embrace The Past How Software Evolution Lets You Understand Large - - PowerPoint PPT Presentation
Embrace The Past How Software Evolution Lets You Understand Large Codebases @AdamTornhill adam.tornhill@empear.com http://www.empear.com/ Motivation Is it a Failure to Improve? Most complex component @AdamTornhill Technical Debt - How Much
Motivation
Is it a Failure to Improve?
Most complex component
@AdamTornhill
Technical Debt - How Much Is Enough?
Is a Man-Month Still Mythical?
Responsible for the merge
https://pragprog.com/book/atcrime/your-code-as-a-crime-scene
Why Do We Keep Repeating The Same Misstakes?
What’s absent? Time and Social Information!
@AdamTornhill
Embrace The Past
Social information
Time
@AdamTornhill
All Code is Equal …but some Code is more equal than others*
* Sorry, George Orwell
Change Distribution of Files
1 Year in Roslyn (C#, VB) 6 Years of Erlang 12 Years of Ruby on Rails Each file in the system Change Frequency
Hotspots - A Tool To Prioritize
@AdamTornhill
Code Complexity Code Change Frequency Hotspot
@AdamTornhill
Hotspots - A Tool To Prioritize
Hotspots Hotspots
Code is Auto-Destructive Art
Focus on the Code that Matters
ASP.NET MVC 200 kLoC Docker 500 kLoC
2.4% of the code, 13.3% effort 2.5% of the code, 11.0% effort 2.6% of the code, 15.5% effort
Mono 6.7 MLoC
@AdamTornhill
Prioritize with Hotspots
Hotspots: ~3-6% of the total Code
Important Complex Code
@AdamTornhill
Normalization of Deviance
@AdamTornhill
Supervise your Complexity Trends
@AdamTornhill
Increasing complexity Refactoring Increases again
Lines of Code Complexity
Software Half-Life
https://leanpub.com/software-faster “ Reducing this half-life means any code you are looking at is likely to be either very recent or old. We discover that reasoning about code becomes harder when there is lots of code in the grey area between these two. ” Dan North
Evolutionary Stable Code
Young Code Old Code
@AdamTornhill
Case Study: Commodities in Clojure
@AdamTornhill
Case Study: Commodities in Clojure
Package: “asm”
- ClassReader.java
- MethodWriter.java
- …
@AdamTornhill
Case Study: Commodities in Clojure
@AdamTornhill
Case Study: CPython
- …
Different Rates of Change
cjkcodecs
multibytecodec.c => 1 month since last change mappings => 10 years (!) since last change
@AdamTornhill
Code Age: a much underused driver of software design.
What if…
…we organize our code by age? …we move and refactor code that fails to stabilize? …we turn stable packages into libraries?
@AdamTornhill
Organizational problems are mistaken as technical issues
@AdamTornhill
A Social View of Clojure
Rich Hickey Stuart Halloway … … …
A Social View of Clojure
Teams Underperform
Process Loss
Process Loss
The Potential Productivity
Individual Contributions
Real Productivity
Team Work
@AdamTornhill
Study Team Coordination
Measuring Conway’s Law
Views Features
Architectural Pattern: Package by Feature
@AdamTornhill
Team Team Team Team Team Team Team Team Team Team Team Team
The Perils of Feature Teams
@AdamTornhill
The Gatekeeper/Architect Pattern
https://en.wikipedia.org/wiki/Amdahl%27s_law
@AdamTornhill
Alternative: The Team as Gatekeeper
@AdamTornhill
Diffusion of Responsibility
Why Hotspots stay where they are
Immutable Design
Align Your Architecture and your Organisation
@AdamTornhill
@AdamTornhill
Make Decisions Influenced By Data
@AdamTornhill adam.tornhill@empear.com http://www.empear.com/
Read More www.adamtornhill.com/articles/aspnetclones/killtheclones.html www.adamtornhill.com/articles/socialside/socialsideofcode.htm The Tools as a Service (work in progress) https://codescene.io/