Friday, January 29, 2010

Day 8 - Zombies and a New SDK to handle iPad

I'm still reviewing the iPhone Application Development tutorials on Lynda.com. I'm on section seven that deals with User Interface. However, the previous section, Debugging and Troubleshooting was a real brain drain! It's incredibly important to remember the issue of memory. Experts constantly remind users that Apple is exceptionally stringent on use of memory. It is shocking how little memory is allocated in the iPhone to applications. So, objects must constantly be released back to the pool after each alloc and init. To help with the release of memory, but without losing track of the code, there is a tool within the debugging process called by the cool name "Zombie" that can be used.

(NOTE: I'm interrupting here to briefly mention what I find intriguing about programming jargon. Common, everyday terms are used in specialized argotic syntax that plays on a word's original meaning and extends its purpose further to define unique properties in code. An example of this would be "heap", which in C++ means available memory. "An area of memory used for dynamic memory allocation where blocks of memory are allocated and freed in an arbitrary order and the pattern of allocation and size of blocks is not known until run time. Typically, a program has one heap which it may use for several different purposes." Heap in common, everyday speak means a pile. It is easy to see the extension made here. Then there is the use of the word Zombie. - Zombie objects, whose only purpose is to report an error when someone calls them, acts as the husk of the previous object. It's fascinating to see these uses of words.)

Using Zombies as a tool to figure out problems is a good way to check code. It's important to "enable Zombie" BEFORE releasing an object during debugging. A Zombie acts like a placeholder or shell of the object that was released back to the pool. Therefore, when checking code, Zombies help you identify where the problems are in code after an object has been released. However, if you don't release the Zombie afterwards it continues to hold on to memory which you don't want. In addition, you must enable Zombies in all caps YES or NO for the BOOl. (In computer science, the Boolean or logical data type is a primitive data type having one of two values: true or false, intended to represent the truth values of logic and Boolean algebra. - Wiki)

I realize this all seems complicated, and yes, to a degree it is. But Simon, Lynda.com instructor, does his level best to keep the information to a reasonable degree of difficulty.

On a side note, the iPAD was release this week and with the release comes a new SDK! Although all the apps currently in existence will work on the iPAD, the dimensions remain the same. There is a feature where you can pixel up, but quality is lost of course. Apple recommends that developers work with the new real estate and the new SDK. At the rate that things change I hope I'm able to get above the flailing and into the creating of product.

No comments:

Post a Comment