Chapter    15

Unit Testing, Debugging, and Instruments

One of the fundamental truths of computer programming (and life) is that not everything works perfectly. No matter how much you plan and no matter how long you’ve been programming, it’s rare for an application you write to work perfectly the first time and then forever under all circumstances and possible uses. Knowing how to properly architect your application and write well-formed code is important. Knowing how to find out why things aren’t working the way they’re supposed to, and fixing them, is equally important.

There are three techniques you can leverage to help identify and solve these problems: unit testing, debugging, and profiling.

  • Unit testing is the idea of isolating the smallest ...

Get More iPhone Development with Objective-C now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.