Note: The Pages o’ Peat have moved to http://peat.org/ — please update your bookmarks and references accordingly. Thank you!

I spent the weekend building a native iPhone app.  It’s unfinished, and a little rough around the edges … but I’m happy with the experience so far.

The concept is relatively simple:  I want an app to search through (and show off) my collection of international banknotes when I’m out and about.

There are a few hurdles, though.

For example, it’s been over a decade since I worked on a reasonably sized C application.  So, I’m getting back into the swing of things with Objective-C style pointers and memory management, and remembering how much I hate segmentation faults and bus errors.

Also, being new to Objective-C and Mac development, this learning curve looks a bit like a wall.  Thankfully, there is quite a bit of sample code out there, but it’s not entirely consistent … which I guess is par for the course for a beta development system and a OS that hasn’t been released yet.

I’m learning, but I’m pretty sure my code is gnarly enough to make a Real Mac Developer nauseous.  That said, if you are a Real Mac Developer with a strong stomach, please drop me a line — I’d love to show you what I have, just so that you can tell me how bad it really is (and, hopefully, tell me how I can make it better).

At this point in the game, there are a few things I’m very pleased with:

  1. Interacting with the Internet and web services is incredibly easy.  Support for synchronous and asynchronous HTTP requests and very flexible caching policies make for a happy web service developer. This is particularly nice since the guts of the database and searching features will be powered by a Rails app siting on a server somewhere else.
  2. Working with XML is also very pleasant.  NSXML can handle proper XPath and XQuery searches, which is really quite nice.  The documentation is very mature for this and the other supported NS* classes, and there are plenty of examples out there on the net.
  3. UIKit follows very sane MVC and delegation patterns.  It’s pretty straight forward and consistent.

And, of course, a few things I’m rather surprised to find, and desperately hope for resolution on:

  1. The iPhone simulator isn’t entirely safe. My hamfisted techniques have somehow caused other apps (including Finder) to crash several times.  It’s terribly frustrating, and makes me a bit nervous about experimenting. I’m not sure if I’m getting better, or if the recent betas have been more stable, but I haven’t had any catastrophic errors recently.
  2. No (official) coverflow interface.  Wow.  This is perfectly suited for what I want to do, and a big part of what makes the iPhone such a compelling platform to develop for.  Please, please, please include this in the final release.
  3. I see Interface Builder … but absolutely no documentation on how to use it for an iPhone.  Can someone point me at an example? Apple now has a step-by-step guide to building a simple app on the iPhone with Interface builder. I also found an example here and posted my own followup summary for people who are already familiar with Interface Builder, and just want to see how to plug in their interfaces.

Anyhow, good points and bad points, but on the whole it’s been a good experience so far.  The NS* classes are all stable and well documented, and the UI* classes and documentation are about what you’d expect from an API in beta.

I’m keen to get a code review from someone who knows what they’re doing, and I’m eagerly awaiting the next update to see what’s changed.  Unfortunately, I think I’ll have to have to wait until June to get a real iPhone — I’m betting that the next generation iPhone will be released along with the SDK and OS 2.0 at WWDC ’08.

Update:  I found an Interface Builder + iPhone tutorial, and I posted a short summary about how to interface with the IB files.

Advertisements

This Feels Mighty Good

April 3, 2008

Note: The Pages o’ Peat have moved to http://peat.org/ — please update your bookmarks and references accordingly. Thank you!

iphone-sdk

… we will have much fun together. 

Note: The Pages o’ Peat have moved to http://peat.org/ — please update your bookmarks and references accordingly. Thank you!

Amazon announced Elastic IP Addresses for their Elastic Cloud Computing (EC2) service this morning, which removes one of the biggest hurdles for deploying web sites on the service. Previously, customers had no control over the IP addresses assigned to their EC2 instances, a frustrating situation for anyone wanting to reliably point a domain into the cloud.

Elastic IP Addresses solve this issue in a rather elegant way, by assigning a static IP address to your EC2 account, and providing a mechanism for routing that address to any of your EC2 instances. This system provides a reliable address for DNS, and enables failover and takeover features for applications with high availability requirements.

Kudos to Amazon!

Cleaning the Closet

March 22, 2008

Note: The Pages o’ Peat have moved to http://peat.org/ — please update your bookmarks and references accordingly. Thank you!

I was cleaning my closet today and found a few CDs with photos on them, including this set. I had the pleasure of taking pictures with Juno Reactor 2001, when they came through Portland on their Shango World Tour. Great people, great music, and a hell of a show.

Channel List

In other news, I miss my Contax 35mm camera and Ilford HP5+ film.

On Fire

March 18, 2008

Note: The Pages o’ Peat have moved to http://peat.org/ — please update your bookmarks and references accordingly. Thank you!

My profile is up on Portland On Fire today. I’ve spent the morning reading other profiles .. it’s fun to peruse and get to know other folks in the area.

Happy Anniversary

March 17, 2008

Note: The Pages o’ Peat have moved to http://peat.org/ — please update your bookmarks and references accordingly. Thank you!

Seven years ago today we were introduced at a birthday party.

Six years ago today I figured out how special you were.

Four years ago today we sat in a pub in Ireland and toasted to a life together.

Three years ago today I proposed to you in Germany.

Two years ago today we were married.

Today we have a family, and you’re even more magnificent than ever.

Cheers, to my wonderful wife.

Cheers!

Home Again

March 13, 2008

Home

It’s cool and rainy today, and we’re at home, enjoying the quiet. The trees in our back yard burst out in leaves while we were at the hospital. I love serendipity.

Driving home was a little surreal — starting in a dim hospital room surrounded by wonderful people, then being injected back into the fast paced world where no one else knows or cares about you. I think I drove a little too slow on the freeway.

We’re headed back to the hospital tomorrow morning to follow up on his bilirubin count. He came out with a big ol’ bruise on his head, and little baby livers sometimes can’t keep up with the clean up work. It’s an easy treatment if it does turn out to be an issue, so we’re not worried — the only long term issues he might have are re-occurring nightmares about pelvises.

Here’s a picture of Mr. Conehead himself. He’s only about 10 minutes old in this picture. His head has returned to a perfectly normal shape since then. Amazing, ‘eh?

Cross Eyed and Cone Headed