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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Terry
February 25, 2013
Programming
5
980
Refactoring Re-education
Summarize the work for refactoring Re-education project.
Terry
February 25, 2013
Tweet
Share
More Decks by Terry
See All by Terry
Building API For The REST of Us
poshboytl
8
730
RubyConf China Welcome Slides
poshboytl
1
87
Rails Girls Chengdu 2014
poshboytl
2
320
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
430
MUSUBIXとは
nahisaho
0
130
登壇資料を作る時に意識していること #登壇資料_findy
konifar
4
1.1k
Fluid Templating in TYPO3 14
s2b
0
130
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
責任感のあるCloudWatchアラームを設計しよう
akihisaikeda
3
170
Best-Practices-for-Cortex-Analyst-and-AI-Agent
ryotaroikeda
1
110
AWS re:Invent 2025参加 直前 Seattle-Tacoma Airport(SEA)におけるハードウェア紛失インシデントLT
tetutetu214
2
110
Fragmented Architectures
denyspoltorak
0
150
AI & Enginnering
codelynx
0
110
【卒業研究】会話ログ分析によるユーザーごとの関心に応じた話題提案手法
momok47
0
200
Oxlintはいいぞ
yug1224
5
1.3k
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
110
First, design no harm
axbom
PRO
2
1.1k
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
Un-Boring Meetings
codingconduct
0
200
The Curse of the Amulet
leimatthew05
1
8.5k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
GraphQLとの向き合い方2022年版
quramy
50
14k
A Modern Web Designer's Workflow
chriscoyier
698
190k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
5.2k
Being A Developer After 40
akosma
91
590k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
940
My Coaching Mixtape
mlcsv
0
48
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!!