Even Apple Leaves TODOs in Production Code

My credit card got charged today for my Apple Watch which wasn't supposed to ship until June. I was so excited that I tweeted the shipping notification to sarcastically note the availability in June still. Copying that text into a tweet, I actually got: Preparing for Shipment TODO: Pull info bubble content div up to the order list level (only need 1 per page) and refactor info bubbles into single conditional & span based on group status type OR alternatively, refactor to single info bubble per delivery group based on status shipped shipped Available to ship: June ...

April 22, 2015 · 1 min · Aaron

NSNotificationCenter Block-based Observer

Back in iOS 4, a nifty block-based observer method was added to NSNotificationCenter: (id)addObserverForName:(NSString *)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *))block; Super convenient, right? I love using blocks to pass simple callbacks to controllers instead of creating a delegate protocol. There is a catch with this method, and it's not terribly obvious unless you're looking closely. The method returns (id) - according to Apple's documentation the return object is "An opaque object to act as the observer". What does this mean? ...

December 17, 2013 · 1 min · Aaron