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
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
82
Agile Retrospective
lagilaper
0
200
Culture Test
lagilaper
0
210
Introduction to Vagrant and Docker
lagilaper
0
100
Recap of Jordan DeaMattson TechTalk
lagilaper
0
370
Other Decks in Programming
See All in Programming
ローカルLLMを使ってB2Bサービスを作っていての学び
yaotti
0
150
AI時代のUIはどこへ行く?その2!
yusukebe
19
6.8k
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.3k
JavaDoc 再入門
nagise
0
300
RTSPクライアントを自作してみた話
simotin13
0
510
AI駆動開発勉強会 広島支部 第一回勉強会 AI駆動開発概要とワークショップ
hayatoshimiu
0
450
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
3.2k
dRuby over BLE
makicamel
2
320
AIで効率化できた業務・日常
ochtum
0
110
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
240
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
440
CLIであることを活かしたGitHub Copilot CLI活用術 / GitHub Copilot CLI Pro Tips & Tricks
nao_mk2
1
1.2k
Featured
See All Featured
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
160
SEOcharity - Dark patterns in SEO and UX: How to avoid them and build a more ethical web
sarafernandez
0
200
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
480
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
300
Building a Modern Day E-commerce SEO Strategy
aleyda
45
9.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Writing Fast Ruby
sferik
630
63k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
1.1k
4 Signs Your Business is Dying
shpigford
187
22k
Ethics towards AI in product and experience design
skipperchong
2
300
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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!!