Posts written by Mark Dalrymple

Jun 6 2013

Inside the Bracket, part 2 – data invocation

Last time we took a look at the motivations behind Objective-C message sending. It’s a layer of indirection that lets one chunk of code treat other, perhaps unrelated, chunks of code in a uniform manner. “I have a pile of views here, I shall draw them all with -drawRect:, and I don’t care if the views are Buttons, Sliders, or World Maps.” There’s a loop that hits a collection and sends the same message to a bunch of objects:

for (NSView *view in visibleviews) {
    [view drawRect: view.bounds];
}

Objective-C performs this magic by having a collection associated with each object.…

May 17 2013

Leveling Up

So. That Clash of the Coders Thing. Kind of nice being able to flex mental muscles over a 72-hour sleep-deprived Dr Pepper-infused period of time, performing acts of violence upon the Objective-C runtime, UIApplication, and the layer stack. It was a blast being able to use all my platform knowledge with the express purpose of subverting it.…

May 2 2013

Static Cling

I was hanging out on the #macdev IRC channel on Freenode the other day when someone asked a question: “static has different meanings based on the context it is placed in, right?”. Indeed, it has different meaning. And yet it’s the same.…

Apr 11 2013

Spelunkhead

You can find all sorts of interesting and useful stuff in Apple’s header files. Don’t be afraid to explore them. I usually troll through the headers when a new major SDK version comes out (like IOS 7 probably will be this year) to see what’s new.…

Apr 5 2013

The Write Stuff

If anyone would have told me 30 years ago that I’d actually enjoy writing, that I’d look forward to writing something new, that I’d earn part of my living from the act of writing, I would have sent them straight to a psychiatrist.…

Mar 28 2013

The Ranch at CocoaConf/DC

Just got back from the DC area, where some fellow Ranchers and I went to CocoaConf. If you’re not familiar with CocoaConf, it’s a traveling technical conference for Mac and iOS developers. I like to call it a peripatetic conference, where Dave Klein (who runs the conference) travels around with his family to different cities and puts on a great conference.…

Mar 21 2013

Incremental Arrayification

Simple questions can be fun. A friend in the Pittsburgh CocoaHeads said “Hey MarkD. We’re having a discussion at work on the right way to iterate through an NSArray. One dude said to just use the for...in syntax, and the other said that we should always use the block based iteration form.…

Older posts