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 Ruby Edition
Search
Julio Lucero
April 05, 2013
Programming
230
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Refactoring Ruby Edition
Slides based on the book: "Refactoring: Ruby Edition"
Julio Lucero
April 05, 2013
More Decks by Julio Lucero
See All by Julio Lucero
Amazon as a Servide
julioalucero
0
41
Remix Manifest
julioalucero
0
150
Active Admin
julioalucero
0
410
Other Decks in Programming
See All in Programming
Webフレームワークの ベンチマークについて
yusukebe
0
170
LLM本来の能力を解き放つサンドボックス技術とAI民主化への適用
yukukotani
3
4.3k
さぁV100、メモリをお食べ・・・
nilpe
0
150
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
270
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
850
依存関係から依存物へ―Dependencyという言葉の歴史をひも解く
j_lee
0
120
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
140
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
Skillsは効率化、Agentsは"自分の拡張"——Builder時代のエージェント編成(CC Night 2026)
wemra
1
140
Vite+ Unified Toolchain for the Web
naokihaba
0
320
Contextとはなにか
chiroruxx
1
330
Honoでのサプライチェーン侵害対策 〜 3つのライブラリに学ぶ
yusukebe
6
1.4k
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
540
AI Search: Where Are We & What Can We Do About It?
aleyda
0
7.6k
Become a Pro
speakerdeck
PRO
31
6k
The Art of Programming - Codeland 2020
erikaheidi
57
14k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
210
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
2
4k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
HTML-Aware ERB: The Path to Reactive Rendering @ RubyCon 2026, Rimini, Italy
marcoroth
1
210
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
200
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
62
44k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
71
40k
Transcript
Refactoring Rubylit Edition @julioalucero
An Example
An Example
None
“A change made of the internal structure of software to
make it easier to understand and cheaper to modify without changing its observable behavior”
THE TWO HATS
WHY SHOULD YOU REFACTOR? • Mejora el diseño del software
• Hace que el software sea más fácil de entender • Ayuda a encontrar errores • Ayuda a Programar más Rápido
BAD SMELLS IN CODE
THE VALUES OF THE TESTS
Kinds of Refactorings 1. Composing Methods 2. Moving Features Between
Objects 3. Organization Data 4. Simplifying Conditional Expressions 5. Making Method Calls Simpler 6. Dealing with Generalization
1. COMPOSING METHODS
2. MOVING FEATURES BETWEEN OBJECTS
2. MOVING FEATURES BETWEEN OBJECTS
3. Organization Data row = [ ] row[0] = "Bichi
Gol" row[1] = "20" # refactoring row = Player.new row.name = "Bichi Gol" row.goals = "20" Replace Array with Object
4. Simplifying Conditionals Expressions
4. Simplifying Conditionals Expressions
4. Simplifying Conditionals Expressions
5. MAKING METHOD CALLS SIMPLER
6. DEALING WITH GENERALIZATION • Pull Up/Down Method • Extract
Module • Extract Subclass • Introduce Inheritance
6. DEALING WITH GENERALIZATION
6. DEALING WITH GENERALIZATION
Guarda que termina. • Solid suite of test. • Always
in small steps. • Any fool can write code that a computer can understand. Good programmers write code that humans can understand.
ESTE ES EL FINAL