<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>Code on The Dangling Pointer</title><link>https://aaron.blog/tags/code/</link><description>Recent content in Code on The Dangling Pointer</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 22 Apr 2015 16:05:45 +0000</lastBuildDate><atom:link href="https://aaron.blog/tags/code/index.xml" rel="self" type="application/rss+xml"/><item><title>Even Apple Leaves TODOs in Production Code</title><link>https://aaron.blog/even-apple-leaves-todos-in-production-code/</link><pubDate>Wed, 22 Apr 2015 16:05:45 +0000</pubDate><guid>https://aaron.blog/even-apple-leaves-todos-in-production-code/</guid><description>&lt;p&gt;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.&lt;/p&gt;&lt;figure&gt;&lt;img src="2015-04-22_11-02-33.png" class="kg-image" alt="Screen capture of the Preparing Shipment notification with a note of the watch being available in June" loading="lazy" width="660" height="183"&gt;&lt;/figure&gt;&lt;p&gt;Copying that text into a tweet, I actually got:&lt;/p&gt;&lt;p&gt;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 &amp;amp; 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&lt;/p&gt;</description></item><item><title>NSNotificationCenter Block-based Observer</title><link>https://aaron.blog/nsnotificationcenter-block-based-observer-2/</link><pubDate>Tue, 17 Dec 2013 15:22:37 +0000</pubDate><guid>https://aaron.blog/nsnotificationcenter-block-based-observer-2/</guid><description>&lt;p&gt;Back in iOS 4, a nifty block-based observer method was added to NSNotificationCenter:&lt;br&gt;&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;(id)addObserverForName:(NSString *)name object:(id)obj queue:(NSOperationQueue *)queue usingBlock:(void (^)(NSNotification *))block;&lt;/code&gt;&lt;br&gt;&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;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?&lt;/p&gt;</description></item></channel></rss>