Technical debt bankruptcy, Wednesday 21st January 2015

46
technical bankruptcy lukas oberhuber simply business

Transcript of Technical debt bankruptcy, Wednesday 21st January 2015

Page 1: Technical debt bankruptcy, Wednesday 21st January 2015

technical bankruptcy lukas oberhuber

simply business

Page 2: Technical debt bankruptcy, Wednesday 21st January 2015

who am i?

simply business

online insurance

290,000 policies

45 people on tech team

~60 developing products

~100,000 lines of code increasing rapidly

Page 3: Technical debt bankruptcy, Wednesday 21st January 2015

our story

new shareholder with little technology experience

had to explain replacing a 5 year old system: we couldn’t improve the

business anymore

in trying to explain, we had to understand tech debt and tech bankruptcy

(and they weren’t big fans of ‘the software is never done’)

Page 4: Technical debt bankruptcy, Wednesday 21st January 2015

our fix

old system took 1 week for rating change

new system 1 hour by product manager

Page 5: Technical debt bankruptcy, Wednesday 21st January 2015

conclusion

actual bankruptcy due to technical bankruptcy is likely high

examples

friendster

video management system at the bbc (cancelled)

new air traffic system in the usa

npfit healthcare software programme here at home

Page 6: Technical debt bankruptcy, Wednesday 21st January 2015

conclusion

i have equations can help us reason about

how much debt we are accumulating and paying off

how that increases the effort to create change

Page 7: Technical debt bankruptcy, Wednesday 21st January 2015

conclusion

same behaviours in business and organisations

examples

signal failures on the london tube poorly flushing toilets at simply business

non-earthquake safe bridges strikes

examples of bankruptcy

iraqi army garment factory that collapsed in

bangladesh

worldwide corruption

Page 8: Technical debt bankruptcy, Wednesday 21st January 2015

conclusion

everything will be couched as software

i will leave to you to transfer this to your domain

hints at the end of how to deal with tech debt

Page 9: Technical debt bankruptcy, Wednesday 21st January 2015

but first some definitions

Page 10: Technical debt bankruptcy, Wednesday 21st January 2015

definition of technical bankruptcy

economic cost of to change system exceeds needed return for most

changes

even if system is working and stable

implicit: change is needed

implicit: software is never done

Page 11: Technical debt bankruptcy, Wednesday 21st January 2015

the problem

usually recognised long after bankruptcy has occurred

it is too late to fix [imagine flossing your teeth vigorously when a root

canal is needed]

businesses fail because of it [example: friendster]

Page 12: Technical debt bankruptcy, Wednesday 21st January 2015

definition of technical debt

the work that hasn’t been done

difference between doing something properly and the less correct way it

was actually done

quantified by: amount of work left to correct the implementation vs

original implementation

not: every possible option that could be built

Page 13: Technical debt bankruptcy, Wednesday 21st January 2015

problem with technical debt

makes good solutions bad

increases cost of change

starts slowly and picks up speed

eventually, if not paid off, leads to tech bankruptcy

Page 14: Technical debt bankruptcy, Wednesday 21st January 2015

intuition around technical debt

principle needs to be paid off

interest accrues

how fast?

how bad?

Page 15: Technical debt bankruptcy, Wednesday 21st January 2015

definition of complexity

a unit of the final product

examples

tech

lines of code

rows in a database

function points

business/organisation/other

employees

paragraphs in laws

customers

Page 16: Technical debt bankruptcy, Wednesday 21st January 2015

caveat: it’s all a hypothesis

the equations and all else are hypotheses based on empirical,

mathematical information from similar or adjacent areas

this is primarily a thought experiment

therefore further investigation is definitely warranted

Page 17: Technical debt bankruptcy, Wednesday 21st January 2015

debt and complexity: two angles

complexity is the base

debt is the accelerant (makes it worse)

Page 18: Technical debt bankruptcy, Wednesday 21st January 2015

what does debt look like? the

evidence beyond simply business

debt makes good code bad; what does bad look like?

focusing on maintenance (not exactly the same as adding a line/unit), so

bear with the slight shift

credit: Capers Jones

http://www.compaid.com/caiinternet/ezine/capersjones-maintenance.pdf

Page 19: Technical debt bankruptcy, Wednesday 21st January 2015

leading

excellent quality control

very good code structure at the initial release

zero error-prone modules

very low bad-fix injection rate of 1% or less

result: maintenance costs can actually decline over the five year

ownership period

Page 20: Technical debt bankruptcy, Wednesday 21st January 2015

average

marginal quality control

reasonable initial code structure

one or two error-prone modules

an average bad-fix injection rate of about 7%

result: maintenance costs increase over a five-year period, but not at a

very significant annual rate

Page 21: Technical debt bankruptcy, Wednesday 21st January 2015

lagging

inadequate quality control

poor code structure

up to a dozen severe error-prone modules

significant bad-fix injection rates of about 20%

result: maintenance costs will become more expensive every year due to

entropy and the fact that the application never stabilises

Page 22: Technical debt bankruptcy, Wednesday 21st January 2015

maintenance conclusion

in the lagging scenario, ROI is negative in 3-5 years meaning the

system needs to be replaced; this is tech bankruptcy

leading scenario in contrast can have 20 - 30 years of positive ROI

Page 23: Technical debt bankruptcy, Wednesday 21st January 2015

an equation that can quantify

complexity and debt

complexity of a system

which equation is the right one?

acceleration of effort due to technical debt

we’ll be looking for the effort to add one unit of complexity

Page 24: Technical debt bankruptcy, Wednesday 21st January 2015

complexity of a system

Page 25: Technical debt bankruptcy, Wednesday 21st January 2015

options for complexity measures

intuition that complexity of adding a line of code is based on how many other lines of code are

affected

example

write tests

write line of code

change all other places (code or tests) that depend on or are affected by

repeat until finished

we are looking for the ideal (best case) scenario

n will be the amount of complexity

Page 27: Technical debt bankruptcy, Wednesday 21st January 2015

metcalfe’s law - this is a

stretch

value of the nextwork increases by the number of

nodes because they are connected

how does this apply?

more or less n ^ 2

imagine building every connection, not just using it

"Metcalfe-Network-Effect" by Woody993 at en.wikipedia - Transferred from en.wikipedia. Licensed under CC0 via Wikimedia Commons

- http://commons.wikimedia.org/wiki/File:Metcalfe-Network-Effect.svg#mediaviewer/File:Metcalfe-Network-Effect.svg

Page 29: Technical debt bankruptcy, Wednesday 21st January 2015

huge amount of work in software has been done to

compartmentalise to avoid systemic effects

object oriented programming

patterns

the concept of a function or

procedure

libraries of reusable code

layers (like the network layers)

interfaces

protocols

other domains

methodologies for executing organisation change

vast literature on how to run companies more

effectively

All of this allows for building larger and more

complex systems

• lines of code

• number of people

Page 30: Technical debt bankruptcy, Wednesday 21st January 2015

base (best case) complexity

good

log(n)

by decoupling and compartmentalising we reduce connections

when a line of code is inserted, it only affects a small part of the network

of connections

Page 32: Technical debt bankruptcy, Wednesday 21st January 2015

Text

Page 33: Technical debt bankruptcy, Wednesday 21st January 2015

technical debt

Page 34: Technical debt bankruptcy, Wednesday 21st January 2015

technical debt in complexity terms

tech debt takes log(n) of good code and makes it worse

Page 35: Technical debt bankruptcy, Wednesday 21st January 2015

does it accumulate quickly?

see problem, then act

two problems

it’s too late to brush and floss when the teeth are falling out

tech debt accumulates silently, in multiple ways, the slowdown that

results is gradual and then accelerates

Page 36: Technical debt bankruptcy, Wednesday 21st January 2015

does it accumulate quickly?

not noticed because decisions are made at multiple levels

there is a multiplier effect causing small concessions to add up quickly

example

management defers needed scope to gain speed

team cuts corners to hit deadlines

Page 37: Technical debt bankruptcy, Wednesday 21st January 2015

multiplier effect

management cuts scope team cut corners resulting debt

10%

(90% done right)

10%

(90% done right)

19%

(0.9 * 0.9 = 0.81)

20% 20% 36%

30% 30% 51%

50% 50% 75%

Page 38: Technical debt bankruptcy, Wednesday 21st January 2015

together: complexity and debt

log(n)

1

1 - debt

Page 39: Technical debt bankruptcy, Wednesday 21st January 2015

together: complexity and debt

log(n)

1

1 - debt

Page 40: Technical debt bankruptcy, Wednesday 21st January 2015

debt vs lines of code

Page 41: Technical debt bankruptcy, Wednesday 21st January 2015

productivity

Page 42: Technical debt bankruptcy, Wednesday 21st January 2015

next steps for the theory

investigation to prove equations are right

better ways to measure debt and complexity

Page 43: Technical debt bankruptcy, Wednesday 21st January 2015

what can you do?

if you aren’t scared yet…

otherwise…

symptoms: are you leading, average or lagging?

differences are easily visible

debt ratio needs to be low (but no need to know it exactly)

do things properly

i.e. peer reviews, formal controls, good structure

Page 44: Technical debt bankruptcy, Wednesday 21st January 2015

references Organisational change http://www.bristol.ac.uk/media-library/sites/cubec/migrated/documents/pr1.pdf

Groups and scale http://www.shirky.com/writings/group_enemy.html

Big O examples http://stackoverflow.com/questions/2307283/what-does-olog-n-mean-exactly

Godel, Escher, Bach; I Am A Strange Loop; Douglas Hofstadter

Capers Jones; Software Productivity Research Institute

Quality excellence has ROI > $15 for each $1 spent; SOFTWARE QUALITY IN 2012:A SURVEY OF THE STATE OF THE ART http://sqgne.org/presentations/2012-13/Jones-Sep-2012.pdf

http://www.compaid.com/caiinternet/ezine/capersjones-maintenance.pdf

http://insights.cermacademy.com/2012/05/preventing-software-failure-capers-jones-technologyrisk/

How To Measure Anything; Douglas Hubbard

"Metcalfe-Network-Effect" by Woody993 at en.wikipedia - Transferred from en.wikipedia. Licensed under CC0 via Wikimedia Commons - http://commons.wikimedia.org/wiki/File:Metcalfe-Network-Effect.svg#mediaviewer/File:Metcalfe-Network-Effect.svg

http://science.slc.edu/~jmarshall/courses/2002/spring/cs50/BigO/

http://stackoverflow.com/questions/2307283/what-does-olog-n-mean-exactly

http://stackoverflow.com/questions/2307283/what-does-olog-n-mean-exactly

Dunbar number http://en.wikipedia.org/wiki/Dunbar%27s_number

Estimates of projects http://www.isbsg.org/

Estimates of projects

http://www.isbsg.org/

Page 46: Technical debt bankruptcy, Wednesday 21st January 2015

This presentation was delivered

at an APM event

To find out more about upcoming events

please visit our website

www.apm.org.uk/events