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
980
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
93
Rails Girls Chengdu 2014
poshboytl
2
330
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
運転動画を検索可能にする〜Cosmos-Embed1とDatabricks Vector Searchで〜/cosmos-embed1-databricks-vector-search
studio_graph
1
680
【26新卒研修】OpenAPI/Swagger REST API研修
dip_tech
PRO
0
150
Are We Really Coding 10× Faster with AI?
kohzas
0
140
HTML-Aware ERB: The Path to Reactive Rendering @ RubyKaigi 2026, Hakodate, Japan
marcoroth
0
670
cloudnative conference 2026 flyle
azihsoyn
0
160
Spec Driven Development | AI Summit Vilnius
danielsogl
PRO
1
150
AIベース静的検査器の偽陽性率を抑える工夫3選
orgachem
PRO
4
450
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
240
The Less-Told Story of Socket Timeouts
coe401_
3
1.1k
Explore CoroutineScope
tomoeng11
0
180
AlarmKitで明後日起きれるアラームアプリを作る
trickart
0
130
実践ハーネスエンジニアリング:ステアリングループを実例から読み解く / Practical Harness Engineering: Understanding Steering Loops Through Real-World Examples
nrslib
5
4.9k
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
58k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
34
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
5.9k
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
180
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
1.3k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
230
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
1.9k
KATA
mclloyd
PRO
35
15k
Building Better People: How to give real-time feedback that sticks.
wjessup
370
20k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.7k
Why You Should Never Use an ORM
jnunemaker
PRO
61
9.8k
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!!