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
Refactoring Re-education
Search
Terry
February 25, 2013
Programming
990
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
750
RubyConf China Welcome Slides
poshboytl
1
95
Rails Girls Chengdu 2014
poshboytl
2
340
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
LLMによるContent Moderationの本番運用の裏側と品質担保への挑戦
suikabar
3
690
気圧・高度・GPSを記録&可視化するアプリ「Koudo」を作った話
hjmkth
1
270
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
2.1k
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
340
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.1k
Signal Forms: Details & Live Coding @enterJS 2026 in Mannheim
manfredsteyer
PRO
0
140
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
210
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
270
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
IBM Bobを活用したレガシーアプリの最新化
oniak3ibm
PRO
1
200
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
The NotImplementedError Problem in Ruby
koic
1
810
Featured
See All Featured
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.5k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.4k
The Pragmatic Product Professional
lauravandoore
37
7.3k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.2k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
870
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.1k
Pawsitive SEO: Lessons from My Dog (and Many Mistakes) on Thriving as a Consultant in the Age of AI
davidcarrasco
0
160
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
390
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!!