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
990
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
94
Rails Girls Chengdu 2014
poshboytl
2
330
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
inferと仲良くなる10分間
ryokatsuse
1
270
関係性から理解する"同一性"の型用語たち
pvcresin
2
610
Make SRE Operations Easier with Azure SRE Agent
kkamegawa
0
1.8k
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
750
分析エージェント精度向上における データアナリストの役割
oura_shoya
0
140
Composerを使ったサプライチェーン攻撃の様子を眺めてみる #phpstudy
o0h
PRO
2
190
さぁV100、メモリをお食べ・・・
nilpe
0
110
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
260
Old Dog, New Tricks: The Java 25 Reinvention - JNation
bazlur_rahman
0
130
Why Laravel apps break—Mastering the fundamentals to keep them maintainable
kentaroutakeda
1
310
開発体験を左右するライブラリの API 設計 - GraphQL スキーマ構築ライブラリから考える #tskaigi
izumin5210
2
1.3k
Modding RubyKaigi for Myself
yui_knk
0
800
Featured
See All Featured
We Are The Robots
honzajavorek
0
230
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
210
Imperfection Machines: The Place of Print at Facebook
scottboms
270
14k
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
710
Believing is Seeing
oripsolob
1
130
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
16
2k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.9k
Raft: Consensus for Rubyists
vanstee
141
7.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.4k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
190
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!!