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
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
Transcript
21 slides
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!!
More Decks by Kuncara Adi Nugraha
See All by Kuncara Adi Nugraha
Recap of Dicoding Events : Continuous Quality and Test Automations
lagilaper
0
320
Metrics and Monitoring
lagilaper
0
94
Agile Retrospective
lagilaper
0
220
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
[Kotlin Fest 2026] eBPF Tracing for Kotlin
takehaya
1
330
조합이폭발하는디자인시스템이걸눈으로도테스트하라고요
giljongyu
0
780
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
Vapor Mode でアクセシビリティは 壊れないか検証した話
fuqda
1
350
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
490
Getting Started with Vibe Coding
miccheng
0
240
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
180
AIがコードを書いてくれる時代、我々は何を確かめるのか
yosuke_furukawa
PRO
13
6.1k
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
250
止まらない比較を止める — 余帰納法で無限ストリームを比べる
tarao
0
190
小さなアプリを作って公開するまで
onozaty
0
200
React Native에 현대적인 빌드 도구 더하기: Rollipop 구현기
leegeunhyeok
0
180
Featured
See All Featured
The SEO identity crisis: Don't let AI make you average
varn
0
630
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
620
Rebuilding a faster, lazier Slack
samanthasiow
85
9.8k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
750
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
610
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
33
5.8k
Highjacked: Video Game Concept Design
rkendrick25
PRO
2
580
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
GraphQLとの向き合い方2022年版
quramy
50
15k
Writing Fast Ruby
sferik
630
63k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
490