understanding software engineering with equations
TRANSCRIPT
• Hard!
• Non-intuitive
• Misunderstood
• Seen as black-art done by amateurs
Software engineering is:
0
50
100
150
200
250
300
10 20 30 40 50 60 70 80 90 100
TIM
E+
RIS
K T
O M
AK
E C
HA
NG
E
FEATURES BUILT
CODE CHANGE COMPLEXITY
O(n) O(n2)
0
2000
4000
6000
8000
10000
12000
14000
16000
18000
0
20
40
60
80
100
120
140
50 100 150 200 250 300 350 400 450 500
FL
OW
RA
TE
(V
EH
ICLE
S/H
OU
R)
SP
EE
D (
KIL
OM
ET
ER
/HO
UR
)
DENSITY (VEHICLES/KILOMETER)
OPTIMAL FLOW
Speed (Km/h) Flow (Vehicles/h)
UnstableStable
Speed decreases as
density increases.
This is not intuitive.
Optimum flow at
speed 60 and
density 250.
Neither MAXED!
How does this apply to software?
• 𝐹𝑙𝑜𝑤 = 𝑆𝑝𝑒𝑒𝑑. 𝐷𝑒𝑛𝑠𝑖𝑡𝑦
• Velocity = Throughput = Flow (avg # features delivered per week)• WIP = Density (avg # features started but not completed)
• 𝐶𝑦𝑐𝑙𝑒 𝑡𝑖𝑚𝑒 =1
𝑆𝑝𝑒𝑒𝑑(avg time it takes to complete a feature)
• 𝑇ℎ𝑜𝑢𝑔ℎ𝑝𝑢𝑡 =𝑊𝐼𝑃
𝐶𝑦𝑐𝑙𝑒 𝑇𝑖𝑚𝑒(aka Little’s Law)
𝑽𝒆𝒍𝒐𝒄𝒊𝒕𝒚 =𝑨𝒗𝒈 𝒇𝒆𝒂𝒕𝒖𝒓𝒆𝒔 𝒊𝒏 𝒑𝒓𝒐𝒈𝒓𝒆𝒔𝒔
𝑨𝒗𝒈 𝒕𝒊𝒎𝒆 𝒕𝒐 𝒄𝒐𝒎𝒑𝒍𝒆𝒕𝒆 𝒂 𝒇𝒆𝒂𝒕𝒖𝒓𝒆
• r = -1% per week (decay rate)
• t = 104 weeks/2 years (time in weeks)
This gives us
• 34% of original
• Degraded 66% over 2 years!
Is this how technical debt behaves?
𝒆𝒓𝒕
• r = 1% per week (improvement rate)
• t = 104 weeks/2 years (time in weeks)
This gives us
• 294% improvement over 2 years!
𝑰𝒎𝒑𝒓𝒐𝒗𝒆𝒎𝒆𝒏𝒕 = 𝒆𝒓𝒕
Simplify by removing dependencies
Go slow to go fast
Remove congestion to flow
Continuous improvement compounds