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
Ruby's Line Breaks
yui_knk
4
2.8k
RuboCop: Modularity and AST Insights
koic
2
2.5k
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
3
12k
カオスに立ち向かう小規模チームの装備の選択〜フルスタックTSという装備の強み _ 弱み〜/Choosing equipment for a small team facing chaos ~ Strengths and weaknesses of full-stack TS~
bitkey
1
130
The New Developer Workflow: How AI Transforms Ideas into Code
danielsogl
0
110
fieldalignmentから見るGoの構造体
kuro_kurorrr
0
130
ComposeでのPicture in Picture
takathemax
0
130
AIコーディングの理想と現実
tomohisa
35
37k
大LLM時代にこの先生きのこるには-ITエンジニア編
fumiyakume
8
3.3k
設計の本質:コード、システム、そして組織へ / The Essence of Design: To Code, Systems, and Organizations
nrslib
10
3.7k
Making TCPSocket.new "Happy"!
coe401_
1
3.1k
By the way Google Cloud Next 2025に行ってみてどうだった
ymd65536
0
110
Featured
See All Featured
Typedesign – Prime Four
hannesfritz
41
2.6k
Optimising Largest Contentful Paint
csswizardry
37
3.2k
Stop Working from a Prison Cell
hatefulcrawdad
268
20k
Gamification - CAS2011
davidbonilla
81
5.3k
Scaling GitHub
holman
459
140k
Automating Front-end Workflow
addyosmani
1370
200k
The Power of CSS Pseudo Elements
geoffreycrofte
75
5.8k
Producing Creativity
orderedlist
PRO
344
40k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
331
21k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Building Adaptive Systems
keathley
41
2.5k
Designing for Performance
lara
608
69k
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: