Top Banner
Best Practices for Maintaining Legacy Projects The Immortality of Legacy Projects Dalia Simons, Server Architect @SimonsDalia [email protected]
27

The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Jan 08, 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: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Best Practices for Maintaining Legacy Projects

The Immortality of Legacy Projects

Dalia Simons, Server Architect

@[email protected]

Page 2: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Hi.o Server code is my passion and professiono Have become (not willingly) a legacy projects

expert

MY LEGACY PROJECT

The HTML Mobile Project

Page 3: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Where do legacy projects come from?

01

http://memesvault.com/facepalm-meme-gif/

Page 4: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

An Idea

For a new project

A project is not born a legacy!

Time

New Features

The projectextends and becomes profitable.

www.clipartpanda.com | www.clker.com | affordableengagement.com

A New Shiny Project

Starts gaining customers

…and Here we Are.

Page 5: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

How did we get here?

A New Shiny Project

Starts gaining customers

…and Here we Are.

Page 6: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

A Shift in Technology

CASE STUDY

How we moved to

Obsolete technology

Page 7: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Flash editor => html 5 editor

Page 8: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Bad-Written Projects

Projects that are:

● Not fully tested

● Not refactored

● Complicated code

● Spagetti code

● Can’t add new features / components

CASE STUDY

How we moved to

Page 9: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Html editor => New html editor

Page 10: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Customer growth drives change

CASE STUDY

How we gave up

Non functional concerns

● Load

● Scalability

● Architectural change

Page 11: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

We decide to rewrite or deprecated

…and Here we Are.

rowdygoddess.com

● Legacy projects are kept alive (we have paying customers to support)

We are now the proud owners of a legacy project.

● If we rewrite, why not migrate?

Page 12: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Cheer up! You can do it smart.

02

https://www.pinterest.com/jennn1428/stick-figures/

Page 13: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Where to start from

worldartsme.com | http://www.istockphoto.com/illustrations/cleaning | www.freeimages.com | www.supercoloring.com

Rewrite? Refactor? Maintenance? Do Nothing?

Page 14: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Doing nothing is rotting

If it’s not broken, don’t fix it

It’s in production, let’s leave it there

Page 15: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

A project is not an island

A project we interact with changes its API

A 3rd party library has an important security fix

You find a bug that requires urgent fixing

External technologies might by upgraded across the co’

https://pixabay.com/en/spacecraft-rocketship-spaceship-303592/

Page 16: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Maintenance (balance) is the key

http://www.istockphoto.com/vector/scales-balance-drawing-gm516375115-48738346

(costly) technical debt

(harmful) decay

Page 17: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Own you code

https://s-media-cache-ak0.pinimg.com/236x/5b/ae/6f/5bae6fbd9f174dcc1bbd1d9a277fd3ce.jpg

Assign an owner for each project

Page 18: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Rome wasn’t built in a day

http://clipartfreecollection.top/openphoto.php?img=cliparts/rome-clipart/cliparti1_rome-clipart_01.jpg

Learning a new project takes time

Page 19: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Keep everything under CI

#1

4 rules to stayin’ alive

● Build is always green

● Deploy to prod regularly (automatic email)

Page 20: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Keep up to date with dependencies

#2

4 rules to stayin’ alive

Keep everything under CI

● As long as they don’t break compatibility

● Don’t freeze dependencies (security updates, bug fixes)

● Build is always green

● Deploy to prod regularly (automatic email)

Page 21: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

CASE STUDY

Frameworks

End-to-end services to all Server projects

● Network calls● Security Changes made

over time left some code used only by legacy projects

We isolated that code into a separate project, and found some interesting insights

Page 22: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Quarantine your dead code

#3

4 rules to stayin’ alive

Keep everything under CI

Keep up to date with dependencies● As long as they

don’t break compatibility

● Don’t freeze dependencies (security updates, bug fixes)

● Build is always green

● Deploy to prod regularly (automatic email)

● Don’t pollute other projects!

● Code that exists - will be used

Page 23: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

Small steps are the key

#4

4 rules to stayin’ alive

Keep everything under CI

Keep up to date with dependencies● As long as they

don’t break compatibility

● Don’t freeze dependencies (security updates, bug fixes)

● Build is always green

● Deploy to prod regularly (automatic email)

Quarantine your dead code● Don’t pollute other

projects!

● Code that exists - will be used

● Remove deprecations

● Improve tests

● Small refactors

● Remove dead code

Page 24: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

The boy scout rule

http://www.tocolor.pics/boy-scouts-taking-an-oath-coloring-pages/boy-scouts-taking-an-oath-coloring-pages-2/

Always keep the campground cleaner than you found it.

Page 25: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

‘Till When?

Legacy projects are the most profitable to the company

They make money, while you spend $0 on development

EOL

Technology EOL coming up

No longer profitable

When to migrate

Page 26: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

http://noliklechevalier.tumblr.com/post/132110537448/4-my-graffiti-boyz-bombing-spraying-art

Legacy projects are like your marriage after 10 years.

A little maintenance, done regularly, can go a long way.

Page 27: The Immor(t)ality of Legacy Projects - Dalia Simons, Wix - DevOpsDays Tel Aviv 2016

This is where you are going to present your final words.This slide is not meant to have a lot of text.Thank You!Any Questions?Dalia Simons

[email protected]