Why choose legacy?

A presentation at PHPCon PL 2019 in November 2019 in Szczyrk, Poland by Paweł Lewtak

Slide 1

Slide 1

Why choose legacy? Paweł Lewtak @pawel_lewtak

Slide 2

Slide 2

Slide 3

Slide 3

Code without tests Michael Feathers

Slide 4

Slide 4

Nobody sets out to write legacy code Rachel Willmer

Slide 5

Slide 5

Slide 6

Slide 6

Slide 7

Slide 7

Slide 8

Slide 8

Legacy != your enemy

Slide 9

Slide 9

Slide 10

Slide 10

If you look at your code written half a year ago and you wouldn’t change a thing, it means you didn’t learn in last half a year.

Slide 11

Slide 11

Butterfly Effect

Slide 12

Slide 12

Slide 13

Slide 13

Slide 14

Slide 14

No tests

Slide 15

Slide 15

No documentation

Slide 16

Slide 16

Slide 17

Slide 17

Your code = your responsibility

Slide 18

Slide 18

Rewrite or refactor?

Slide 19

Slide 19

Start from scratch

Slide 20

Slide 20

Refactoring

Slide 21

Slide 21

Plan

Slide 22

Slide 22

We’re programmers. Programmers are, in their hearts, architects, and the first thing they want to do when they get to a site is to bulldoze the place flat and build something grand. Joel Spolsky

Slide 23

Slide 23

When we refactor, we should have tests. To put tests in place, we often have to refactor. Michael Feathers

Slide 24

Slide 24

Pareto Rule

Slide 25

Slide 25

Mikado Method

Slide 26

Slide 26

Strangler pattern

Slide 27

Slide 27

Slide 28

Slide 28

Slide 29

Slide 29

Slide 30

Slide 30

The journey of a thousand miles begins with a single step Confucius

Slide 31

Slide 31

Remember, code is your house, and you have to live in it. Michael Feathers

Slide 32

Slide 32

Recommended books

Slide 33

Slide 33

Slide 34

Slide 34

Thank you