Skip to content

{ Author Archives }

Objective-C 2.0 properties and to-many relationships

I’ve occasionally been asked about the appropriate form for properties representing to-many relationships in Objective-C 2.0. Let’s start with the example of a recipe and its ingredients, represented by instances of the Recipe and Ingredient classes. @interface Recipe : NSObject { @private NSMutableSet *_ingredients; } @property (copy) NSSet *ingredients; @end This is a pretty straightforward […]

Tagged , , , , ,

Singletons in Cocoa/Objective-C

I’ll preface this post with the standard advice: Don’t create singletons if you don’t absolutely have to. In general, if you’re creating a global “manager” object of some sort, you’re doing something wrong. That said, there’s still occasionally a reason to have such a global singleton, such as a “default something.” The sample code in […]

Tagged , , ,

When to use properties & dot notation

I listened to a recent episode of the cocoaFusion: podcast about properties and dot notation today. There were a few interesting points brought up, but I felt a couple of the most important reasons to use @property declarations and dot notation weren’t addressed. The biggest reason I see to use a different notation for both […]

Tagged , , , , , ,

Five years!

As of today, I’ve been with Apple for five years, working on developer tools. It’s been great and I look forward to many more years of improving the experience for people creating great Mac and iPhone software!

Tagged , , , , ,

Go ahead and use Core Data

In a few weeks, it will be four years since Mac OS X 10.4 Tiger was first released. That was the first release to include Core Data. It will also be about one and a half years since Mac OS X 10.5 Leopard was released, with significant enhancements to the Core Data API. It’s pretty […]

Tagged , , , , ,

No NSCoder Night for me tonight

Unfortunately I’m not feeling well, so I won’t be at NSCoder Night tonight. See everyone next week!

Tagged

Happy 25, Macintosh!

The Mac is 25 years old today. Happy birthday, Macintosh. You’ve really changed the world.

Tagged

DDJ vs. Backyard Poultry

Eric Sink has a post talking about the sad state of developer publishing, specifically discussing the declining readership of the venerable developer magazine Dr. Dobb’s Journal, as compared to that mainstay of American newsstands Backyard Poultry. After reading the article and the replies, I just had to throw in my two cents about magazine publishing […]

Tagged ,

Let’s merge managed object models!

There was a question recently on Stack Overflow asking how to handle cross-model relationships in managed object models. Now, the poster wasn’t asking about how to handle relationships across persistent stores — he was asking how to handle splitting a model up into pieces such that the pieces could be recombined. It turns out that […]

Tagged , ,

Erlang on LLVM? or: Outsource your JIT!

Has anyone been working on using LLVM to do just-in-time code generation for the Erlang virtual machine? Depending on the design and structure of the Erlang virtual machine, it doesn’t seem like it would be all that tough a project. And it could provide a nice performance boost for those projects that are starting to […]

Tagged , , , , , , , , ,