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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
100
Rails Girls Chengdu 2014
poshboytl
2
340
How we test our projects
poshboytl
29
2k
Other Decks in Programming
See All in Programming
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.5k
見えないものを探る要求要件定義に必要な基本的思考 / invisible-requirement-thinking
minodriven
15
8.4k
モデルのリファクタリングが難しいと思ったら、そもそも複雑だったのはビジネス仕様だった ? / is-the-business-domain-the-real-complexity
hatsu38
0
480
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
380
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
210
GemmaをJevのように使ってみる / Use Gemma like Jev
kishida
5
780
Workers Cache を知る
syumai
0
360
AI時代のコードレビューは人に向けるな、仕組みに向けろ
texmeijin
5
3.7k
なぜCTOを降りてFDEを選んだのか?〜なぜプロダクト企業がFDEで顧客の現場に踏み込むのか〜
gonta
1
200
Everything will be SERVERLESS — 信じて運用した10年の経験値 / Everything Will be Serverless — Lessons Learned from 10 Years of Operational Experience
seike460
PRO
1
1k
複雑なUIコンポーネントとの ⻑い付き合い⽅:波及するバグからテスト戦略を経て、安全な再設計へ
mixplace
0
400
Compiling a real-world CLI tool to native with Static Hermes
tmikov2023
0
110
Featured
See All Featured
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
The SEO Collaboration Effect
kristinabergwall1
1
590
Building the Perfect Custom Keyboard
takai
2
900
Odyssey Design
rkendrick25
PRO
2
870
Gemini Prompt Engineering: Practical Techniques for Tangible AI Outcomes
mfonobong
2
590
The untapped power of vector embeddings
frankvandijk
2
1.9k
Data-driven link building: lessons from a $708K investment (BrightonSEO talk)
szymonslowik
1
1.4k
Side Projects
sachag
456
43k
Are puppies a ranking factor?
jonoalderson
2
4k
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
600
Code Review Best Practice
trishagee
74
20k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
1k
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!!