Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Legacy codes
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Kuncara Adi Nugraha
April 01, 2016
Programming
3.2k
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
91
Agile Retrospective
lagilaper
0
210
Culture Test
lagilaper
0
220
Introduction to Vagrant and Docker
lagilaper
0
120
Recap of Jordan DeaMattson TechTalk
lagilaper
0
380
Other Decks in Programming
See All in Programming
残高管理から台帳サービスへの進化
artoy
1
210
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
120
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
420
GraphQL の onError と Nullability のこれから
quramy
0
180
npm との違いを手がかりにGo の依存管理を理解したい
optim
0
1.1k
オーケストレーション記述言語 Katari
yukikurage
0
200
[2026-10-14](C)Re:ゼロから始める異世界生活〜始まりの終わりと終わりの始まり〜
tosite
0
160
AWS CDKのカスタムリソースでContinuum(旧Security Agent)を実装した話 | Implementing Continuum (formerly Security Agent) via AWS CDK Custom Resource
akihisaikeda
2
170
Web Framework Benchmark Battle 2026, Any%
a_matsuda
3
3k
PyConTW 2026 - AI Coding 不只是工具升級, 區域醫院醫療資訊系統協作開發與資訊團隊轉型實踐
cclai999
0
190
Railsバージョンを4倍にした話
optim
0
700
Jetpack Compose Mechanisms
skydoves
3
870
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.8k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
3.1k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
530
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
610
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
68
59k
How to Talk to Developers About Accessibility
jct
2
590
Optimising Largest Contentful Paint
csswizardry
37
4k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
500
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
230
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!!