Embrace The Past How Software Evolution Lets You Understand Large - - PowerPoint PPT Presentation

embrace the past
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

@AdamTornhill adam.tornhill@empear.com http://www.empear.com/

Embrace The Past

How Software Evolution Lets You Understand Large Codebases

slide-2
SLIDE 2

Motivation

slide-3
SLIDE 3

Is it a Failure to Improve?

Most complex component

@AdamTornhill

slide-4
SLIDE 4

Technical Debt - How Much Is Enough?

slide-5
SLIDE 5

Is a Man-Month Still Mythical?

Responsible for the merge

https://pragprog.com/book/atcrime/your-code-as-a-crime-scene

slide-6
SLIDE 6

Why Do We Keep Repeating The Same Misstakes?

What’s absent? Time and Social Information!

@AdamTornhill

slide-7
SLIDE 7

Embrace The Past

Social information

Time

@AdamTornhill

slide-8
SLIDE 8

All Code is Equal …but some Code is more equal than others*

* Sorry, George Orwell

slide-9
SLIDE 9

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

slide-10
SLIDE 10

Hotspots - A Tool To Prioritize

@AdamTornhill

slide-11
SLIDE 11

Code Complexity Code Change Frequency Hotspot

@AdamTornhill

slide-12
SLIDE 12

Hotspots - A Tool To Prioritize

Hotspots Hotspots

slide-13
SLIDE 13

Code is Auto-Destructive Art

slide-14
SLIDE 14

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

slide-15
SLIDE 15

Prioritize with Hotspots

Hotspots: ~3-6% of the total Code

Important Complex Code

@AdamTornhill

slide-16
SLIDE 16

Normalization of Deviance

@AdamTornhill

slide-17
SLIDE 17

Supervise your Complexity Trends

@AdamTornhill

Increasing complexity Refactoring Increases again

Lines of Code Complexity

slide-18
SLIDE 18

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

slide-19
SLIDE 19

Evolutionary Stable Code

Young Code Old Code

@AdamTornhill

slide-20
SLIDE 20

Case Study: Commodities in Clojure

@AdamTornhill

slide-21
SLIDE 21

Case Study: Commodities in Clojure

Package: “asm”

  • ClassReader.java
  • MethodWriter.java

@AdamTornhill

slide-22
SLIDE 22

Case Study: Commodities in Clojure

@AdamTornhill

slide-23
SLIDE 23

Case Study: CPython

Different Rates of Change

cjkcodecs

multibytecodec.c => 1 month since last change mappings => 10 years (!) since last change

@AdamTornhill

slide-24
SLIDE 24

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

slide-25
SLIDE 25

Organizational problems are mistaken as technical issues

@AdamTornhill

slide-26
SLIDE 26

A Social View of Clojure

slide-27
SLIDE 27

Rich Hickey Stuart Halloway … … …

A Social View of Clojure

slide-28
SLIDE 28

Teams Underperform

slide-29
SLIDE 29

Process Loss

Process Loss

The Potential Productivity

Individual Contributions

Real Productivity

Team Work

@AdamTornhill

slide-30
SLIDE 30

Study Team Coordination

slide-31
SLIDE 31

Measuring Conway’s Law

Views Features

Architectural Pattern: Package by Feature

@AdamTornhill

slide-32
SLIDE 32

Team Team Team Team Team Team Team Team Team Team Team Team

The Perils of Feature Teams

@AdamTornhill

slide-33
SLIDE 33

The Gatekeeper/Architect Pattern

https://en.wikipedia.org/wiki/Amdahl%27s_law

@AdamTornhill

slide-34
SLIDE 34

Alternative: The Team as Gatekeeper

@AdamTornhill

slide-35
SLIDE 35

Diffusion of Responsibility

slide-36
SLIDE 36

Why Hotspots stay where they are

Immutable Design

slide-37
SLIDE 37

Align Your Architecture and your Organisation

@AdamTornhill

slide-38
SLIDE 38

@AdamTornhill

Make Decisions Influenced By Data

slide-39
SLIDE 39

@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/