imadjine.com Echoes of a mobile mind

Debugging retain counts

For reference: Aaron Hillegass has an old writeup of how to debug retain counts in XCode (and hence gdb). Not all of it can be applied to iPhone development since there are no debug versions of the core framework to zombify references on release, but the gdb incantation to break on exception raises and @throws is invaluable.

The .gdbinit entries for setting breakpoints on exceptions raises and throws:

 
fb -[NSException raise]
fb objc_exception_throw()
 
 

And of-course the basic rules for managing your autorelease nightmares always apply:

Share/Save/Bookmark

ProjectPlus plugin for TextMate

ProjectPlus is a great plugin for TextMate to show Subversion or Git status of files and folders. I'm slowly getting fed up with XCode's quirks and only really still appreciate it for it's ability as a debugger and decent completion support. ProjectPlus helps close the gap, allowing me to see status at a glance while still being in my favorite editor.

The main things still missing in TextMate for a complete switch-over are bitter code-completion for different SDKs, like iPhone and Mac, with different header sets for each version.

(Via Aral Balkan)

Share/Save/Bookmark

Objective-C debugging magic

Hamster Emporium has a really detailed explanation on how the Objective-C compiler works the register set and how to take advantage of them with that inevitable crash we always introduce.

Share/Save/Bookmark

Selecting a bug tracker

I always considered selecting a bug-tracker a equivalent to picking your favorite editor. It's highly dependent on your specific, or expected, workflow. Collin's writeup finally triggered me to distill my own thoughts on how I choose a bug-tracker.

There are plenty of comparisons on features, capabilities and problems with bug-trackers and how or why folks prefer one over the other. The main selection criteria I can discern are:

 

In my various jobs in small and large companies over the years, I've experienced a number of non-hosted solutions, including teamtrack, ddts, bugzilla, trac, devtrack and jira.

I've found that no matter whether you're in a large or a small organization we end up expecting too much from out bug-tracker because we believe our needs are really complex.

This is particularly true in larger organizations that have a lot of process people wanting to enforce the process of the month by making the tools enforce it. While I appreciate this (and the implied mistrust in the users of the tracker), it makes the tracker extremely sensitive to process changes and usage misunderstandings.

So here's my own personal, consulting, small indie-shop approach to picking a bug-tracker. Note this is somewhat biased by a lot of past pain so take it for what it's worth:

 

You can probably tell where this is going.. If you're small don't give into your IT cravings and just pay for a hosted provider until you outgrow the features you need from them.

I've heard great things about FogBugz, Lighthouse, and am currently starting of with Lighthouse, since I really like the tagged approach to dealing with bugs

Lets see if I prove myself wrong :-)

Share/Save/Bookmark

scan-build just works ™

I was listening to the Mac Developer Roundtable and caught a comment on scan-build which is part of the clang magic. I haven't really spent time on clang, but was intrigued by a clang based static analysis tool that would potentially help highlight bad code-fu.

The site includes pre-built binaries for the command lines, so this was a simple unzip and run on my latest iPhone effort. Found two lacking dealloc declarations out of the box in a well laid out html report. Thanks scan-build and background Roundtable podcasts!

Share/Save/Bookmark

At WWDC

IMG_0019.JPGThis is the first time I've gone to a conference as an independent developer and since I'm doing iPhone work I'm lucky enough to get to WWDC. What a show guys! I hear the line at the door started at 5am. While I refuse to get up that early I did end up standing in the line to get to the keynote for 2 hours. Lots of good buzz and great folks to meet while you wait for the Steve injection. The keynote was fantastic with the Reality Distortion Field set to 11.

New iPhone with a lower price, GPS, mobileME (which replaces .mac), enterprise integration and application directed network push notification and available in over 22 countries at launch on July 11th.

I can't wait for a newer version of the new SDK to fix some of the shortcomings and to start cranking on some of the new app ideas that've been brewing while I stood in line.

In the mean-time I'll be trying to sponge up as much information as I can to get up to speed with some of the more core animation, video and audio capabilities on both the Mac and the iPhone

Share/Save/Bookmark

Search projects faster in TextMate

While perusing Textmate bundles I found a neat bundle that does searches way faster on any size of projects. Textmate is pretty fast searching across a project but this bundle just rips through a search in the blink of an eye! It's based on ack which is Perl based and given that Perl usually gives me a bad taste in the mouth I'm not sure how far away I should stay from this in case I need to fix something myself. Here's hoping that Henrik keeps up with the bug-fixes!

Share/Save/Bookmark

iPhone DNS bug

Yes, I've been bitten by it too. I'm trying to download data from a server that uses DNS aliasing to give back host and Apple's resolver library on the iPhone doesn't work right. It manifests itself as "Unknown server error" when trying to open sockets to aliased hosts. Saurik not only describes the problem well but also posts a fix for it which works flawlessly so far. 

Share/Save/Bookmark

Upgraded to Wordpress 2.5

When they say wp-content should be treated specially on the upgrade instructions page, they really mean it don't they :-) Otherwise a painless install and I love the new features!

Share/Save/Bookmark

Hello world!

Welcome to the imadjine web-site. We'll slowly be adding more content to this space as we expose what we're working on. Basically imadjine is a mobile software group, focused on building great applications for mobile devices. As part of that there are a number of libraries and functionality that is created that we'd like to share with the community given that we've gotten a ton out of it. Stay tuned for the first story and code share

Share/Save/Bookmark