Top Banner
Being eective with legacy projects Kons tantin Kudryashov | @everzet
72

Being effective with legacy projects

Jan 07, 2017

Download

Technology

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Being effective with legacy projects

Being effective

with legacy projectsKonstantin Kudryashov | @everzet

Page 2: Being effective with legacy projects

What are the two hardest problems in

software development?

Page 3: Being effective with legacy projects

What are the two hardest problems in software development?

1. Order of arguments in string and array functions

2. Which line do you put an opening bracket on

Page 4: Being effective with legacy projects

What is a good software design?

Page 5: Being effective with legacy projects

A software design is contextual to the people that use and

produce it

Page 6: Being effective with legacy projects

A good design is a design that supports

people interacting with it

Page 7: Being effective with legacy projects

Any design is a good design in a system that nobody uses or

develops

Page 8: Being effective with legacy projects

What are the two hardest problems in software development?

1. Making sure users keep using it

2. Making sure developers keep developing it

Page 9: Being effective with legacy projects

Legacy

Page 10: Being effective with legacy projects

Technical debt

Page 11: Being effective with legacy projects

3 analogies

Page 12: Being effective with legacy projects

Restaurant kitchen

Page 13: Being effective with legacy projects

Tetris

Page 14: Being effective with legacy projects

Broken windows theory

Page 15: Being effective with legacy projects

How do we get a legacy problem?

Page 16: Being effective with legacy projects

How do we get a legacy problem?

1. Users want the software to change

2. Developers want to change the software

3. Constantly

Page 17: Being effective with legacy projects

Legacy is a side-effect of a constant use and

adaptation

Page 18: Being effective with legacy projects

In other words...

Page 19: Being effective with legacy projects
Page 20: Being effective with legacy projects
Page 21: Being effective with legacy projects
Page 22: Being effective with legacy projects

The system without a legacy problem is the system that is not actively used

Page 23: Being effective with legacy projects

Every mature business has a legacy problem

Page 24: Being effective with legacy projects

Greenfield does not exist in universes where Excel is invented

1paraphrasing Alberto Brandolini

Page 25: Being effective with legacy projects

Taking control of legacy

Page 26: Being effective with legacy projects

A technical problem

Page 27: Being effective with legacy projects

How do we get a legacy problem?

1. Users want the software to change

2. Developers want to change the software

3. Constantly

Page 28: Being effective with legacy projects

People want change

Page 29: Being effective with legacy projects

A technical problem

Page 30: Being effective with legacy projects

Legacy is a human, not a technology

problem

Page 31: Being effective with legacy projects

You don't deal with legacy by rewriting your software

Page 32: Being effective with legacy projects

You deal with legacy by rewriting your

collaboration

Page 33: Being effective with legacy projects

Deliberate Discovery

Page 34: Being effective with legacy projects

Dealing with legacy in 6 steps

1. Technology Context

2. Business Context

3. Constraints

4. Risk Areas

5. Changing the way we change the software

6. Separating commodity logic from domain logic

Page 35: Being effective with legacy projects

Step 1Technology Context

Page 36: Being effective with legacy projects

Visualise the insight

Page 37: Being effective with legacy projects
Page 38: Being effective with legacy projects

Step 2Business Context

Page 39: Being effective with legacy projects

Get access to analytics and business monitoring tools

Page 40: Being effective with legacy projects

People controlling data are the people controlling the

direction of change

Page 41: Being effective with legacy projects

Get access to stakeholders

Page 42: Being effective with legacy projects
Page 43: Being effective with legacy projects

Step 3Constraints

Page 44: Being effective with legacy projects

Sit with operators

Page 45: Being effective with legacy projects

Analyse customers and their journeys

Page 46: Being effective with legacy projects

Research the bug tracker

Page 47: Being effective with legacy projects

Step 4Map Risk Areas

Page 48: Being effective with legacy projects

Highlight risk areas on the map using discovered

4 Real Data

4 Business Objectives

4 Usage Constraints

4 Technical Constraints

4 Bugs

Page 49: Being effective with legacy projects

Step 5Change the way we change the

software

Page 50: Being effective with legacy projects

"We must return products back to

stock during refund"

Page 51: Being effective with legacy projects

5.1: Categorise the change

1. Is it a mission-critical change?

2. Is it a change in a mission-critical area?

3. Will this change affect any area of risk?

Page 52: Being effective with legacy projects

5.2: Discover the current behaviour

1. What does this thing do?

2. What if it suddenly stops doing it?

3. How would you know if it doesn't work?

4. How would you know if it does?

Page 53: Being effective with legacy projects

Feature: Returned items go back to stock In order to keep track of stock As a store owner I want to add items back to stock when they are returned

Scenario: Refunded items are returned to stock

Scenario: Replaced items are not returned to stock

Page 54: Being effective with legacy projects

Feature: Returned items go back to stock In order to keep track of stock As a store owner I want to add items back to stock when they are returned

Scenario: Refunded items are returned to stock

Scenario: Replaced items are not returned to stock

@legacy Scenario: Item refunded with in-shop credits

@legacy Scenario: Item refunded to bank account

@legacy Scenario: Item refunded to PayPal account

Page 55: Being effective with legacy projects

5.3: Protect the current behaviour

1. Cover @legacy behaviour in an end-to-end fashion

2. Make sure that scenarios are green

3. Refactor code to make isolated system-testing possible

4. Convert scenarios to isolated system-tests

5. Remove @legacy tag

Page 56: Being effective with legacy projects

5.4: Make the change

1. Automate the new scenarios as isolated system-tests

2. Push the logic down to the unit level with unit-tests

3. Make unit-tests green

4. Make scenarios green

Page 57: Being effective with legacy projects
Page 58: Being effective with legacy projects

Step 6Separate commodity logic from

domain logic

Page 59: Being effective with legacy projects

Separate commodity logic from domain logic

4 Not every sub-system needs to change

4 Different sub-systems will change at different cadence

4 The more aligned our changes are to our objectives, the smaller they would be

Page 60: Being effective with legacy projects

Rewrites are rarely effective, because businesses rarely want to change the entire system

Page 61: Being effective with legacy projects

A full-system rewrite is an admission of

defeat

Page 62: Being effective with legacy projects

We're not stuck with unsustainable codebase

Page 63: Being effective with legacy projects

We're stuck with unsustainable approach to it

Page 64: Being effective with legacy projects

If we stop running from legacy as if it was a plague...

Page 65: Being effective with legacy projects

... and start looking at it as a normal

phase in a system life

Page 66: Being effective with legacy projects

Everything that is possible in greenfield becomes possible in

legacy

Page 67: Being effective with legacy projects
Page 68: Being effective with legacy projects

Behaviour Driven Development

Page 69: Being effective with legacy projects

Behaviour Driven Development

in legacy

Page 70: Being effective with legacy projects

Being effective

with legacy projects

Page 71: Being effective with legacy projects

Delivering outcomes, not software

Page 72: Being effective with legacy projects

4 Rate talk: https://joind.in/talk/6b377

4 Join us: http://bit.ly/inviqa-careers

4 Get help: http://bit.ly/inviqa-contact