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
Refactoring Re-education
Search
Terry
February 25, 2013
Programming
1k
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Refactoring Re-education
Summarize the work for refactoring Re-education project.
Terry
February 25, 2013
More Decks by Terry
See All by Terry
Building API For The REST of Us
poshboytl
8
760
RubyConf China Welcome Slides
poshboytl
1
100
Rails Girls Chengdu 2014
poshboytl
2
340
How we test our projects
poshboytl
29
2k
Other Decks in Programming
See All in Programming
Next.js: The final boss of Web Performance
guaca
0
380
Modernizing iOS Apps
seyfoyun
0
150
Materialが消えた日 〜真っ白なFlutterキャンバスにRenderObjectで絵を描く〜
umigishiaoi
0
150
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
160
graphql-ruby を Spinel で速くしようとした話
mtsmfm
0
140
Crash Auto Pipelines
veronikapj
1
380
Railsバージョンを4倍にした話
optim
0
940
當我們開始不讀 Code - AI Agent 時代,Code Review 與 Clean Code 還剩下什麼?
jame2408
1
360
flutter_test のその先へ — Flutter アプリの LLM 機能に「評価」という品質保証を
kosukesaigusa
0
200
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
200
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
290
私なりのハーネスエンジニアリング ~独自の言語処理系の開発を通して~
seosoft
0
180
Featured
See All Featured
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
2
1.6k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
290
Paper Plane (Part 1)
katiecoart
PRO
2
12k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
123
22k
The Spectacular Lies of Maps
axbom
PRO
1
1.1k
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
3
3.9k
The Pragmatic Product Professional
lauravandoore
37
7.5k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
760
The Cult of Friendly URLs
andyhume
79
7.1k
Fantastic passwords and where to find them - at NoRuKo
philnash
53
4k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
620
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
660
Transcript
Refactoring re-education Terry Tai
who am i
太檑
Terry
@poshboytl
Co-founder of Pragmatic.ly
None
Creator of railscasts-china.com
None
What refactoring is
Refactoring is improving the design of codes without changing it’s
behaviour.
How to begin
Run tests
How about if there is no test
Write integration tests to protect the user heavier
Unit tests might be change when doing refactor
I choose Rspec/Capybara
Code Conventions
Use spaces instead of tabs
None
None
Do not use unless ... else...
None
Don’t require things several times
None
Conventions might be different in different teams
Code design
None
None
Put filter method in private/protected
None
None
Slim controllers Fat models
None
None
None
None
None
Refactor in your daily work
Write tests
It’s better if you do TDD
Pair with your friends sometimes
Almost never push codes to master straightly
Create branch for every ticket
Send Pull Request And do code review
Make sure running tests before you push
Treat every piece of your codes as open source codes
About README • Explain why your code exists. • Tell
people how to use it • Declare copyright and licensing • Describe how to conribute
Keep Rocking!!