Sometimes we become so focused on the pursuit of a symptom of a problem that we don’t stop to ask if we are still focused on the real cause of the problem.  This happened to me recently.

During the iPhone development process you have a choice of debugging the iPhone App using the iPhone emulator or using the actual hardware.  The quickest way to test out your code is to build and debug using the emulator.

While developing an iPhone application for Podcast Stockton I used one of the iPhone Audio libraries. It never occurred to me that the emulator might not do everything the hardware does.  I was testing out the podcast playback and experienced some unacceptable behavior while using the emulator.  I spent the good part of an evening looking for the cause of the issue.  It wasn’t until after I had spent many looking over my code that I finally decided to do a sanity check.  I switched Xcode to debug using the hardware instead of the emulator;  that’s when I discovered I had been barking up the wrong tree.  The code that should have been working all along was working just fine.

When you run into an issue that should have been working, make sure to do a sanity check to see if it’s a symptom or a real issue.

In the future, when things seem a little off I plan to do a sanity check just to make sure I’m pursuing the cause and not the symptoms.