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
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
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
TypeSpec で繋ぐ複数プロダクトの型安全
maroon8021
1
260
tsserverとは何だったのか、これからどうなるのか
nowaki28
1
420
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
200
AI駆動開発で崩れていくコードベースを立て直す
kyoko_nr_nr
1
390
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
480
横断組織出身のQAEがインプロセスQAEでつまずいたこと・活かせたこと
ty89
0
460
AI Agent と正しく分析するための環境作り
yoshyum
3
640
LLM Plugin for Node-REDの利用方法と開発について
404background
0
140
Spec-Driven Development with AI-Agents: From High-Level Requirements to Working Software
antonarhipov
2
390
1人1案件のプロダクトエンジニア時代に、"プロセス監督"としてチャレンジしたこと
non0113
0
350
OCRを使ってゲームのアイテムをデータ化する
kishikawakatsumi
0
120
OSもどきOS
arkw
0
280
Featured
See All Featured
Marketing to machines
jonoalderson
1
5.3k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
190
Measuring & Analyzing Core Web Vitals
bluesmoon
9
850
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
10k
DBのスキルで生き残る技術 - AI時代におけるテーブル設計の勘所
soudai
PRO
65
55k
The Cult of Friendly URLs
andyhume
79
6.9k
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
370
Leo the Paperboy
mayatellez
7
1.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Deep Space Network (abreviated)
tonyrice
0
160
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
270
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
810
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!!