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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Terry
February 25, 2013
Programming
990
5
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
750
RubyConf China Welcome Slides
poshboytl
1
95
Rails Girls Chengdu 2014
poshboytl
2
340
How we test our projects
poshboytl
29
1.9k
Other Decks in Programming
See All in Programming
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
340
「エンジニアインターン、どうやって取った?」準備のリアルを語るLT会 Progate BAR
akiomatic
0
130
TypeScript+Orvalで実現する型安全かつ堅牢でスケーラブルなマルチチャネル通知基盤 / TSKaigi Night talks ~after conference~
d0riven
0
340
Contextとはなにか
chiroruxx
1
330
The NotImplementedError Problem in Ruby
koic
1
810
コンテキストの使い捨てをやめる — ビジネスルール駆動開発と miko —
ioki
0
210
AI 輔助遺留系統現代化的經驗分享
jame2408
1
140
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
6.1k
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
520
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
550
Go1.27で導入されるジェネリクスメソッドでできること
mackee
0
130
Featured
See All Featured
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
600
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
420
GraphQLとの向き合い方2022年版
quramy
50
15k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
310
Statistics for Hackers
jakevdp
799
230k
The Anti-SEO Checklist Checklist. Pubcon Cyber Week
ryanjones
0
160
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
Creating an realtime collaboration tool: Agile Flush - .NET Oxford
marcduiker
35
2.5k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
300
Testing 201, or: Great Expectations
jmmastey
46
8.2k
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!!