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
79
Rails Girls Chengdu 2014
poshboytl
2
320
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
SwiftDataを使って10万件のデータを読み書きする
akidon0000
0
250
Ktorで簡単AIアプリケーション
tsukakei
0
120
Migration to Signals, Resource API, and NgRx Signal Store
manfredsteyer
PRO
0
130
Software Architecture
hschwentner
6
2.4k
ALL CODE BASE ARE BELONG TO STUDY
uzulla
28
6.8k
Inside of Swift Export
giginet
PRO
1
250
モテるデスク環境
mozumasu
3
1.4k
CSC305 Lecture 12
javiergs
PRO
0
240
Swift Concurrency 年表クイズ
omochi
3
210
コードとあなたと私の距離 / The Distance Between Code, You, and I
hiro_y
0
210
Introducing RemoteCompose: break your UI out of the app sandbox.
camaelon
2
170
Claude Agent SDK を使ってみよう
hyshu
0
1.4k
Featured
See All Featured
How GitHub (no longer) Works
holman
315
140k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
650
The Power of CSS Pseudo Elements
geoffreycrofte
80
6k
Visualization
eitanlees
150
16k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Java REST API Framework Comparison - PWX 2021
mraible
34
8.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
16k
It's Worth the Effort
3n
187
28k
How to train your dragon (web standard)
notwaldorf
97
6.3k
4 Signs Your Business is Dying
shpigford
186
22k
Keith and Marios Guide to Fast Websites
keithpitt
412
23k
Testing 201, or: Great Expectations
jmmastey
46
7.7k
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!!