Dead Ink Vinyl

Musings of David L Kinney

Posts Tagged ‘sdk

Time to Learn Objective-C

without comments

Up to this point, I have avoided learning Objective-C and Cocoa. My professional software development is almost entirely Web-based or client-server applications and I haven’t had a lot of itches to scratch when using my Mac. The excellent independent developer community that surrounds the Mac has delivered all of the software I’ve desired and done it at very reasonable prices. Then there is the Objective-C language itself. Explicit memory management and dealing with some of C’s quirks (for example, processor directives) really feels like a step backward from Java and .NET. So there’s never been a lot of incentive for me to embrace Objective-C and Cocoa.

Then the iPhone SDK was released. As it happens, I have several itches to scratch on the iPhone. And the iPhone is a fun platform, too—I mean, there’s got to be some way for stodgy business applications to make use of the iPhone’s 3D motion sensors, right?

So this weekend I joined the iPhone developer program, downloaded the iPhone SDK, dusted off my copy of Cocoa Programming for Mac OSX, and got down to business. Since I have a strong object-oriented programming background due to my time with Java and I’m comfortable with weakly typed languages due to my time with PERL and Ruby (I’m thinking of mix-ins), the single chapter on Objective-C was sufficient for me to grasp the major components of the language. I assume when I’m done with the book I’ll be comfortable with Obj-C’s idioms and familiar with Cocoa. However, my advice to people interested in learning Obj-C or Cocoa is to wait for the 3rd Edition of the Hillegass book.

First, there are several places where the page layout is off. For example, between pages 69-70 several paragraphs are lost. But don’t worry, between pages 71-72 you get a whole paragraph repeated! It’s not a huge deal, but it is annoying.

More importantly, the 2nd Edition is written for Xcode 2. Unfortunately, Xcode 3 is very different from Xcode 2, so many of Hillegass’ screenshots and instructions for using Interface Builder aren’t even close to accurate. The “Hello World” application from the first chapter can’t be constructed. I was more than happy to try slogging my way through anyway, attempting to convert the book’s instructions into Xcode 3 operations, but it was all too new to me. Fortunately, Matt Long has an excellent tutorial filled in the gaps sufficiently for me to progress further. However Matt Long’s solution involved writing the necessary Obj-C class by hand, so I had to read Hillegass’ introduction to Obj-C before things clicked.

I’m now a quarter of the way through the book and I’m really enjoying Obj-C and Cocoa. Writing applications for the iPhone is going to be a lot of fun.

Written by dlkinney

March 10, 2008 at 9:25 am

My iPhone is My Primary Computer

with 4 comments

Somewhere in the last six months, the iPhone overtook the MacBook Pro as my primary computer. I don’t know when it happened—it was an imperceptible, gradual shift in the way I organized my life. I intended my iPhone to be used as a lifeline for those times I didn’t have WiFi for my laptop. I knew this included all of the time I spent at work, but I’d gotten along fine for the prior three years being disconnected from my personal communications during the business day. I thought would be using the iPhone’s email capabilities for “emergency” communications: last-minute Toastmasters meeting coordination and the like1.

Now, I use the iPhone every day and it handles my the majority of personal computing needs. It’s convenient and (generally) a joy to use. I don’t appreciate being sent to my secondary computer for tasks I should be able to accomplish on my primary device. I don’t like opening my MacBookPro to surf the Web. Or to read email, record appointments, update contact information, or even to tweet. In fact, I only look forward to using my MBP for coding, blogging, writing documents, and image manipulation. For my everyday online activities, I far prefer using my iPhone. When I have to use my MBP for an “iPhone activity”, I get irritated.

The irritation has been increasing over the last couple of months. Mostly, my irritation is incited by Web sites that don’t lend themselves to ease of use on the iPhone (for example, my beloved Highrise)—or worse, completely disrespect the fact that I’m on a low-bandwidth EDGE connection (for example, Grub Hub, which I saw advertised on the CTA but had to dismiss because the home page took more than three minutes to load).

With the release of the SDK, the iPhone is graduating to become a full computing platform. It will move beyond email and Web sites2. I anticipate that the coming year will see the release of all the applications I need to avoid cracking open my MBP for any of the mundane stuff. Finally, I’ll get to use my iPhone for instant messaging, enjoyable Twittering, Highrise, and WordPress.com administration.

Even if I have to build those applications myself.

1 Of course, looking back on it, I note that my first mobile phone was purchased “for emergencies”, but very quickly became my primary phone service. Perhaps this is a general pattern for adoption of new technologies.

2 To be honest, Web applications have really carried the iPhone farther than I expected. There are some very talented and dedicated people out there who pushed the Web on MobileSafari far beyond what I imagined possible.

Written by dlkinney

March 9, 2008 at 2:16 pm

What’s in Your Computer Bag?

without comments

My computer bag, a Brenthaven backpack I’ve used since my original 17” PowerBook, has gotten insanely heavy over the course of this week. I pulled eveything out to take a look at what has been adding load.

The first items aren’t that interesting. A 360|Flex folder and an Effective UI graph pad I picked up off a table while at that conference (thanks, guys!). I plan to use the graph pad to layout some screens for an upcoming project at work and want to keep it handy in case inspiration strikes. I’m still waiting for that inspiration.

Then I pulled out a two inch thick collection of papers I’d printed (duplex, to conserve paper). On top of the stack is D-Click’s Adobe Flex Coding Guidelines. I really don’t like placing opening braces on their own line. Drives me nuts. (For my money, the Sun Java Coding Conventions can’t be beat.) But, when in Rome, do as the Romans do. I recognize that being consistent (especially across developers on the same team) is more important than the merits of any single convention, so I’m trying to learn new habits.

Next up are printouts of six chapters from Adobe’s Building and Deploying Flex Applications (PDF here). I have only built Flex apps inside of Flex Builder, so I still need to learn the command line tools. My company is big on “repeatable builds”—meaning that any interally-developed production applications should be easy to regenerate from source without developer involvement. In practice, this means that the application must be built with a command line build script (Make, Ant, etc.). Besides, I get nervous when I’m overly dependent on an IDE. I like code completion, syntax highlighting, and refactoring, but I really like to know that I can do it all from vi or Notepad and the raw Flex SDK if desired or needed. Hence my interest in the Building and Deploying Flex Applications book. And I mean book! A full printout would weigh in at 400+ pages! So I picked the most important parts to me and just printed those.

The first chapter is Chapter 3 (Flex Application Structure). I just finished reading this chapter last night. Not a lot to say here. It’s good to have the layout with which I was familiar due to Flex Builder reinforced in print. Next up are Chapter 4 (Applying Flex Security), Chapter 7 (Building Overview), Chapter 9 (Using the Flex Compilers), Chapter 13 (Using ASDoc), and Chapter 14 (Creating Applications for Testing).

Then I come to printouts of various O’Reilly articles about Ruby on Rails that I intend to read Any Day Now™. Rolling with Ruby on Rails Revisited, Cookin’ with Ruby on Rails: May, Cookin’ with Ruby on Rails: Designing for Testability, Cookin’ with Ruby on Rails: More Designing for Testability.

And finally, I have Greg Hamer’s presentation slides for introducing Cairngorm at 360|Flex. I suppose I can take this out of my bag. I have the general idea of how Cairngorm works. I’m still waiting to write an app large enough to make playing with Cairngorm worthwhile. Okay, that’s not quite right. I’m still working on my first Flex app ever. I’m plugging into the 37signals Backpack API. When I’m done with that, I might look at refactoring it for Cairngorm just to get that experience under my belt.

And that’s wy my computer bag weighs a ton. What’s in your computer bag?