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
The Efficiency Paradox and How to Save Yourself and the World
hollycummins
0
100
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
150
リアクティブシステムの変遷から理解するalien-signals / Learning alien-signals from the evolution of reactive systems
yamanoku
3
1.2k
サービスクラスのありがたみを発見したときの思い出 #phpcon_odawara
77web
4
630
Being an ethical software engineer
xgouchet
PRO
0
210
gen_statem - OTP's Unsung Hero
whatyouhide
1
200
趣味全開のAITuber開発
kokushin
0
200
Make Parsers Compatible Using Automata Learning
makenowjust
1
2.1k
Ruby's Line Breaks
yui_knk
2
770
State of Namespace
tagomoris
4
1k
Compose Hot Reload is here, stop re-launching your apps! (Android Makers 2025)
zsmb
1
490
[NG India] Event-Based State Management with NgRx SignalStore
markostanimirovic
1
140
Featured
See All Featured
Making Projects Easy
brettharned
116
6.1k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
650
Why You Should Never Use an ORM
jnunemaker
PRO
55
9.3k
Unsuck your backbone
ammeep
670
57k
Writing Fast Ruby
sferik
628
61k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Fireside Chat
paigeccino
37
3.4k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
656
60k
Building Adaptive Systems
keathley
41
2.5k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
129
19k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
52
2.4k
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: