Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Legacy codes
Search
Kuncara Adi Nugraha
April 01, 2016
Programming
0
3.2k
Legacy codes
What's legacy codes? What should we do with it?
Kuncara Adi Nugraha
April 01, 2016
Tweet
Share
More Decks by Kuncara Adi Nugraha
See All by Kuncara Adi Nugraha
Recap of Dicoding Events : Continuous Quality and Test Automations
lagilaper
0
300
Metrics and Monitoring
lagilaper
0
65
Agile Retrospective
lagilaper
0
170
Culture Test
lagilaper
0
190
Introduction to Vagrant and Docker
lagilaper
0
95
Recap of Jordan DeaMattson TechTalk
lagilaper
0
360
Other Decks in Programming
See All in Programming
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
120
チームをチームにするEM
hitode909
0
370
著者と進める!『AIと個人開発したくなったらまずCursorで要件定義だ!』
yasunacoffee
0
150
SwiftUIで本格音ゲー実装してみた
hypebeans
0
490
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
580
20251212 AI 時代的 Legacy Code 營救術 2025 WebConf
mouson
0
210
AtCoder Conference 2025「LLM時代のAHC」
imjk
2
570
FluorTracer / RayTracingCamp11
kugimasa
0
250
AI Agent Tool のためのバックエンドアーキテクチャを考える #encraft
izumin5210
3
930
組み合わせ爆発にのまれない - 責務分割 x テスト
halhorn
1
160
Microservices rules: What good looks like
cer
PRO
0
1.6k
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.3k
Featured
See All Featured
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
3.4k
Testing 201, or: Great Expectations
jmmastey
46
7.8k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
160
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
0
250
WENDY [Excerpt]
tessaabrams
8
35k
BBQ
matthewcrist
89
9.9k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
400
How to Think Like a Performance Engineer
csswizardry
28
2.4k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.7k
The Power of CSS Pseudo Elements
geoffreycrofte
80
6.1k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
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!!