Profile picture
Katie Womersley @katie_womers
, 34 tweets, 24 min read Read on Twitter
Now for Legacy Code - Big rewrite, or progressive rejuvenation? from @ramtop at #LeadDevLondon 🎉
This talk has it's own hashtag! #LegacyIsGood 🤩
"How many of you work on a legacy system?" (Literally every hand in this auditorium goes up!) @ramtop #LeadDevLondon
"I work at banks, with systems so complex sometimes nobody really knows how they work. A friend of mine calls legacy systems just last year's system. They hacked it together quickly, and it immediately became a liability" @ramtop #LeadDevLondon
"Developers often call a new project 'greenfrield', and it feels better than what, a brownfield project? So what is legacy?" @ramtop #LeadDevLondon
"A legacy system is hard to maintain, expand and improve. But also, it's making money, it's a system core to the business. A typical factor is a very good design, and it was *too good*. It got overloaded with use cases. But still works" @ramtop #LeadDevLondon
"A characteristic of legacy is a constant state of emergency. I had this team, and we had levels 1-4 of emergency. Level 1 would be in a national newspaper. We had some level of emergency every week. It just got normal" @ramtop #LeadDevLondon
"Also... we want to retire it, but who is using it still? I saw downstream applications using a system once a year. After a year of taking it offline, a year later that system had a problem" @ramtop #LeadDevLondon #legacyisgood
"So, technical debt... how do you repay it? Just fix it quickly! (the slideshow shows a race car with loads of duct tape, this was a real car). Solution 1 is a bit shortsighted - you get the law of broken windows" @ramtop #LeadDevLondon #legacyisgood
"An old building, no-one inside, people break a window. Once you see a broken window, in a few weeks they're all broken. There's a perception no-one cares, this is abandoned. It's the same with code" @ramtop #LeadDevLondon #legacyisgood
"If no-one cares, you say ok, so even if it's really bad, even if we know we'll regret it, just copy-paste that code, whatever, fix it" @ramtop #LeadDevLondon #legacyisgood
"Solution 2: Let's Rewrite!!! (image of a bridge unfinished over water, and we all laugh). I saw a rewrite where the first commit was older than the newest grad on the team." @ramtop #LeadDevLondon #legacyisgood
"So why did that happen? You see the old system and say ok come on, if those guys who wrote this terrible code could make it work it must be very easy. But there's a lot of experience inside this code. It has survived a lot of battles" @ramtop #LeadDevLondon #legacyisgood
"You make a lot of assumptions and they're not working, and then you usually end up with one team doing maintenance and then a new person doing this rewrite with no experience about the company and the history of the old system" @ramtop #LeadDevLondon #legacyisgood
"I'm not saying it NEVER works. But a lot of cases, propably at the end there's then also the data migration no-one considers. It can fail the whole project. They realize they can't migrate that data" @ramtop #LeadDevLondon #legacyisgood
"'Legacy code often differes from it's suggested alternative by actually working and scaling - Bjarne Stoustrup'" @ramtop #LeadDevLondon #legacyisgood
"A new inspiration for me is Kintsugi. Japanese art of fixing pottery with lacquer. The emperor said, I want a glaze that doesn't hide the fact that this pot was broken. With kintsugi, they use gold leaf to make it clear it was broken" @ramtop #LeadDevLondon #legacyisgood
"The way we look at legacy, there must be another way. The strangler pattern, or the progressive rewrite. Martin Fowler: the point of this is to REDUCE RISK" @ramtop #LeadDevLondon #legacyisgood
"A strangler rewrite: write it on-top of the existing application, and slowly if completely substitutes the old system. For example, you have a client side app is C#. You decide to move to Scala and JS" @ramtop #LeadDevLondon #legacyisgood
"So you just open a new port and you keep the backend and slowly start using JS on frontend. You do it one piece at a time and slowly you can completely rewrite the application" @ramtop #LeadDevLondon #legacyisgood
"A progressive rewrite can take longer than estimated for the full rewrite, but still probably faster than what the actual time needed is, and you can be more confident you'll finish in time" @ramtop #LeadDevLondon #legacyisgood
"With code quality, what it means - we have that wrong. You probably hear about clean code, TDD, functional programming, design patterns... which is great. But those are tools. That is not quality" @ramtop #LeadDevLondon #legacyisgood
"Using a technique doesn't mean you have quality code. That is crazy. The measure that really matters is the time it takes to implement a new feature. If you can implement a new feature in a fixed time, you have quality" @ramtop #LeadDevLondon #legacyisgood
"Same with bugs. A system where you can always fix bugs in a few hours, or days. If you are in that position, you have code quality. It doesn't matter what technique you used to go there" @ramtop #LeadDevLondon #legacyisgood
"So, architecture. Here's a nice house (on screen). But it's perfect as-is. You can't really add or remove. It's new and shiny, but also if we leave it, it will become terrible" @ramtop #LeadDevLondon #legacyisgood
"Here is a Japanese house. It's different. The idea is we need something that will keep it's personality over time. It looks it's best after a few years. Materials naturally replaced over time. It's modular. You can move it" @ramtop #LeadDevLondon #legacyisgood
"The Japanese house is what we should emulate in software architecture. Everything we change quickly. Modularity is the main point: program in independent, interchangeable modules" @ramtop #LeadDevLondon #legacyisgood
"A modular architecture means you won't have this big problem again with legacy. Modules can be internal inside a monolith. You can have services. You can also do inter-depentend services and that is NOT modular" @ramtop #LeadDevLondon #legacyisgood
"You must be able to change any module independently. It's simple, but it's not easy. Modularity gives you flexibility" @ramtop #LeadDevLondon #legacyisgood
"A code rejuvenation is not a refactor. You are improving code, and may change a bit, using modularity. I have some YouTube tech talks on this" @ramtop #LeadDevLondon #legacyisgood
"First step, simplify onboarding. How long does it take for a new dev to commit something? It should be hours - not days" @ramtop #LeadDevLondon #legacyisgood
"Second, wrap it in end to end tests. Not just unit tests. You need something quickly to be sure the application is working. Sometimes you feel testing is not adding value, but it's a lot of value to the business" @ramtop #LeadDevLondon #legacyisgood
"Having tests reduces risk. It's important for the business. If you have tests you can split the code into a module" @ramtop #LeadDevLondon #legacyisgood
"You can also check out some exercises on my GitHub. Legacy rejuvenation can be really fun. And - don't throw away your old code - there is value there!" @ramtop #LeadDevLondon #legacyisgood
Missing some Tweet in this thread?
You can try to force a refresh.

Like this thread? Get email updates or save it to PDF!

Subscribe to Katie Womersley
Profile picture

Get real-time email alerts when new unrolls are available from this author!

This content may be removed anytime!

Twitter may remove this content at anytime, convert it as a PDF, save and print for later use!

Try unrolling a thread yourself!

how to unroll video

1) Follow Thread Reader App on Twitter so you can easily mention us!

2) Go to a Twitter thread (series of Tweets by the same owner) and mention us with a keyword "unroll" @threadreaderapp unroll

You can practice here first or read more on our help page!

Did Thread Reader help you today?

Support us! We are indie developers!

This site is made by just three indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member and get exclusive features!

Premium member ($3.00/month or $30.00/year)

Too expensive? Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal Become our Patreon

Thank you for your support!