Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Refactoring Re-education
Search
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
720
RubyConf China Welcome Slides
poshboytl
1
85
Rails Girls Chengdu 2014
poshboytl
2
320
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
tparseでgo testの出力を見やすくする
utgwkk
2
240
AIコーディングエージェント(skywork)
kondai24
0
180
ViewファーストなRailsアプリ開発のたのしさ
sugiwe
0
500
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
260
dotfiles 式年遷宮 令和最新版
masawada
1
790
マスタデータ問題、マイクロサービスでどう解くか
kts
0
110
Developing static sites with Ruby
okuramasafumi
0
310
ZOZOにおけるAI活用の現在 ~モバイルアプリ開発でのAI活用状況と事例~
zozotech
PRO
9
5.8k
從冷知識到漏洞,你不懂的 Web,駭客懂 - Huli @ WebConf Taiwan 2025
aszx87410
2
2.7k
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.3k
20 years of Symfony, what's next?
fabpot
2
370
TestingOsaka6_Ozono
o3
0
170
Featured
See All Featured
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
32
1.8k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Balancing Empowerment & Direction
lara
5
800
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Docker and Python
trallard
47
3.7k
Learning to Love Humans: Emotional Interface Design
aarron
274
41k
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
The World Runs on Bad Software
bkeepers
PRO
72
12k
A Modern Web Designer's Workflow
chriscoyier
698
190k
We Have a Design System, Now What?
morganepeng
54
7.9k
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!!