Skip to Main Content
Objective-C® For Dummies®
book

Objective-C® For Dummies®

by Neal Goldstein
October 2009
Beginner content levelBeginner
456 pages
8h 59m
English
For Dummies
Content preview from Objective-C® For Dummies®

Chapter 20. Ten Ways to Be a Happy Developer

In This Chapter

  • Limiting dependencies to what objects do, not how they do it

  • Creating code that is easy to understand

  • Following memory management rules

  • Initializing the right way

  • Using the documentation

  • Practicing your coding

  • Understanding the development process

  • Trying to get it right the first time

  • Knowing what's important — that the software works

  • Planning ahead to extend your code

  • Keeping it fun

I really like writing software. When I first started I couldn't believe that they would actually pay me to do something that was so much fun (believe me, I quickly got over that). Along the way I've learned a few ways make my life as a developer easier.

Keep Everyone in the Dark

One of the things that can really cause you problems as you develop your application is building into your code "detailed" knowledge about how things in your program work. This ranges from data structures, to instance variable visibility (to other objects), to how methods work, to the basic structure of the program. As I spoke about more than once, you want to make sure you keep your objects as ignorant as you can about their environment. While there will always be some dependency whenever one object uses another, limit those dependencies to what other objects do rather than to how they do it, and limit the number of objects each one uses.

Similarly, avoid the compulsion to create switch statement–like control structures that determine the order in which objects get called and that ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Objective-C

Objective-C

Jiva DeVoe
Cocoa in a Nutshell

Cocoa in a Nutshell

Michael Beam, James Duncan Davidson

Publisher Resources

ISBN: 9780470522752Purchase book