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
950
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
690
RubyConf China Welcome Slides
poshboytl
1
75
Rails Girls Chengdu 2014
poshboytl
2
310
How we test our projects
poshboytl
29
1.8k
Other Decks in Programming
See All in Programming
Formの複雑さに立ち向かう
bmthd
1
720
Ruby on cygwin 2025-02
fd0
0
140
Immutable ActiveRecord
megane42
0
130
2024年のkintone API振り返りと2025年 / kintone API look back in 2024
tasshi
0
210
CI改善もDatadogとともに
taumu
0
110
Amazon Q Developer Proで効率化するAPI開発入門
seike460
PRO
0
110
iOSエンジニアから始める visionOS アプリ開発
nao_randd
3
120
パスキーのすべて ── 導入・UX設計・実装の紹介 / 20250213 パスキー開発者の集い
kuralab
3
670
Spring gRPC について / About Spring gRPC
mackey0225
0
220
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
230
Honoとフロントエンドの 型安全性について
yodaka
4
250
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
30
11k
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
32
6.4k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
How to Ace a Technical Interview
jacobian
276
23k
Making Projects Easy
brettharned
116
6k
A Modern Web Designer's Workflow
chriscoyier
693
190k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Building an army of robots
kneath
302
45k
The Cost Of JavaScript in 2023
addyosmani
47
7.3k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
6
540
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
44
9.4k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Site-Speed That Sticks
csswizardry
3
370
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!!