complexity multipliers

38
Complexity Multipliers Jason Felice @eraserhd Tuesday, August 27, 13

Upload: eraserhd

Post on 04-Jul-2015

238 views

Category:

Technology


1 download

DESCRIPTION

Ever been on that project where you've been able to turn around a new feature inside an hour? And then the next project where it takes six weeks to turn around a feature that feels just about the same size? You rack your brain, and when you try to figure out why, all you come up with is small stuff. "Well, I guess we have to commit twice for a config change instead of once…" I posit there are a class of things which are "complexity multipliers"–things which seem small, but when a few of them get together, they have a major impact on the velocity of the project. The good thing is that complexity multipliers are easy to identify–if you know what you are looking for. They can be things inherent in the structure of the code, in the development process, in the development tools. I'd like to show you some graphs and some common examples and define a conceptual framework of how they affect projects.

TRANSCRIPT

Page 1: Complexity Multipliers

Complexity MultipliersJason Felice@eraserhd

Tuesday, August 27, 13

Page 2: Complexity Multipliers

Act I: Models

Tuesday, August 27, 13

Page 3: Complexity Multipliers

How to Understand Things

Stolen from Gerald WeinbergTuesday, August 27, 13

Page 4: Complexity Multipliers

“Complexity”

Tuesday, August 27, 13

Page 5: Complexity Multipliers

Complexity Multiplier

• A change which increases the cost of future activities.

Tuesday, August 27, 13

Page 6: Complexity Multipliers

• 50 Tasks

• Average task takes 5 days, normally distributed, with a deviation of 2 days

A Really Simple Model

Tuesday, August 27, 13

Page 7: Complexity Multipliers

Tuesday, August 27, 13

Page 8: Complexity Multipliers

• 50 Tasks

• Tasks start as an average of 5 days with about 2 day deviation

• Each task accrues a 1% complexity multiplier - about 20 minutes on the first task

A Better Model

Tuesday, August 27, 13

Page 9: Complexity Multipliers

Tuesday, August 27, 13

Page 10: Complexity Multipliers

• 50 Tasks

• Tasks start as an average of 5 days with about 2 day deviation

• Each task has a 10% probability of incurring about 20% complexity (with a deviation of about 4%)

A “Realistic” Model

Tuesday, August 27, 13

Page 11: Complexity Multipliers

Tuesday, August 27, 13

Page 12: Complexity Multipliers

Tuesday, August 27, 13

Page 13: Complexity Multipliers

From Mythical Man Month, Fred BrooksTuesday, August 27, 13

Page 14: Complexity Multipliers

Act II: Conflict

Tuesday, August 27, 13

Page 15: Complexity Multipliers

A task can almost always be completed more quickly by

ignoring its effect on the complexity of the system.

The Trade-Off

Tuesday, August 27, 13

Page 16: Complexity Multipliers

“Let’s Maintain Two”

• Code modules

• Git repositories

• Code paths

• Config files

Tuesday, August 27, 13

Page 17: Complexity Multipliers

“A basic principle of data processing teaches the folly of trying to maintain independent files in synchronism. It is far better to combine them into one file with each record containing all the information both files held concerning a given key.”

– Fred Brooks (in 1975)

Tuesday, August 27, 13

Page 18: Complexity Multipliers

Stage Gates

• Sign-off required by another team

• Work required by another team

• Any process required for each task (or group of tasks) to proceed

Tuesday, August 27, 13

Page 19: Complexity Multipliers

Communication

Tuesday, August 27, 13

Page 20: Complexity Multipliers

Fuzzy Version Matching

• Package A: 2 point versions released

• Package B: 3 point versions released

• Package C: 2 point versions released

• Total: 12 configurations

Tuesday, August 27, 13

Page 21: Complexity Multipliers

Language Design

Tuesday, August 27, 13

Page 22: Complexity Multipliers

(defvar foo 42)

(defun foo () 79)

(defmacro foo () ‘(* 7 9))

Tuesday, August 27, 13

Page 23: Complexity Multipliers

(symbol-value ‘foo) => 42

(symbol-function ‘foo) => #<FUNCTION FOO>; equivalent to #‘foo

(macro-function ‘foo) => #<FUNCTION {...}>

Tuesday, August 27, 13

Page 24: Complexity Multipliers

(setf ‘foo 24)

(setf (symbol-function ‘foo) #’(lambda () 26)))

(setf (macro-function ‘foo) #’(lambda (x) x))

Tuesday, August 27, 13

Page 25: Complexity Multipliers

(let ((bar 5)) ...)

(flet ((bar () 6)) ...)

(symbol-macrolet ((foo () ‘(* 6 4))) ...)

Tuesday, August 27, 13

Page 26: Complexity Multipliers

(let* ((bar 5) (baz (* bar 2))) ...)

(labels ((bar () 5) (baz () (* (bar) 2))) ...)

; No equiv. for symbol-macrolet

Tuesday, August 27, 13

Page 27: Complexity Multipliers

defundefvardefmacro

macro-functionsymbol-value

symbol-functionletlet*fletlabels

symbol-macroletmacrolet

compiler-letmakunboundfmakunbound

Tuesday, August 27, 13

Page 28: Complexity Multipliers

defineletlet*

define-syntaxlet-syntaxlet-syntax*

Tuesday, August 27, 13

Page 29: Complexity Multipliers

=

Tuesday, August 27, 13

Page 30: Complexity Multipliers

(let ((x 5)) (labels ((somefn () ...)) (let ((y 7)) (labels ((otherfn () ...)) ...))))

Tuesday, August 27, 13

Page 31: Complexity Multipliers

(let* ((x 5) (somefun (lambda () ...)) (y 7) (otherfun (lambda () ...))) ...)

Tuesday, August 27, 13

Page 32: Complexity Multipliers

x = 5somefun = ...y = 7otherfun = ...

Tuesday, August 27, 13

Page 33: Complexity Multipliers

Java

• int versus Integer

• int[] versus List<Integer>

• (autoboxing only works for simple types)

Tuesday, August 27, 13

Page 34: Complexity Multipliers

In Node.js

• CPS-style functions versus regular functions

Tuesday, August 27, 13

Page 35: Complexity Multipliers

Act III: Resolution

Tuesday, August 27, 13

Page 36: Complexity Multipliers

Complexity Dividers(or “Complexity Multipliers < 1.0”)

Tuesday, August 27, 13

Page 37: Complexity Multipliers

Tuesday, August 27, 13

Page 38: Complexity Multipliers

Tuesday, August 27, 13