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
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
740
RubyConf China Welcome Slides
poshboytl
1
94
Rails Girls Chengdu 2014
poshboytl
2
330
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
Claspは野良GASの夢をみるか
takter00
0
140
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
320
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
140
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
430
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
2.3k
TSKaigi2026-静的解析への投資がAI時代のコード品質を支える ── カスタムESLintルールの設計と運用
hayatokudou
7
1.3k
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
360
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
7
2.4k
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
430
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
140
Oxlintのカスタムルールの現況
syumai
5
910
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.8k
Featured
See All Featured
Testing 201, or: Great Expectations
jmmastey
46
8.2k
Designing for humans not robots
tammielis
254
26k
Future Trends and Review - Lecture 12 - Web Technologies (1019888BNR)
signer
PRO
0
3.6k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
150
Skip the Path - Find Your Career Trail
mkilby
1
130
Faster Mobile Websites
deanohume
310
31k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
300
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
160
How to audit for AI Accessibility on your Front & Back End
davetheseo
0
390
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
190
What’s in a name? Adding method to the madness
productmarketing
PRO
24
4.1k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
70
39k
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!!