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
ALL CODE BASE ARE BELONG TO STUDY
uzulla
25
6.5k
開発生産性を上げるための生成AI活用術
starfish719
3
1.5k
その面倒な作業、「Dart」にやらせませんか? Flutter開発者のための業務効率化
yordgenome03
1
140
SODA - FACT BOOK(JP)
sodainc
1
8.6k
Introduce Hono CLI
yusukebe
6
3k
contribution to astral-sh/uv
shunsock
0
310
Go言語はstack overflowの夢を見るか?
logica0419
0
500
タスクの特性や不確実性に応じた最適な作業スタイルの選択(ペアプロ・モブプロ・ソロプロ)と実践 / Optimal Work Style Selection: Pair, Mob, or Solo Programming.
honyanya
3
180
CSC305 Lecture 09
javiergs
PRO
0
290
CSC509 Lecture 04
javiergs
PRO
0
300
Android16 Migration Stories ~Building a Pattern for Android OS upgrades~
reoandroider
0
130
CSC509 Lecture 06
javiergs
PRO
0
260
Featured
See All Featured
Docker and Python
trallard
46
3.6k
What's in a price? How to price your products and services
michaelherold
246
12k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
How GitHub (no longer) Works
holman
315
140k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
10
880
How STYLIGHT went responsive
nonsquared
100
5.8k
Building Flexible Design Systems
yeseniaperezcruz
329
39k
KATA
mclloyd
PRO
32
15k
The Language of Interfaces
destraynor
162
25k
Mobile First: as difficult as doing things right
swwweet
225
10k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
230
22k
Unsuck your backbone
ammeep
671
58k
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: