layout: true name: titleslide class: center, middle .footnote[ ###
@schmonz
[schmonz.com/talk
/2020-minispa](https://schmonz.com/talk/2020-minispa/) ####
#BCSMiniSPA
] --- layout: true name: footnotelinks .left-column[ .footnote[ ###
@schmonz
[schmonz.com/talk
/2020-minispa](https://schmonz.com/talk/2020-minispa/) ####
#BCSMiniSPA
] ] --- template: titleslide # Strangle Your Legacy Code
## Amitai Schleier ??? 1. Press 'C' to clone and move it to projector 2. Press 'P' to show these here presenter notes #### How to introduce the problem - Responsible for production email service - Keep having to extend it (business, regulatory requirements) - Look at ofmipd code - On my 20% time, I had an idea for how to make development easier, cheaper, safer - Run ofmipd - Run ofmipd behind env AUTHUP_USER=tim fixsmtpio - Note the differences? - We're going to do the same kind of thing, in Python - Let's run it and say "WORD UP" to the server - See how that works - Okay, let's make a new test pass --- layout: false template: footnotelinks .right-column[ # Goals For This Session ## 1. Introduction to Strangler ## 2. Develop in a real Strangler ## 3. Collect learnings ] --- .right-column[ # 0. Code of Conduct ## [spaconference.org/spa2020
/code-of-conduct.html](https://www.spaconference.org/spa2020/code-of-conduct.html) ## Remind ourselves how we want to behave ## Like TDD, declaring our intentions helps us live up to them ] --- .right-column[ # 1. Introduction to Strangler > "One of the natural wonders of [the Queensland coast] are the huge strangler figs. > They seed in the upper branches of a tree and gradually work their way down the tree until they root in the soil. > Over many years they grow into fantastic and beautiful shapes, meanwhile strangling and killing the tree that was their host." > > —[Martin Fowler](https://www.martinfowler.com/bliki/StranglerFigApplication.html) ] --- .right-column[ # 1. Introduction to Strangler ## Lower cost than Infinite Refactoring ## Lower risk than The Big Rewrite ] --- .right-column[ # 2. Develop in a real Strangler ## We're responsible for AcmeCo's email service ## Well-architected but idiosyncratic 1998 C ## We've happily invested a lot in it ## Could marginal cost of features be lower? ] --- .right-column[ # 2. Develop in a real Strangler ## To the IDE! ] --- .right-column[ # 3. Learnings: Use cases ## Monolith -> microservices ## Switch programming language ## Add logging/telemetry/visibility ## Eventually retire original system ## Or just gradually shift focus away ] --- .right-column[ # 3. Learnings: Techniques ## First deploy: no visible change ## Data persistence: reuse legacy layer or route around it ## Migrate feature: call both impls, log diffs ## New feature: ship under feature flag ## Incrementally delete strangled code and data ] --- .right-column[ # 3. Learnings: Risks ## First deploy is visible ## Data accessed and/or stored two ways ## Architecture gets complexicated ## Old metaphors persist in new code ## Old skills create new legacy code ## Original goals forgotten over the years ] --- .right-column[ # Resources ## [SMTP Strangler](https://github.com/schmonz/smtp-strangler/tree/minispa2020) (github.com) ## [Strangler Application](https://www.martinfowler.com/bliki/StranglerFigApplication.html) (martinfowler.com) ## [Legacy Code Rocks](https://www.legacycode.rocks) (legacycode.rocks) ## [Mob Programming Guidebook](http://www.mobprogrammingguidebook.com) (mobprogrammingguidebook.com) ## [Mob Programming RPG](https://github.com/willemlarsen/mobprogrammingrpg) (github.com) ] --- .right-column[ # Agile in 3 Minutes ##
agilein3minut.es
> "Before Agile in 3 Minutes, I couldn't get my team to have a > conversation about important topics. Now I have to timebox it."
-
8: Care
-
32: Mob
] --- .right-column[ # Agile in 3 Minutes: The Book ## [leanpub.com/agilein3minutes
/c/minispa20](https://leanpub.com/agilein3minutes/c/minispa20) The simplest _essays_ that could possibly work. Lowest allowable price on Leanpub, today! ] --- template: titleslide # Strangle Your Legacy Code
## [Amitai Schleier](https://latentagility.com)