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
5
960
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
710
RubyConf China Welcome Slides
poshboytl
1
78
Rails Girls Chengdu 2014
poshboytl
2
320
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
私の後悔をAWS DMSで解決した話
hiramax
4
210
OSS開発者という働き方
andpad
5
1.7k
個人軟體時代
ethanhuang13
0
330
アセットのコンパイルについて
ojun9
0
130
Performance for Conversion! 分散トレーシングでボトルネックを 特定せよ
inetand
0
3.4k
Android 16 × Jetpack Composeで縦書きテキストエディタを作ろう / Vertical Text Editor with Compose on Android 16
cc4966
2
270
実用的なGOCACHEPROG実装をするために / golang.tokyo #40
mazrean
1
300
アプリの "かわいい" を支えるアニメーションツールRiveについて
uetyo
0
280
時間軸から考えるTerraformを使う理由と留意点
fufuhu
16
4.8k
AIと私たちの学習の変化を考える - Claude Codeの学習モードを例に
azukiazusa1
11
4.4k
Tool Catalog Agent for Bedrock AgentCore Gateway
licux
7
2.5k
AI時代のUIはどこへ行く?
yusukebe
18
9.1k
Featured
See All Featured
GraphQLとの向き合い方2022年版
quramy
49
14k
Raft: Consensus for Rubyists
vanstee
140
7.1k
Why Our Code Smells
bkeepers
PRO
339
57k
VelocityConf: Rendering Performance Case Studies
addyosmani
332
24k
Building Applications with DynamoDB
mza
96
6.6k
Intergalactic Javascript Robots from Outer Space
tanoku
272
27k
How STYLIGHT went responsive
nonsquared
100
5.8k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
44
2.5k
Done Done
chrislema
185
16k
Visualization
eitanlees
148
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.5k
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!!