Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Legacy codes
Search
Kuncara Adi Nugraha
April 01, 2016
Programming
3.2k
0
Share
Legacy codes
What's legacy codes? What should we do with it?
Kuncara Adi Nugraha
April 01, 2016
More Decks by Kuncara Adi Nugraha
See All by Kuncara Adi Nugraha
Recap of Dicoding Events : Continuous Quality and Test Automations
lagilaper
0
310
Metrics and Monitoring
lagilaper
0
71
Agile Retrospective
lagilaper
0
190
Culture Test
lagilaper
0
200
Introduction to Vagrant and Docker
lagilaper
0
99
Recap of Jordan DeaMattson TechTalk
lagilaper
0
370
Other Decks in Programming
See All in Programming
2026_04_15_量子計算をパズルとして解く
hideakitakechi
0
120
Claude Code × Gemini × Ebitengine ゲーム制作素人WebエンジニアがGoでゲームを作った話
webzawa
0
160
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
120
SkillがSkillを生む:QA観点出しを自動化した
sontixyou
6
3.5k
AI時代のPhpStorm最新事情 #phpcon_odawara
yusuke
0
230
AI-DLC Deep Dive
yuukiyo
9
4.8k
Oxlintとeslint-plugin-react-hooks 明日から始められそう?
t6adev
0
290
Running Swift without an OS
kishikawakatsumi
0
850
mruby on C#: From VM Implementation to Game Scripting (RubyKaigi 2026)
hadashia
2
750
AIを導入する前にやるべきこと
negima
2
270
PHPer、Cloudflare に引っ越す
suguruooki
1
110
第3木曜LT会 #28
tinykitten
PRO
0
120
Featured
See All Featured
WENDY [Excerpt]
tessaabrams
10
37k
Unsuck your backbone
ammeep
672
58k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
37
6.4k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.1k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
190
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
180
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
140
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
10
1.1k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.9k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
530
Transcript
Legacy Code Sleman, April 1st, 2016
What is legacy code? Code we’ve gotten from somewhere else
Demoralising code (big ball of mud) Code without unit tests
None
Characteristics Poor Architectures Without tests Poor written documentation Oral documentation
IT’S WORKING!!!
IF IT’S WORKING, THEN WHY CHANGE IT ???
Reasons to change Legacy Code Kill some BUGS! Add new
FEATURES Do some OPTIMISATIONS Add new automations things ( tests, scaling, etc)
None
Reasons not to change Legacy Code It looks ugly I
would like to see nicer code I want to use new shiny tools ….
What do we do? REWRITE?
BOOOOMMMM!!!
STOP!! DON’T REWRITE It takes time Need business analysis Features
will keep coming Breeding new bugs
Working Code is OK
What do we do? You can rewrite but you cannot
rewrite all Fight temptations to refactor a lot of codes DO IT SLOWLY AND CALMLY!!
2 Kinds of Refactoring Edit and Pray Cover and Modify
Edit and Pray Steps Find boundaries Discover the codes Refactor
/ Rewrite Run it and do smoke tests Pray that everything is okay
Cover and Modify Steps Find boundaries Discover the code Start
write tests around the to-be- refactored code Do refactor / rewrite Tests and ensure its working
Find Boundaries Act at one part of code at a
time Domains FTW
Discover the Code Read documentations Interview previous developers Read the
codes Try the codes
Prepare and Write Tests Surround it with tests ( integration,
GUI, unit tests, exploratory tests ) Testing is an investment
Write Code to make it Pass! SELF EXPLANATORY! ^_^
THANKS!!