Upgrade to Pro — share decks privately, control downloads, hide ads and more …

iOS Worst Practices (And How To Avoid Them)

iOS Worst Practices (And How To Avoid Them)

Learn everything you need to know about writing bad code... and how to fix and prevent it in your own project. This talk will identify the common pitfalls, anti-patterns, and red flags that commonly plague an Objective-C codebase, ranging from cosmetic nitpicks and shibboleths to more serious, egregious offenses. Is your code base above reproach? Come and find out for yourself!

Mattt Thompson

April 20, 2013
Tweet

More Decks by Mattt Thompson

Other Decks in Programming

Transcript

  1. • Tabs vs. Spaces • 2 / 4 Space Tabs

    • Space after -, (, or ) • Newline after { or }
  2. Ruby Ruby Objective-C underscore_variable_name camelCaseVariableName def short(options = {}) -

    (void)longMethodWithParameter: andAnotherParameter: CAPITALIZED_CONSTANT kCamelCaseConstant Module::Class MNClass
  3. • NSSet • NSCache • NSLocale • NSSortDescriptor • NSPredicate

    • NSURL • NSURLRequest • NSURLResponse • NSURLCredential Foundation Favorites
  4. ?

  5. • Make your code sparkle • Follow Apple's conventions •

    Delegate responsibilities • Use CocoaPods