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 and stuff
Search
Samuel Goodwin
March 09, 2012
Programming
1
3k
Refactoring and stuff
My first talk as presented to the NYC Cocoaheads group.
Samuel Goodwin
March 09, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
Introduction to Git & GitHub
latte72
0
110
なぜ今、Terraformの本を書いたのか? - 著者陣に聞く!『Terraformではじめる実践IaC』登壇資料
fufuhu
4
620
The State of Fluid (2025)
s2b
0
170
バイブコーディングの正体——AIエージェントはソフトウェア開発を変えるか?
stakaya
5
940
DynamoDBは怖くない!〜テーブル設計の勘所とテスト戦略〜
hyamazaki
1
200
マイコンでもRustのtestがしたい その2/KernelVM Tokyo 18
tnishinaga
2
2.3k
Terraform やるなら公式スタイルガイドを読もう 〜重要項目 10選〜
hiyanger
13
3.1k
WebAssemblyインタプリタを書く ~Component Modelを添えて~
ruccho
1
850
コーディングは技術者(エンジニア)の嗜みでして / Learning the System Development Mindset from Rock Lady
mackey0225
2
490
JetBrainsのAI機能の紹介 #jjug
yusuke
0
200
令和最新版手のひらコンピュータ
koba789
14
7.8k
パスタの技術
yusukebe
1
390
Featured
See All Featured
A Modern Web Designer's Workflow
chriscoyier
695
190k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
Designing Experiences People Love
moore
142
24k
Producing Creativity
orderedlist
PRO
347
40k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
139
34k
It's Worth the Effort
3n
186
28k
Code Review Best Practice
trishagee
69
19k
Adopting Sorbet at Scale
ufuk
77
9.5k
4 Signs Your Business is Dying
shpigford
184
22k
KATA
mclloyd
32
14k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
18
1.1k
Transcript
Samuel Goodwin @samuelgoodwin Refactoring and Stuff
What is refactoring? • Changing code without changing code behavior.
Why refactor? • Code is for humans • Nobody's perfect
• Requirements change
When to refactor? • When it smells • When code
becomes too rigid • Maybe not before deadlines • Sometimes not at all ( nuke and pave! )
How to refactor? • Step 0: Use version control!
Objc_dep ( github.com/nst/objc_dep )
Delete
MVC Ideally...
What to aim for? • Single responsibility principle • Open/closed
principle • Liskov Substitution principle • Interface segregation principle • Dependency inversion principle
• Coding Guidelines for Cocoa • Concepts in Objective-C Programming
• Cocoa Fundamentals Guide From the guys who brought you Cocoa: