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
930
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
640
RubyConf China Welcome Slides
poshboytl
1
73
Rails Girls Chengdu 2014
poshboytl
2
310
How we test our projects
poshboytl
29
1.8k
Other Decks in Programming
See All in Programming
Revisiting the Hotwire Landscape after Turbo 8 @ RailsConf 2024, Detroit
marcoroth
0
340
使ってみよう Azure AI Document Intelligence
kosmosebi
2
370
Fast JSX: Don't clone props object #28768
yossydev
1
220
AppRouter Panel Talk
yosuke_furukawa
PRO
1
500
新宿ダンジョンを可視化してみた
satoshi7190
3
420
AWS CDKコントリビュートTIPS / aws-cdk-contribution-tips
gotok365
4
550
MetricKitで予期せぬ終了を検知する話 / Detect unexpected termination with MetricKit
nekowen
1
200
Webアプリをできるだけコードを手書きしないで作ってみる
tomokusaba
2
190
業務ツールとして使うPostman
msys75
0
120
デフォルトにして至高、RubyMineの大好きな所
ruzia
0
1.1k
大規模Reactアプリのリアーキテクチャ~8万行のTanStack Query移行の軌跡~
kj455
4
1k
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
150
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
13
2.4k
Producing Creativity
orderedlist
PRO
338
39k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
The Brand Is Dead. Long Live the Brand.
mthomps
49
29k
Fireside Chat
paigeccino
22
2.6k
Designing Experiences People Love
moore
136
23k
Build The Right Thing And Hit Your Dates
maggiecrowley
25
2k
Become a Pro
speakerdeck
PRO
13
4.6k
Ruby is Unlike a Banana
tanoku
96
10k
From Idea to $5000 a Month in 5 Months
shpigford
378
45k
A Modern Web Designer's Workflow
chriscoyier
689
190k
The Power of CSS Pseudo Elements
geoffreycrofte
62
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!!