April 10, 2008

Apple's new tutorial: writing Cocoa apps for the iPhone

Apple makes a nice, short tutorial available that describes how to get started with XCode, Interface Builder and Cocoa. Apple's development model is built around the "Model-View-Controller" scheme, but it also uses the less common Objective C (2.0) language.

Folks familiar with C and with object oriented programming in general will soon figure things out: the tutorial is written at about the right level.

Nota bene: the first version of the tutorial has a few bugs, as I had to find. At the very end, you need to declare "string" (the "model") as a member of MyViewController:

NSString *string;

I also initialized the string in the init method:

self->string = NULL;

I also ended up using self->string rather than self.string.

Not sure about these things (I'm new to Cocoa), but it worked for me.

The next challenge is to get the sample application to work on a real iPhone. In general, a simple

scp -r ./build/Debug-iphonesimulator/helloworld.app \
root@10.0.0.2:/Applications/

should do the job (having jailbroken and installed an SSH daemon on the phone). Too bad that XCode with the latest SDK will build applications against the new 2.0 (beta) Phone OS. Switching the architecture to "iPhone OS" (rather than the iPhone Simulator) will produce ARM binaries (and complain about a missing certificate, which we'll ignore for now). But running this on a 1.1.4 iPhone? No good.

Posted by dr at 12:12 AM | Comments (0) - Leave a comment now!

March 22, 2008

Life changes / Non, Je ne regrette rien

Over the course of my twenties I've probably found some goals worth pursuing. I'd figured out what the most precious resources are. Remember: you can always make more money. That house, plane, sailing boat that you've always wanted isn't going to make you that much happier. The only finite resource in our lives is time. Take the words of someone who should know: Randy Pausch, Professor at CMU, 46 years of age and dying. Pausch tells us to have fun more than anything else (short and long video). Having fun is quite probably not the result of the quick fixes life has to offer (you know: a bungee jump, a good movie, great dinner, getting laid ...). Having fun also means to enjoy having made a difference in your job, having achieved some dreams, and having tried hard to achieve others.

So, I've been having fun. I've been laughing about myself, with, about and at others. On my 30th birthday, I made one big life change. I bought 24 pairs of black socks. So I don't have to find vaguely matching pairs any longer.

I'm glad that was the only change needed.

Posted by dr at 9:31 AM | Comments (0) - Leave a comment now!

March 21, 2008

Apple's new Airport Express 802.11n in client mode: no WEP for you!

Steve, this wasn't funny.

My brand-new Airport Express doesn't like to act as a client in an WEP encrypted network. The usual tricks (entering the 40-bit hex key with a $ prefix) don't work: it says it's got an "internet problem" and misses an assigned IP address. If you give it a fixed IP, it gives you a green "thumbs up", but it still won't work.

Interestingly, it did work fine with the original firmware (7.3.0), until I violated the "if it ain't broken, don't fix it" rule and eagerly installed the latest 7.3.1 upgrade. Arrrghhh!

The Airport Express does work in client mode when WPA or no encryption at all is used.

Take that on top of oodles of problems with OS X 10.5 and my new Macbook Pro: external displays get screwed up, the internal screen sometimes goes black or loses its color calibration. Is this the end of "it just works" for Apple?

Posted by dr at 11:19 PM | Comments (0) - Leave a comment now!

March 13, 2008

Thirties

I'm 30 now. Gotta get serious.

Posted by dr at 9:58 AM | Comments (0) - Leave a comment now!

March 4, 2008

The twenties

Today's status: David is still in his twenties.

Posted by dr at 9:54 PM | Comments (0) - Leave a comment now!