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
2.9k
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
Flatt Security XSS Challenge 解答・解説
flatt_security
0
730
Findy Team+ Awardを受賞したかった!ベストプラクティス応募内容をふりかえり、開発生産性向上もふりかえる / Findy Team Plus Award BestPractice and DPE Retrospective 2024
honyanya
0
140
HTML/CSS超絶浅い説明
yuki0329
0
190
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
390
Androidアプリのモジュール分割における:x:commonを考える
okuzawats
1
280
Fibonacci Function Gallery - Part 2
philipschwarz
PRO
0
210
非ブラウザランタイムとWeb標準 / Non-Browser Runtimes and Web Standards
petamoriken
0
430
ASP.NET Core の OpenAPIサポート
h455h1
0
120
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
170
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1k
KMP와 kotlinx.rpc로 서버와 클라이언트 동기화
kwakeuijin
0
300
Featured
See All Featured
Documentation Writing (for coders)
carmenintech
67
4.5k
YesSQL, Process and Tooling at Scale
rocio
170
14k
Optimising Largest Contentful Paint
csswizardry
33
3k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
127
18k
Mobile First: as difficult as doing things right
swwweet
222
9k
Navigating Team Friction
lara
183
15k
A Tale of Four Properties
chriscoyier
157
23k
It's Worth the Effort
3n
183
28k
Save Time (by Creating Custom Rails Generators)
garrettdimon
PRO
29
960
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.5k
How STYLIGHT went responsive
nonsquared
96
5.3k
Into the Great Unknown - MozCon
thekraken
34
1.6k
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: