Slide 1

Slide 1 text

Samuel Goodwin @samuelgoodwin Refactoring and Stuff

Slide 2

Slide 2 text

What is refactoring? • Changing code without changing code behavior.

Slide 3

Slide 3 text

Why refactor? • Code is for humans • Nobody's perfect • Requirements change

Slide 4

Slide 4 text

When to refactor? • When it smells • When code becomes too rigid • Maybe not before deadlines • Sometimes not at all ( nuke and pave! )

Slide 5

Slide 5 text

How to refactor? • Step 0: Use version control!

Slide 6

Slide 6 text

Objc_dep ( github.com/nst/objc_dep )

Slide 7

Slide 7 text

Delete

Slide 8

Slide 8 text

MVC Ideally...

Slide 9

Slide 9 text

What to aim for? • Single responsibility principle • Open/closed principle • Liskov Substitution principle • Interface segregation principle • Dependency inversion principle

Slide 10

Slide 10 text

• Coding Guidelines for Cocoa • Concepts in Objective-C Programming • Cocoa Fundamentals Guide From the guys who brought you Cocoa: