I spent a lot of the weekend contemplating Objective-C. I'd planned to spend my energy thinking about social events and domestic tasks, but Thursday night I had a dream in which someone spoke in Objective-C syntax. I shit you not.
With that impetus, I had a background thread going all weekend which was trying to collate my impressions of ObjC into some coherent form. Come Monday morning, I realized Jonathan Rentzsch had already said it all, and from a position of experience to boot. If you are a language geek, or simply interested in Objective-C, Rentzsch's piece is worth a read.
Monday, April 6, 2009
Friday, April 3, 2009
An example
It seems silly I had to type this when nearly all of it could have been derived from the contents of my implementation.
import <Foundation/Foundation.h>
#import <UIKit/UIColor.h>
@interface UIColor(WarcraftKlass)
+(UIColor *)warriorColor;
+(UIColor *)paladinColor;
+(UIColor *)hunterColor;
+(UIColor *)rogueColor;
+(UIColor *)priestColor;
+(UIColor *)deathKnightColor;
+(UIColor *)shamanColor;
+(UIColor *)mageColor;
+(UIColor *)warlockColor;
+(UIColor *)druidColor;
@end
I am still getting my feet wet with Objective-C, so there is some chance I may discover metaprogramming tricks such as Ruby and other allow. In that case, a lot of my code will get smaller and more readable. We shall see.
Thursday, April 2, 2009
This makes me happy
This week I've been playing around with Cocoa and iPhone development in Objective-C. I wrote a tiny Mac app which pulls data for a World of Warcraft guild down from Blizzard and displays it. Now I'm porting that app to the iPhone.
My C chops started to atrophy the first time I wrote real-world Java code and recently Ruby has stolen my heart away from Java. From that standpoint, Objective-C is a bit tedious. Still, seeing the results onscreen is satisfying.
Why Blogger?
My main criterion for blog software was API support for external post editors. Writing anything more than a few lines is much more pleasant with a native editor and less prone to mysterious losses. Blogging API support means I can use my choice of native editor. Once you add an iPhone into the mix, the need is even greater. Ever try editing a wiki page from your phone? 'Nuff said.
Second, I wanted low-hassle, even if that meant losing some flexibility. Being a recent convert to the Rails world, my first instinct was to go with a Rail-based blog engine. Unfortunately, the offerings are poorly documented and some look immature. I've been loving Instiki and am curious about the various blogging/CMS options for Rails, but for this particular purpose I don't want the tech to become an end in itself.
I wanted something simple, hosted, and that would Just Work. At that point the choice came down to Blogger and TypePad and my selection was more or less random.
Woo.
Second, I wanted low-hassle, even if that meant losing some flexibility. Being a recent convert to the Rails world, my first instinct was to go with a Rail-based blog engine. Unfortunately, the offerings are poorly documented and some look immature. I've been loving Instiki and am curious about the various blogging/CMS options for Rails, but for this particular purpose I don't want the tech to become an end in itself.
I wanted something simple, hosted, and that would Just Work. At that point the choice came down to Blogger and TypePad and my selection was more or less random.
Woo.
Subscribe to:
Comments (Atom)
