Slide 1

Slide 1 text

@fernando_cejas TECHNICAL DEBT GURU LEVEL

Slide 2

Slide 2 text

I am Fernando Cejas I am here because I love to share experiences and disasters I have made in my professional life. × Twitter: @fernando_cejas × Github: @android10 × Blog: fernandocejas.com Hello!

Slide 3

Slide 3 text

“BAD CODE IS ALWAYS imprudent”

Slide 4

Slide 4 text

In an ideal world...every project... Finished on time Clean code On budget

Slide 5

Slide 5 text

Even better… our perfect project... Additional features Tested twice ???

Slide 6

Slide 6 text

Level

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

FACT: OUR SOFTWARE IS TERRIBLE!!! And that does not make it special. All software is terrible, and yes, we know it is definitely TRUE

Slide 9

Slide 9 text

WHAT IS LEGACY CODE?

Slide 10

Slide 10 text

Code without tests Code that someone else has written ANTI-PATTERNS No separation of concerns Code difficult to change Difficult to understand

Slide 11

Slide 11 text

WHAT IS RECKLESS DEBT?

Slide 12

Slide 12 text

Code that violates design principles Without even a short term payoff

Slide 13

Slide 13 text

WHAT IS TECHNICAL DEBT?

Slide 14

Slide 14 text

It is a metaphor doing things the quick and dirty way sets us up with a technical debt Incurs INTEREST PAYMENT which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice.

Slide 15

Slide 15 text

Technical debt is the additional effort and work REQUIRED to complete any software development.

Slide 16

Slide 16 text

“TEchnical debt is reflected on legacy code”

Slide 17

Slide 17 text

Real case scenario: ADDING A NEW FEATURE

Slide 18

Slide 18 text

THE “EASY” WAY: Built up with messy design and code, will get you there faster.

Slide 19

Slide 19 text

THE “HARD” WAY: Built up with cleaner design and code, that takes a lot more time

Slide 20

Slide 20 text

“Accept some technical debt for tactical reasons”

Slide 21

Slide 21 text

DETECTING TECHNICAL DEBT

Slide 22

Slide 22 text

Level

Slide 23

Slide 23 text

STATIC CODE ANALYSIS

Slide 24

Slide 24 text

Static CODE ANALYSIS: CODE METRICS Cyclomatic complexity complexity of classes and methods by analyzing the number of functional paths in the code Code coverage A lack of unit tests is a source of technical debt. This is the amount of code covered by unit tests. Bug count As technical debt increases, quality of the software decreases. The number of bugs will likely grow. Number of rule violations Number of rules violated from a given set of coding conventions. SQALE-rating Broad evaluation of software quality. The scale goes from A to E, with A being the highest quality.

Slide 25

Slide 25 text

Level

Slide 26

Slide 26 text

TECH DEBT RADAR

Slide 27

Slide 27 text

TECH DEBT RADAR +PAIN -PAIN +Dev TIME -Dev TIME DI Login Player UI Layer Photos Share Data Layer Search

Slide 28

Slide 28 text

Level

Slide 29

Slide 29 text

BEHAVIORAL CODE ANALYSIS

Slide 30

Slide 30 text

“TEchnical debt is reflected on legacy code”

Slide 31

Slide 31 text

“TEchnical debt is NOT ONLY reflected on legacy code”

Slide 32

Slide 32 text

BEHAVIORAL CODE ANALYSIS: 1. Consider the organization and people side of the system. 2. This gives you valuable information that is invisible in the source code itself, such as measures of team autonomy and off-boarding risks. 3. How developers interact with the code.

Slide 33

Slide 33 text

behavioral CODE ANALYSIS: METRICS Hotspots Hotspots identify the modules with most development activity -- often technical debt. Code biomarkers Code Biomarkers aim to indicate specific properties at very low code level. Refactoring Targets Prioritize improvements to these files since they have the highest technical debt interest rate. Change coupling Change coupling helps us uncover implicit change patterns in our code.

Slide 34

Slide 34 text

EXTRA BALL!!

Slide 35

Slide 35 text

PAYING TECHNICAL DEBT

Slide 36

Slide 36 text

Paying debt at team level: 1. Prioritize and keep track of it. 2. Allocate time to address it. 3. Technical Debt days.

Slide 37

Slide 37 text

Paying debt at COMPANY level: 1. Educate people about its existence. 2. Make it transparent. 3. Communicate it properly.

Slide 38

Slide 38 text

Paying debt at COMPANY level: COST OF DELAY This (mostly manual) metric helps to make visible how much time a team loses due to technical debt.

Slide 39

Slide 39 text

SOME DAYS YOU CANNOT GET RID OF A BOMB...

Slide 40

Slide 40 text

No content

Slide 41

Slide 41 text

THANKS! Any questions? You can find me at @fernando_cejas (twitter) & @android10 (github)

Slide 42

Slide 42 text

Credits Special thanks to all the people who made and released these awesome resources for free: × Presentation template by SlidesCarnival × Photographs by Startupstockphotos