Archive for the 'Cocoa' Category

Add Meaning To Key Value Strings

Tuesday, May 22nd, 2007

Fraser Speirs recently tweeted some comments about strings in code: “I think that I particularly hate strings in code that have programmatic meaning. I’m looking at you, KVC. And you, KVO.” Reading this was one of those “yeah, that sucks!” moments, and it got me thinking about how the situation might be improved. The problem […]

Abusing Objective C With Class

Thursday, April 12th, 2007

Dynamic messaging is one of the nifty features of Cocoa and Objective-C programming on the Mac. You don’t have to know which class, or even which method your code will call until runtime. The feature is utilized a great deal by the delegation pattern employed by most standard classes in AppKit. For instance, when a […]

Coding For Readability

Friday, April 6th, 2007

Raymond Chen today reminds us that the readbility of code is important. But I’m not sure I agree with his headline/premise: “Code is read much more often than it is written.” In my opinion it’s more important for code to be skimmable than readable. This may be a lot of nitpicking over what is just […]

Iron Coder V Winner: Ben Gottlieb

Tuesday, April 3rd, 2007

Another Iron Coder weekend is wrapped up officially, as this round’s judge Jon Wight announced on the Iron Coder Blog. Ben Gottlieb won with his WikiPath screensaver. Congratulations, Ben! My entry received an honorable mention as the “Best Non-Screensaver.” I thought everybody would do a screensaver, and I should try to be a little different. […]