<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom">

	<title>Planet Cocoa</title>
	
	<link href="http://www.planetcocoa.org/" />
	<id>http://www.planetcocoa.org/atom.xml</id>
	<updated>2012-05-26T21:50:05+00:00</updated>
	<generator uri="http://www.planetplanet.org/">Planet/2.0 +http://www.planetplanet.org</generator>

	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/PlanetCocoa" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="planetcocoa" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry xml:lang="en">
		<title type="html">The Talk Show With John Gruber</title>
		<link href="http://www.red-sweater.com/blog/2495/the-talk-show-with-john-gruber" />
		<id>http://www.red-sweater.com/blog/?p=2495</id>
		<updated>2012-05-25T18:40:45+00:00</updated>
		<content type="html">&lt;p&gt;For the past few years, John Gruber and Dan Benjamin recorded an informal, off-the-cuff-seeming podcast called &lt;a href="http://5by5.tv/talkshow"&gt;The Talk Show&lt;/a&gt;. I didn&amp;#8217;t listen to &lt;em&gt;every episode&lt;/em&gt;, but I listened from the very beginning, before Dan had even founded the &lt;a href="http://5by5.tv"&gt;5by5&lt;/a&gt; network that later became its home.&lt;/p&gt;
&lt;p&gt;I see The Talk Show&amp;#8217;s format as the prototype for many other successful 5by5 podcasts: Dan plays the cool, somewhat disinterested straight-man to a &amp;#8220;star,&amp;#8221; whose own temperament, philosophies and interests ultimately define the show. After the initial success of The Talk Show, Dan threw the net wide, inviting folks such as &lt;a href="http://5by5.tv/buildanalyze"&gt;Marco Arment&lt;/a&gt;, &lt;a href="http://5by5.tv/ia/28"&gt;Andy Ihnatko&lt;/a&gt;, &lt;a href="http://5by5.tv/b2w"&gt;Merlin Mann&lt;/a&gt;, &lt;a href="http://5by5.tv/hypercritical"&gt;John Siracusa&lt;/a&gt;, &lt;a href="http://5by5.tv/criticalpath"&gt;Horace Dediu&lt;/a&gt;, and &lt;a href="http://5by5.tv/amplified"&gt;Jim Dalrymple&lt;/a&gt; to indulge audiences with their own personalities and areas of expertise. I even had the pleasure of playing the star myself on one &lt;a href="http://5by5.tv/buildanalyze/74"&gt;episode of Build &amp;amp; Analyze&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Last week, John &lt;a href="http://daringfireball.net/linked/2012/05/18/the-talk-show"&gt;announced matter-of-factly&lt;/a&gt; that The Talk Show would no longer air on the 5by5 network, and would be joining the lineup at the fledgling &lt;a href="http://muleradio.net/thetalkshow/2/"&gt;Mule Radio Syndicate&lt;/a&gt;. Dan does a great job at 5by5 of emphasizing that the star of each show is who makes the show what it is. Nonetheless, Dan&amp;#8217;s personality is unavoidably material to the mood and progression of these shows, so it&amp;#8217;s safe to say that The Talk Show&amp;#8217;s departure from 5by5 marks the end of an era.&lt;/p&gt;
&lt;p&gt;The good news for fans of John Gruber, is it doesn&amp;#8217;t mark the end of The Talk Show. John&amp;#8217;s obsessive, meandering, sometimes distracted personality lives on at Mule, and I think this promises to be another great era in The Talk Show&amp;#8217;s history. &lt;a href="http://muleradio.net/thetalkshow/1/"&gt;Episode 1&lt;/a&gt; featured &lt;a href="http://verynicewebsite.net"&gt;John Moltz&lt;/a&gt; of &lt;a href="http://crazyapplerumors.com"&gt;Crazy Apple Rumors&lt;/a&gt; fame, and the two delved into all the kinds of topics I&amp;#8217;d expect. I thoroughly enjoyed the show.&lt;/p&gt;
&lt;p&gt;I enjoyed it so much, I decided to co-sponsor this week&amp;#8217;s episode, along with my good friends from &lt;a href="http://www.barebones.com"&gt;Bare Bones Software&lt;/a&gt;: &lt;/p&gt;
&lt;p&gt;The Talk Show Episode #2: &lt;a href="http://muleradio.net/thetalkshow/2/"&gt;Dare I Say, Kubrick?&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Much to my delight, the episode turned out to feature one of my favorite &amp;#8220;internet stars,&amp;#8221; Mr. Adam Lisagor of &lt;a href="http://sandwichvideo.com"&gt;Sandwich Video&lt;/a&gt; fame. John literally &lt;em&gt;can&amp;#8217;t go wrong&lt;/em&gt; if these folks are representative of the stature of future guests. So, give the new Talk Show a try, won&amp;#8217;t you?&lt;/p&gt;</content>
		<author>
			<name>Red Sweater Blog</name>
			<uri>http://www.red-sweater.com/blog</uri>
		</author>
		<source>
			<title type="html">Red Sweater Blog</title>
			<subtitle type="html">Mac &amp;amp; Technology Writings by Daniel Jalkut</subtitle>
			<link rel="self" href="http://www.red-sweater.com/blog/feed" />
			<id>http://www.red-sweater.com/blog/feed</id>
			<updated>2012-05-26T21:49:40+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Carlos Garcia Campos is now a WebKit reviewer!</title>
		<link href="http://www.webkit.org/blog/2041/carlos-garcia-campos-is-now-a-webkit-reviewer/" />
		<id>http://www.webkit.org/blog/?p=2041</id>
		<updated>2012-05-23T10:48:29+00:00</updated>
		<content type="html">&lt;p&gt;We&amp;#8217;re happy to announce that Carlos Garcia Campos is now a WebKit&lt;br /&gt;
reviewer. Carlos has most recently been the fearless leader of&lt;br /&gt;
Igalia&amp;#8217;s efforts to release a stable version of WebKit2 for GTK+. You&lt;br /&gt;
may also remember his work porting much of the GTK+ platform layer to&lt;br /&gt;
GTK+ 3.x.&lt;/p&gt;
&lt;p&gt;Congratulations Carlos!&lt;/p&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Last week in WebKit: Input padding, 8-bit canvas and CSS Variables</title>
		<link href="http://www.webkit.org/blog/2036/last-week-in-webkit-input-padding-8-bit-canvas-and-css-variables/" />
		<id>http://www.webkit.org/blog/?p=2036</id>
		<updated>2012-05-22T19:07:04+00:00</updated>
		<content type="html">&lt;p&gt;This update addresses last week&amp;#8217;s 820 changes to WebKit&amp;#8217;s repository, up to revision 117727.&lt;/p&gt;
&lt;p&gt;The debugger sidebar for Web Inspector&amp;#8217;s Script Panel can now be &lt;a title="Web Inspector: add show/hide debugger sidebar button. " href="http://trac.webkit.org/changeset/117064"&gt;toggled using a button&lt;/a&gt;. Console messages about Content Security Policy violations &lt;a title="Content Security Policy console errors include violated directive. " href="http://trac.webkit.org/changeset/117006"&gt;now name the directive&lt;/a&gt; and support for saving snippets &lt;a title="Web Inspector: Support script snippets saving. " href="http://trac.webkit.org/changeset/117299"&gt;has been implemented&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Using the latest CSS Flexible Box module &lt;a title="rename display:-webkit-flexbox to display:-webkit-flex " href="http://trac.webkit.org/changeset/117385"&gt;now requires you&lt;/a&gt; to define an element&amp;#8217;s display property as &amp;#8220;-webkit-flex&amp;#8221; as opposed to the previous &amp;#8220;-webkit-flexbox&amp;#8221;. Input elements are now two pixels smaller in width, as one pixel of unnecessary padding &lt;a title="WebKit erroneously add 1px padding in input elements " href="http://trac.webkit.org/changeset/117672"&gt;has been removed&lt;/a&gt; from either side.&lt;/p&gt;
&lt;p&gt;Image smoothing for the &amp;lt;canvas&amp;gt; element &lt;a title="Support imageSmoothingEnabled " href="http://trac.webkit.org/changeset/117635"&gt;may now be disabled&lt;/a&gt;. Loading video files served through scripts without a supplied mime-type &lt;a title="video won't load when URL ends with .php" href="https://bugs.webkit.org/show_bug.cgi?id=86308"&gt;will now work&lt;/a&gt;, and two issues with CSS 2.1 support have been fixed, namely &lt;a title="CSS 2.1 failure: inline-table-001 fails " href="http://trac.webkit.org/changeset/117339"&gt;text baselines&lt;/a&gt; in the first row of a table and &lt;a title="Standalone table-columns should be wrapped in anonymous tables " href="http://trac.webkit.org/changeset/117640"&gt;wrapping stand-alone table columns&lt;/a&gt; in anonymous tables.&lt;/p&gt;
&lt;p&gt;A compile-time flag &lt;a title="Introduce ENABLE_CSS_VARIABLES compile flag. " href="http://trac.webkit.org/changeset/117028"&gt;has been introduced&lt;/a&gt; for toggling support for CSS Variables in WebKit ports. Furthermore, an &lt;a title="Add tests for CSS Variables. " href="http://trac.webkit.org/changeset/117390"&gt;initial test-suite&lt;/a&gt; to test the status of the implementation has landed as well.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Other changes which occurred last week&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Cloning DOM nodes &lt;a title="Avoid reparsing the style attribute when cloning elements. " href="http://trac.webkit.org/changeset/117323"&gt;has become ~10% faster&lt;/a&gt;, as WebKit no longer reparses the style attribute.&lt;/li&gt;
&lt;li&gt;Chromium &lt;a title="[Chromium] Enable datalist for input type email " href="http://trac.webkit.org/changeset/117726"&gt;has enabled support&lt;/a&gt; for &amp;lt;datalist&amp;gt; for e-mail input fields.&lt;/li&gt;
&lt;li&gt;The Qt port &lt;a title="[Qt] Enable SVG Fonts by default " href="http://trac.webkit.org/changeset/117259"&gt;enabled support&lt;/a&gt; for SVG Fonts, while the EFL port &lt;a title="[EFL] Add simple implementation of Web Intents " href="http://trac.webkit.org/changeset/117551"&gt;is working on&lt;/a&gt; Web Intent support.&lt;/li&gt;
&lt;li&gt;Both the &lt;a title="[BlackBerry] Enable the Fullscreen API " href="http://trac.webkit.org/changeset/117148"&gt;BlackBerry&lt;/a&gt; as the &lt;a title="[EFL] Enable Fullscreen API " href="http://trac.webkit.org/changeset/117205"&gt;EFL&lt;/a&gt; ports have enabled support for the Full Screen API.&lt;/li&gt;
&lt;li&gt;No warning &lt;a title="layerX/layerY warning should be removed " href="http://trac.webkit.org/changeset/117335"&gt;will be shown&lt;/a&gt; in the console anymore for sites using layerX/layerY.&lt;/li&gt;
&lt;li&gt;Levi Weintraub now is &lt;a title="Unreviewed. Moving myself from committer to reviewer. " href="http://trac.webkit.org/changeset/117642"&gt;a WebKit Reviewer&lt;/a&gt;, congratulations!&lt;/li&gt;
&lt;/ul&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Announcing Skyscraper</title>
		<link href="http://staging.losingfight.com/blog/2012/05/21/announcing-skyscraper/" />
		<id>http://staging.losingfight.com/blog/?p=547</id>
		<updated>2012-05-21T20:37:25+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;rsquo;m happy to announce that I&amp;rsquo;ve acquired Pandora from &lt;a href="http://positivespinmedia.com/"&gt;Positive Spin Media&lt;/a&gt;, and renamed it Skyscraper in order to reduce confusion with the music service. &lt;a href="http://fortunatebear.com/products/skyscraper/"&gt;Skyscraper is a web scraper&lt;/a&gt; specializing in finding and downloading images. It can take advantage of Google Image Search to do keyword searches or simply scrape images (or other kinds of files) from a URL that you give to it. It automatically downloads the images into folders and allows you to perform some simple management. It also has a built-in slide show.&lt;/p&gt;
&lt;p&gt;Skyscraper has a &lt;a href="http://fortunatebear.com/products/skyscraper/download/"&gt;free limited trial&lt;/a&gt;, so there&amp;rsquo;s no reason not to give it a try. Skyscraper is free for existing Pandora customers, otherwise $29.99 for new customers.&lt;/p&gt;
&lt;p&gt;You can read more about &lt;a href="http://prmac.com/release-id-42997.htm"&gt;the acquisition in the press release&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Safe from the Losing Fight</name>
			<uri>http://staging.losingfight.com/blog/</uri>
		</author>
		<source>
			<title type="html">Safe from the Losing Fight</title>
			<subtitle type="html">because I don&amp;rsquo;t write software for Windows</subtitle>
			<link rel="self" href="http://losingfight.com/blog/feed/" />
			<id>http://losingfight.com/blog/feed/</id>
			<updated>2012-05-25T01:03:18+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">WWDC 2012 Preparation</title>
		<link href="http://bill.dudney.net/roller/objc/entry/wwdc_2011_preparation" />
		<id>http://bill.dudney.net/roller/objc/entry/wwdc_2011_preparation</id>
		<updated>2012-05-21T15:33:44+00:00</updated>
		<content type="html">&lt;p&gt;WWDC is one giant fire hose of knowledge. From Monday through Friday it's non-stop cool demo and amazing content. To get the most out of the sessions it's often helpful to go in with at least a passing familiarity with the content so your brain has some pre-processing done on the info and has some hooks to hang the new info on. To that end I offer a list of my favorite WWDC sessions from 2011. You can watch them &lt;a href="https://developer.apple.com/videos/wwdc/2011/"&gt;on-line&lt;/a&gt; or download them to iTunes and sync them for watching on the flight in.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;100 - What's New in Cocoa Touch&lt;/li&gt;
&lt;li&gt;101 - What's new in Cocoa&lt;/li&gt;
&lt;li&gt;102 - Implementing UIVC Containment&lt;/li&gt;
&lt;li&gt;103 - Cocoa Autolayout&lt;/li&gt;
&lt;li&gt;104 - Advanced Scroll View Techniques&lt;/li&gt;
&lt;li&gt;111 - Visualizing Information Geographically with MapKit&lt;/li&gt;
&lt;li&gt;116 - Storing Docs in iCloud Using iOS 5&lt;/li&gt;
&lt;li&gt;117 - Performing Calendar Calculations&lt;/li&gt;
&lt;li&gt;121 - Understanding UIKit Rendering&lt;/li&gt;
&lt;li&gt;128 - Advanced Text Processing&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;203 - Introducing App Sandbox&lt;/li&gt;
&lt;li&gt;204 - App Sandbox for the Mac App Store&lt;/li&gt;
&lt;li&gt;206 - Introducing XPC&lt;/li&gt;
&lt;li&gt;209 - Inside the accelerate Framework for IOS&lt;/li&gt;
&lt;li&gt;210 - Mastering GCD&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;318 - iOS Performance in Depth&lt;/li&gt;
&lt;li&gt;319 - Effective Debugging with Xcode 4&lt;/li&gt;
&lt;li&gt;321 - Migrating from GDB to LLDB&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;401 - What's new in OpenCL&lt;/li&gt;
&lt;li&gt;402 - Essential Game Technologies for iOS, Part 1&lt;/li&gt;
&lt;li&gt;403 - Essential Game Technologies for iOS, Part 2&lt;/li&gt;
&lt;li&gt;404 - Audio Dev for Games&lt;/li&gt;
&lt;li&gt;405 - Exploring AVFoundation&lt;/li&gt;
&lt;li&gt;408 - HTTP Live Streaming Update&lt;/li&gt;
&lt;li&gt;414 - Advances in OpenGL ES for iOS 5&lt;/li&gt;
&lt;li&gt;415 - Working with Media in AV Foundation&lt;/li&gt;
&lt;li&gt;416 - Tools for Tuning OpenGL ES Apps on iOS&lt;/li&gt;
&lt;li&gt;417 - Introducing AVFoundation Capture For Lion&lt;/li&gt;
&lt;li&gt;418 - Best Practices for OpenGL ES on iOS&lt;/li&gt;
&lt;li&gt;419 - Capture from Camera Using AVFoundation on iOS&lt;/li&gt;
&lt;li&gt;422 - Using Core Image on iOS and Mac OS X&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;500 - What's new in Core Location&lt;/li&gt;
&lt;li&gt;503 - Hidden Gems for Web Apps&lt;/li&gt;
&lt;li&gt;504 - Building Newsstand Apps&lt;/li&gt;
&lt;li&gt;507 - iBooks&lt;/li&gt;
&lt;li&gt;509 - What New in CSS Effects and Animation&lt;/li&gt;
&lt;li&gt;516 - Understanding Layout and Gestures&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Of course since the content is going to be downloadable shortly after the show so the most important thing is not the sessions. Make sure to read Jeff's &lt;a href="http://iphonedevelopment.blogspot.com/2012/05/wwdc-first-timers-guide-2012-edition.html"&gt;guide&lt;/a&gt;. He has a ton of practical advice on how to survive/thrive at WWDC.&lt;/p&gt;</content>
		<author>
			<name>objc</name>
			<uri>http://bill.dudney.net/roller/objc/</uri>
		</author>
		<source>
			<title type="html">PrEV</title>
			<subtitle type="html">Thoughts from a NeXTStep Guy on Cocoa Development</subtitle>
			<link rel="self" href="http://bill.dudney.net/roller/objc/feed/entries/atom" />
			<id>http://bill.dudney.net/roller/objc/feed/entries/atom</id>
			<updated>2012-05-25T11:32:14+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">MarsEdit 3.5.3: Mea Culpa</title>
		<link href="http://www.red-sweater.com/blog/2488/marsedit-3-5-3-mea-culpa" />
		<id>http://www.red-sweater.com/blog/?p=2488</id>
		<updated>2012-05-19T21:46:20+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href="https://www.red-sweater.com/marsedit"&gt;MarsEdit 3.5.3&lt;/a&gt; is now available as a direct download from the MarsEdit home page. A release in the Mac App Store is pending review (Update: &lt;a href="http://bit.ly/marseditmacappstore" target="itunes_store"&gt;now available&lt;/a&gt;). This is a free update for licensed MarsEdit customers.&lt;/p&gt;
&lt;p&gt;MarsEdit 3.5.2 yesterday, 3.5.3 today. Shipping subsequent updates a day apart is almost never a sign that things went the way a developer expected. In this case, I discovered a bug in MarsEdit 3.5.2 (and 3.5.1, as it happens) that would cause the blog settings editing panel in MarsEdit to fill up all of a blog&amp;#8217;s settings with default values when you opened it to tweak a blog. Then, if you innocently click &amp;#8220;OK&amp;#8221;, wham, all your blog settings are updated with default settings. Not good.&lt;/p&gt;
&lt;p&gt;So the focus on MarsEdit 3.6 was instantly sidelined, and MarsEdit 3.5.3 was brought to existence in the space of about an hour today, taking this critical bug fix and a couple other less urgent fixes that didn&amp;#8217;t make it in time for 3.5.2.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fix a serious bug that reverted blog settings to default values when opening the settings panel&lt;/li&gt;
&lt;li&gt;Avoid a crash when running on a 10.6 system with older versions of Safari installed&lt;/li&gt;
&lt;li&gt;Fix a rich-mode editing paste bug that could cause unwanted
&lt;div&gt; entries in HTML&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I also submitted an expedited review request to the Mac App Store. Here&amp;#8217;s hoping that will request in a shorter wait time for Mac App Store customers. Please note however that if you own the Mac App Store edition of any of my apps, you are also entitled to download and run the direct-sale versions from my site without limitation.&lt;/p&gt;</content>
		<author>
			<name>Red Sweater Blog</name>
			<uri>http://www.red-sweater.com/blog</uri>
		</author>
		<source>
			<title type="html">Red Sweater Blog</title>
			<subtitle type="html">Mac &amp;amp; Technology Writings by Daniel Jalkut</subtitle>
			<link rel="self" href="http://www.red-sweater.com/blog/feed" />
			<id>http://www.red-sweater.com/blog/feed</id>
			<updated>2012-05-26T21:49:40+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Friday Q&amp;amp;amp;A 2012-05-18: A Tour of PLWeakCompatibility: Part I</title>
		<link href="http://www.mikeash.com/pyblog/friday-qa-2012-05-18-a-tour-of-plweakcompatibility-part-i.html" />
		<id>http://www.mikeash.com/?page=pyblog/friday-qa-2012-05-18-a-tour-of-plweakcompatibility-part-i.html</id>
		<updated>2012-05-18T16:53:00+00:00</updated>
		<content type="html">A few weeks ago, I &lt;a href="http://www.mikeash.com/pyblog/introducing-plweakcompatibility.html"&gt;introduced &lt;code&gt;PLWeakCompatibility&lt;/code&gt;&lt;/a&gt;. This is a small library that can be dropped into an app to enable use of the &lt;code&gt;__weak&lt;/code&gt; qualifier on OSes that don't support it. ARC is officially supported on Mac OS X 10.6 and iOS 4, but &lt;code&gt;__weak&lt;/code&gt; is only available on 10.7 and iOS 5. &lt;code&gt;PLWeakCompatibility&lt;/code&gt; adds support for &lt;code&gt;__weak&lt;/code&gt; on those older OSes when using ARC. Today I'm going to discuss how &lt;code&gt;PLWeakCompatibility&lt;/code&gt; works on the inside.&lt;br /&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-05-18-a-tour-of-plweakcompatibility-part-i.html"&gt;(Read More)&lt;/a&gt;</content>
		<author>
			<name>NSBlog</name>
			<uri>http://www.mikeash.com/pyblog/</uri>
		</author>
		<source>
			<title type="html">NSBlog</title>
			<subtitle type="html">Mac OS X and Cocoa programming</subtitle>
			<link rel="self" href="http://www.mikeash.com/pyblog/rss.py" />
			<id>http://www.mikeash.com/pyblog/rss.py</id>
			<updated>2012-05-26T21:49:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">MarsEdit 3.5.2: Character Count</title>
		<link href="http://www.red-sweater.com/blog/2480/marsedit-3-5-2-character-count" />
		<id>http://www.red-sweater.com/blog/?p=2480</id>
		<updated>2012-05-18T13:34:48+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href="https://www.red-sweater.com/marsedit"&gt;MarsEdit 3.5.2&lt;/a&gt; is now available on the &lt;a href="http://bit.ly/marseditmacappstore" target="itunes_store"&gt;Mac App Store&lt;/a&gt; and directly from the &lt;a href="https://www.red-sweater.com/store/"&gt;Red Sweater Store&lt;/a&gt;. This is a free update for licensed MarsEdit customers.&lt;/p&gt;
&lt;p&gt;Mostly just another batch of bug fixes here, but I snuck in one small feature-tweak that should please writers in character-based languages and authors who aim for character-based writing goals rather than word-based.&lt;/p&gt;
&lt;p&gt;If you weren&amp;#8217;t aware of MarsEdit&amp;#8217;s live-updated word count feature, it&amp;#8217;s located in the &amp;#8220;Status Bar&amp;#8221;, which you can activate by selecting View -&gt; Show Status Bar. Here is an example of how it looks when editing a post in MarsEdit 3.5.2:&lt;/p&gt;
&lt;p&gt;&lt;img src="http://www.red-sweater.com/blog/wp-content/downloads/2012/05/CharacterCount.jpg" alt="Screenshot of the MarsEdit word and character count status indicator." title="CharacterCount.jpg" width="367" height="113" /&gt;&lt;/p&gt;
&lt;p&gt;Here&amp;#8217;s the complete list of changes for this release:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;MarsEdit 3.5.2&lt;/strong&gt;            &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Status bar in post editor now includes character count along with word count&lt;/li&gt;
&lt;li&gt;Restore ability to paste HTML with &amp;#8220;embed&amp;#8221; tags in the Rich Editor&lt;/li&gt;
&lt;li&gt;Restore expected list manipulation behavior with tab and return keys&lt;/li&gt;
&lt;li&gt;Fix a crash that occurred when editing a Tumblr quotation post with no attribution&lt;/li&gt;
&lt;li&gt;Work around issue with WordPress pages showing up as empty posts if not permitted to edit&lt;/li&gt;
&lt;li&gt;Fix autoconfiguration of IBM Lotus Connections blogs&lt;/li&gt;
&lt;li&gt;Fix the scrolling behavior of custom fields text input&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Onward to MarsEdit 3.6!&lt;/p&gt;</content>
		<author>
			<name>Red Sweater Blog</name>
			<uri>http://www.red-sweater.com/blog</uri>
		</author>
		<source>
			<title type="html">Red Sweater Blog</title>
			<subtitle type="html">Mac &amp;amp; Technology Writings by Daniel Jalkut</subtitle>
			<link rel="self" href="http://www.red-sweater.com/blog/feed" />
			<id>http://www.red-sweater.com/blog/feed</id>
			<updated>2012-05-26T21:49:40+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Levi Weintraub is a WebKit Reviewer</title>
		<link href="http://www.webkit.org/blog/2032/levi-weintraub-is-a-webkit-reviewer/" />
		<id>http://www.webkit.org/blog/?p=2032</id>
		<updated>2012-05-18T04:06:23+00:00</updated>
		<content type="html">&lt;p&gt;Levi Weintraub has been with webkit.org &lt;a href="http://trac.webkit.org/search?q=leviw%40"&gt;a long time&lt;/a&gt;. He&amp;#8217;s known for various projects including his &lt;a href="http://trac.webkit.org/changeset/89864"&gt;bidi work&lt;/a&gt; and most recently our &lt;a href="http://trac.webkit.org/wiki/LayoutUnit"&gt;subpixel layout&lt;/a&gt; support. Please join me in congratulating our latest reviewer!&lt;/p&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Testing Pagesmith Footnotes</title>
		<link href="http://staging.losingfight.com/blog/2012/05/18/testing-pagesmith-footnotes/" />
		<id>http://staging.losingfight.com/blog/?p=544</id>
		<updated>2012-05-18T00:06:04+00:00</updated>
		<content type="html">&lt;p&gt;I have footnotes working in Pagesmith and polished enough that I can show it to other people. I need some help find bugs in the edge cases, so if you&amp;rsquo;d like to give footnotes a spin before everyone else, shoot me an email: andy at fortunatebear.&lt;/p&gt;</content>
		<author>
			<name>Safe from the Losing Fight</name>
			<uri>http://staging.losingfight.com/blog/</uri>
		</author>
		<source>
			<title type="html">Safe from the Losing Fight</title>
			<subtitle type="html">because I don&amp;rsquo;t write software for Windows</subtitle>
			<link rel="self" href="http://losingfight.com/blog/feed/" />
			<id>http://losingfight.com/blog/feed/</id>
			<updated>2012-05-25T01:03:18+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-us">
		<title type="html">Quick VoodooPad 5 Postmortem</title>
		<link href="http://shapeof.com/archives/2012/05/quick_voodoopad_5_postmortem.html" />
		<id>urn:uuid:68853ccc-4a33-429a-a4bb-d996e375eb1c</id>
		<updated>2012-05-17T22:32:08+00:00</updated>
		<content type="html" xml:lang="en">I was pretty floored by the response to VoodooPad 5's release.  I really didn't expect it to make much of a dent- but I was sent tons of positive feedback and sales were much better than I anticipated.  The Mac App Store even featured it last week.  So thanks to everyone who purchased it and sent in feedback!&lt;br /&gt;
&lt;br /&gt;
Nobody complained about VoodooPad Lite not making the jump to version 5- so I think that was a good move on my part.  And swapping out the old page event system with a new one based on JavaScript seems to be a hit.  I keep on seeing interesting bits of code that people are writing in VP to automate things.&lt;br /&gt;
&lt;br /&gt;
Another thing I wasn't expecting was the response to adding Markdown as a page type in VP5.  Turns out tons and tons of people really wanted this- much more than I would have figured.  I think I'll be spending more time in future releases making Markdown even better (5.0.2 has some improvements in this area, as I'm starting to get hooked onto Markdown myself).&lt;br /&gt;
&lt;br /&gt;
I've also recently released VoodooPad 5.0.1 which fixed some pretty important bugs, and I'm currently finishing up 5.0.2.  VoodooPad for iOS 2.0.1 was also released today- so if you've been running into any issues with Dropbox syncing, make sure to update.&lt;br /&gt;
&lt;br /&gt;
For fun, here's a couple of recent reviews of VP5:&lt;br /&gt;
&lt;br /&gt;
TUAW: &lt;a href="http://www.tuaw.com/2012/04/26/voodoopad-5-wiki-magic/"&gt;VoodooPad 5: wiki magic&lt;/a&gt;&lt;br /&gt;
MacStories: &lt;a href="http://www.macstories.net/reviews/building-our-macstories-wiki-with-voodoopad-5/"&gt;Building Our MacStories Wiki with VoodooPad 5&lt;/a&gt;&lt;br /&gt;
TenOneHundred: &lt;a href="http://10100.org/home/2012/4/25/voodoopad-5-review-well-kind-of.html"&gt;VoodooPad 5 Review&lt;/a&gt;</content>
		<author>
			<name>Gus Mueller</name>
			<uri>http://shapeof.com/</uri>
		</author>
		<source>
			<title type="html">The Shape of Everything</title>
			<link rel="self" href="http://gusmueller.com/blog/atom.xml" />
			<id>http://shapeof.com/</id>
			<updated>2012-05-17T22:32:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Unit Testing with Core Data</title>
		<link href="http://www.cimgf.com/2012/05/15/unit-testing-with-core-data/" />
		<id>http://www.cimgf.com/?p=1673</id>
		<updated>2012-05-15T21:43:58+00:00</updated>
		<content type="html">&lt;p&gt;Whether you subscribe to Test Driven Development (TDD) or another testing practice, when it comes automated unit testing with Core Data, things can be a little tricky. But if you keep it simple, and take things step by step, you can get up and running with unit testing using Core Data fairly quickly. We&amp;#8217;ll explore the what, how and why of unit testing with Core Data. We&amp;#8217;ll also be using the helper library &lt;a href="http://magicalrecord.com"&gt;MagicalRecord&lt;/a&gt;. MagicalRecord not only lets us get up and running faster, but helps to cut down on the noise in our tests.&lt;/p&gt;

&lt;p&gt;&lt;span id="more-1673"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;h2&gt;Testing Environment&lt;/h2&gt;

&lt;p&gt;When you set up a Core Data stack using a file based store (say, using the sqlite store), that file becomes tied to the data model. That is for good reason. Core Data needs to first verify several things before it can use that data store. It must verify the entities have all the attributes the data model expects, as well as to ensure all entities are present in the store. The data and the description of that data must match exactly. However, when you are developing an app using Core Data, this schema changes fast. Adding a new attribute, or even simply changing it&amp;#8217;s type can alter the version hashes enough so that the file version and the model version don&amp;#8217;t match.&lt;/p&gt;

&lt;p&gt;All this is to say that using a file based datastore for unit testing is problematic. Even if you were to set up your file based Core Data model to be auto migrating, it&amp;#8217;s still highly likely you&amp;#8217;ll perform a refactoring that is simply not compatible with automigrations. Another likely scenario when testing is that you&amp;#8217;ll want to create simple test data for a single test, or suite of tests, and then delete it.&lt;/p&gt;

&lt;p&gt;While testing with a file based Core Data store is possible, it&amp;#8217;s fairly tricky and error prone. Generally, when you setup your test cases, you&amp;#8217;ll want to load your sample set of data. When you&amp;#8217;re finished, you&amp;#8217;ll then want to delete all that data. Unit tests should fail on an error with our application code, not our test infrastructure, setup or teardown code. And besides, I know you&amp;#8217;ve already jumped to the same conclusion I have by now, and that&amp;#8217;s to use an In-Memory persistent store. Not only are there no file deletions to deal with, you will never have to perform a migration. Since during unit testing, you want a temporary store, the in-memory store is a perfect setup.&lt;/p&gt;

&lt;blockquote&gt;&lt;strong&gt;Note:&lt;/strong&gt; Using an in-memory store to perform tests against a Core Data store is not an entirely new concept. &lt;a href="http://twitter.com/secboffin"&gt;Graham Lee&lt;/a&gt; has also previously &lt;a href="http://iamleeg.blogspot.com/2010/01/unit-testing-core-data-driven-apps-fit.html"&gt;described&lt;/a&gt; his process and setup for testing Core Data with an in-memory store.&lt;/blockquote&gt;

&lt;h2&gt;Quickly Setting up Tests&lt;/h2&gt;

&lt;p&gt;Now that we&amp;#8217;ve gone over a little background, let&amp;#8217;s get to how we can use &lt;a href="http://www.magicalrecord.com"&gt;MagicalRecord&lt;/a&gt; to easily setup our Core Data tests.&lt;/p&gt;

&lt;p&gt;As we&amp;#8217;ve discussed previously, MagicalRecord comes with a set of helpers to build a simple Core Data stack for you. We&amp;#8217;ll use one that&amp;#8217;s fairly straight forward:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setupCoreDataStackWithInMemoryStore&lt;span&gt;&amp;#93;&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;We&amp;#8217;ll also want to clean up the Core Data stack after some tests, and, yes, MagicalRecord provides a handy cleanup method for you:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecordHelpers cleanUp&lt;span&gt;&amp;#93;&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;Let&amp;#8217;s explore when and where to incorporate these method calls into your tests.&lt;/p&gt;

&lt;h2&gt;Testing Frameworks&lt;/h2&gt;

&lt;p&gt;Up to this point, the discussion hasn&amp;#8217;t been geared toward any particular testing framework, although the syntax is common to the SenTestingKit testing framework that is now built in (and a first class citizen in Xcode4). However, there are now several testing frameworks now that provide many structural similarities, while improving on the syntax. Let&amp;#8217;s see how things differ across a few of the more popular testing frameworks available for Objective C.&lt;/p&gt;

&lt;h3&gt;SenTest, OCUnit, GHUnit&lt;/h3&gt;

&lt;p&gt;SenTestingKit and &lt;a href="https://github.com/gabriel/gh-unit"&gt;GHUnit&lt;/a&gt; offer a very similar experience from a testing perspective. Primarily, you create a new subclass of SenTestCase, or GHTestCase, and author all your tests in methods starting with the word &amp;#8220;&lt;em&gt;test&lt;/em&gt;&amp;#8220;. You can also run a method before all tests in the class are performed, or before each method.&lt;/p&gt;

&lt;p&gt;Depending on how you set up your tests, you have two options on where to put the simple MagicalRecord setup method. If you want a pristine data store for every test (useful for isolating tests), then you&amp;#8217;ll want to put this method in the setUp method like so:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;setUp;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setupCoreDataStackWithInMemoryStore&lt;span&gt;&amp;#93;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;However, there are certain cases where you&amp;#8217;ll need to preload a larger test data set to test against. I would recommend doing this before each and every test as it will only slow your test runs down. And making tests slower can eventually lead to you not running them at all. I recommend setting this up once per test suite:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;setUpClass;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setupCoreDataStackWithInMemoryStore&lt;span&gt;&amp;#93;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;And to clean up your stack, simply add a call to the clean up method using the appropriate post-test method, tearDown, or tearDownClass.&lt;/p&gt;

&lt;h3&gt;Kiwi, Cedar&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/allending/Kiwi"&gt;Kiwi&lt;/a&gt; and &lt;a href="https://github.com/pivotal/cedar"&gt;Cedar&lt;/a&gt; are the &lt;a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development"&gt;Behavior Driven Development (BDD)&lt;/a&gt; style frameworks. Rather than methods, you format your tests using blocks, however there are similar mechanics when runnings tests. That is, you also have ways to setup and teardown your test Core Data stack even if the methods aren&amp;#8217;t called setup and teardown. However, with it&amp;#8217;s block type syntax, you can have nested setup calls to &lt;em&gt;beforeAll&lt;/em&gt; and &lt;em&gt;beforeEach&lt;/em&gt;, &lt;em&gt;afterAll&lt;/em&gt; and &lt;em&gt;afterEach&lt;/em&gt; (the BDD versions of the setup and teardown methods). You will want to place your calls to set up your test core data stack at an appropriate level within your block contexts.&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;describe&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span&gt;&amp;quot;MyEntity&amp;quot;&lt;/span&gt;, &lt;span&gt;^&lt;/span&gt;&lt;span&gt;&amp;#123;&lt;/span&gt;
&amp;nbsp;
  beforeEach&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;^&lt;/span&gt;&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setupCoreDataStackWithInMemoryStore&lt;span&gt;&amp;#93;&lt;/span&gt;;
  &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
  afterEach&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;^&lt;/span&gt;&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord cleanUp&lt;span&gt;&amp;#93;&lt;/span&gt;;
  &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
  it&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span&gt;&amp;quot;should do something awesome&amp;quot;&lt;/span&gt;, &lt;span&gt;^&lt;/span&gt;&lt;span&gt;&amp;#123;&lt;/span&gt; &lt;span&gt;/* Put your test here! */&lt;/span&gt; &lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;
&amp;nbsp;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;As you can see, setting up and cleaning up after your tests is fairly easy with MagicalRecord.&lt;/p&gt;

&lt;h2&gt;Supporting Xcode&amp;#8217;s Unit Test Support&lt;/h2&gt;

&lt;p&gt;When using a testing framework like GHUnit, the afore mentioned steps are all that&amp;#8217;s required to get started. However, when it comes to using Xcode&amp;#8217;s built in unit test bundle, there is one extra step required in order to get the stack setup.&lt;/p&gt;

&lt;p&gt;When you first need to load up the Core Data stack, you typically use the method:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;&lt;span&gt;NSManagedObjectModel&lt;/span&gt; mergedModelsFromBundle&lt;span&gt;:&lt;/span&gt;&lt;span&gt;nil&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;This method, give the parameter of nil, will look in the main bundle, which is generally the application bundle, and look for all data model files, and merge those files into a single Core Data model instance for use when instantiating an NSPersistentStoreCoordinator and it&amp;#8217;s related NSPersistentStore. However, with the Unit Test bundle, this call does not return the correct answer, as &lt;a href="http://iamleeg.blogspot.com/2010/01/unit-testing-core-data-driven-apps-fit.html"&gt;documented&lt;/a&gt; by Graham Lee. The solution to this problem is simple: we need to specify the correct bundle so that the Core Data stack initialization process can continue on it&amp;#8217;s way. To do this with MagicalRecord, we use the following setUp method for our tests:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;setUp;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setDefaultModelFromClass&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;self class&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setupCoreDataStackWithInMemoryStore&lt;span&gt;&amp;#93;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;The &lt;em&gt;setDefaultModelFromClass:&lt;/em&gt; method will perform the solution provided by Graham Lee, which is to load the model from the specified class, which, in turn, is the class of the currently executing test case. And now that we have something more generic, we have the ability to create a very simple boilerplate Core Data unit test case:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;//CoreDataTestCase.h&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;@interface&lt;/span&gt; CoreDataTestCase &lt;span&gt;:&lt;/span&gt; SenTestCase
&lt;span&gt;@end&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;//CoreDataTestCase.m&lt;/span&gt;
&lt;span&gt;#import &amp;quot;CoreDataTestCase.h&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;@implementation&lt;/span&gt; CoreDataTestCase
&amp;nbsp;
&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;setUp;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setDefaultModelWithClass&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;self class&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setupCoreDataStackWithInMemoryStore&lt;span&gt;&amp;#93;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;tearDown;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord cleanUp&lt;span&gt;&amp;#93;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;@end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;This means that when you begin authoring unit tests requiring Core Data, you can simply inherit from this base test case, and you&amp;#8217;re ready to start writing tests.&lt;/p&gt;

&lt;h2&gt;A Test Case&lt;/h2&gt;

&lt;p&gt;First of all, it goes without saying that when you&amp;#8217;re using Core Data, you create a set of custom entity classes, which are subclasses of NSManagedObject.  And, to make your life easier, you should always use &lt;a href="http://rentzsch.github.com/mogenerator/"&gt;mogenerator&lt;/a&gt; to create your custom entities. This is where your custom logic will live. Let&amp;#8217;s author a sample test:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;@implementation&lt;/span&gt; SampleTestCase&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;



&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;setUp;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setDefaultModelWithClass&lt;span&gt;:&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;self class&lt;span&gt;&amp;#93;&lt;/span&gt;&lt;span&gt;&amp;#93;&lt;/span&gt;;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord setupCoreDataStackWithInMemoryStore&lt;span&gt;&amp;#93;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;tearDown;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	&lt;span&gt;&amp;#91;&lt;/span&gt;MagicalRecord cleanUp&lt;span&gt;&amp;#93;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;-&lt;/span&gt; &lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;void&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;testSomeCalculationOnMyEntity;
&lt;span&gt;&amp;#123;&lt;/span&gt;
	MyEntity &lt;span&gt;*&lt;/span&gt;testEntity &lt;span&gt;=&lt;/span&gt; &lt;span&gt;&amp;#91;&lt;/span&gt;MyEntity MR_createEntity&lt;span&gt;&amp;#93;&lt;/span&gt;;
	&lt;span&gt;float&lt;/span&gt; expectedValue &lt;span&gt;=&lt;/span&gt; …;
	STAssert&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;&amp;#91;&lt;/span&gt;testEntity customCalculation&lt;span&gt;&amp;#93;&lt;/span&gt; &lt;span&gt;==&lt;/span&gt; expectedValue, &lt;span&gt;@&lt;/span&gt;&lt;span&gt;&amp;quot;expected a good calculation&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;@end&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;The &lt;em&gt;MR_createEntity&lt;/em&gt; method will use the default context that was set up when the &lt;em&gt;setupCoreDataStackWithInMemoryStore&lt;/em&gt; method was called earlier on in the test run. This makes for clean tests based on Core Data, but doesn&amp;#8217;t let the Core Data syntax get in the way of expressing the intent of the test. And, when the test has completed, this sample entity will be deleted by virtue of the store being released from memory, so that the next test can have a clean slate with which to work.&lt;/p&gt;

&lt;h2&gt;Conclusion&lt;/h2&gt;

&lt;p&gt;And with that, you have an extremely simple and fast way to get a test environment setup for unit testing with Core Data. What I enjoy most about this setup is that when authoring unit tests which require Core Data, I am not focused on the details of setting up and tearing down Core Data. Rather, I&amp;#8217;m focused on a single entity, and the things it requires in order to work properly. A sample set of unit tests which, in turn, test MagicalRecord itself are included in the &lt;a href="http://magicalrecord.com"&gt;MagicalRecord source&lt;/a&gt; on github.&lt;/p&gt;

&lt;p&gt;&amp;nbsp;&lt;/p&gt;</content>
		<author>
			<name>Cocoa Is My Girlfriend</name>
			<uri>http://www.cimgf.com</uri>
		</author>
		<source>
			<title type="html">Cocoa Is My Girlfriend</title>
			<subtitle type="html">Taglines are for Windows programmers</subtitle>
			<link rel="self" href="http://www.cimgf.com/feed/" />
			<id>http://www.cimgf.com/feed/</id>
			<updated>2012-05-23T22:32:44+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Compiling Image Resources into a Static Library</title>
		<link href="http://atastypixel.com/blog/compiling-image-resources-into-a-static-library/" />
		<id>http://atastypixel.com/blog/?p=2523</id>
		<updated>2012-05-15T20:12:23+00:00</updated>
		<content type="html">&lt;p&gt;I&amp;#8217;ve recently been working on a static library for distribution to other developers &amp;#8212; &lt;a href="http://audiob.us"&gt;Audiobus&lt;/a&gt; &amp;#8212; and I need to include a couple of graphical resources with the distribution. The usual solution to this is to include the resources separately in a bundle, and require the user to drop them in to their project along with the static library.&lt;/p&gt;

&lt;p&gt;I thought I&amp;#8217;d see if I could make the process just a little neater, and successfully devised a way to compile the images straight into the library, so the distribution remains nice and clean &amp;#8212; just the library itself and a few header files.&lt;/p&gt;

&lt;p&gt;Now, I can pop image resources into a folder, and after compiling, access them within the static library with:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;UIImage &lt;span&gt;*&lt;/span&gt;image &lt;span&gt;=&lt;/span&gt; TPGetCompiledImage&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;@&lt;/span&gt;&lt;span&gt;&amp;quot;Button.png&amp;quot;&lt;/span&gt;&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;It automatically handles &amp;#8220;@2x&amp;#8221; Retina images (although it doesn&amp;#8217;t currently do &amp;#8220;~ipad&amp;#8221; versions).&lt;/p&gt;

&lt;p&gt;Here&amp;#8217;s how it&amp;#8217;s done.&lt;/p&gt;

&lt;p&gt;The magic is in a shell script which uses the &lt;code&gt;xxd&lt;/code&gt; hex dump tool to create C code that represents the image data as a byte array, then creates around it a set of utilities to turn those arrays into UIImages on demand.&lt;/p&gt;

&lt;p&gt;Along with it is a couple of template files &amp;#8212; a header and implementation file &amp;#8212; that describe the format of the derived code.&lt;/p&gt;

&lt;p&gt;Finally, a little tweaking of the project in Xcode (with a brief foray into a text editor to work around some Xcode shortcomings) puts it all together.&lt;span id="more-2523"&gt;&lt;/span&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; Fellow dev Cocoanetics pointed out that they&amp;#8217;d solved a similar problem, and have a great write-up on &lt;a href="http://www.cocoanetics.com/2012/02/xcode-build-rules/"&gt;how they create compiled resources using custom build rules&lt;/a&gt; on their blog.&lt;/p&gt;

&lt;h2&gt;The Image Resources&lt;/h2&gt;

&lt;p&gt;…Just a bunch of &lt;code&gt;png&lt;/code&gt; files within a folder inside your project directory. The script assumes there are normal and retina (&lt;code&gt;@2x&lt;/code&gt;) versions of each.&lt;/p&gt;

&lt;h2&gt;The Template&lt;/h2&gt;

&lt;p&gt;These are the template source files from which the end result will be derived. It contains a few tags that the accompanying shell script will process. I created it in Xcode, placing it within the same folder as the source png images, but removed it from the target&amp;#8217;s compile phase, as we&amp;#8217;ll be adding the derived source instead.&lt;/p&gt;

&lt;p&gt;First the header, &lt;code&gt;TPCompiledResources.h&lt;/code&gt;:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;//&lt;/span&gt;
&lt;span&gt;//  TPCompiledResources.h&lt;/span&gt;
&lt;span&gt;//&lt;/span&gt;
&lt;span&gt;//  Created by Michael Tyson on 13/05/2012.&lt;/span&gt;
&lt;span&gt;//  Copyright (c) 2012 A Tasty Pixel. All rights reserved.&lt;/span&gt;
&lt;span&gt;//&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;#import &amp;lt;UIKit/UIKit.h&amp;gt;&lt;/span&gt;
&amp;nbsp;
UIImage &lt;span&gt;*&lt;/span&gt;TPGetCompiledImage&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;NSString&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; name&lt;span&gt;&amp;#41;&lt;/span&gt;;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;And the implementation file, &lt;code&gt;TPCompiledResources.m&lt;/code&gt;:&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="objc"&gt;&lt;span&gt;//&lt;/span&gt;
&lt;span&gt;//  TPCompiledResources.m&lt;/span&gt;
&lt;span&gt;//&lt;/span&gt;
&lt;span&gt;//  Created by Michael Tyson on 13/05/2012.&lt;/span&gt;
&lt;span&gt;//  Copyright (c) 2012 A Tasty Pixel. All rights reserved.&lt;/span&gt;
&lt;span&gt;//&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;#import &amp;quot;TPCompiledResources.h&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;/*{%IMAGEDATA START%}*/&lt;/span&gt;
&lt;span&gt;/*{%IMAGEDATA END%}*/&lt;/span&gt;
&amp;nbsp;
UIImage &lt;span&gt;*&lt;/span&gt;TPGetCompiledImage&lt;span&gt;&amp;#40;&lt;/span&gt;&lt;span&gt;NSString&lt;/span&gt;&lt;span&gt;*&lt;/span&gt; name&lt;span&gt;&amp;#41;&lt;/span&gt; &lt;span&gt;&amp;#123;&lt;/span&gt;
    &lt;span&gt;/*{%LOAD_TEMPLATE%}
    if ( [name isEqualToString:@&amp;quot;ORIGINAL_FILENAME&amp;quot;] ) {
        static UIImage *_SANITISED_FILENAME_image = nil;
        if ( _SANITISED_FILENAME_image ) return _SANITISED_FILENAME_image;
&amp;nbsp;
        if ( [[UIScreen mainScreen] scale] == 2.0 ) {
            _SANITISED_FILENAME_image = [[UIImage alloc] initWithCGImage:
                                                     [[UIImage imageWithData:[NSData dataWithBytesNoCopy:SANITISED_2X_FILENAME 
                                                                      length:SANITISED_2X_FILENAME_len freeWhenDone:NO]] CGImage] 
                                                                   scale:2.0 
                                                             orientation:UIImageOrientationUp];
        } else {
            _SANITISED_FILENAME_image = [[UIImage alloc] initWithData:[NSData dataWithBytesNoCopy:SANITISED_FILENAME 
                                                                                           length:SANITISED_FILENAME_len freeWhenDone:NO]];
        }
&amp;nbsp;
        return _SANITISED_FILENAME_image;
    }
    {%LOAD_TEMPLATE END%}*/&lt;/span&gt;
&amp;nbsp;
    &lt;span&gt;/*{%IMAGELOADERS START%}*/&lt;/span&gt;
    &lt;span&gt;/*{%IMAGELOADERS END%}*/&lt;/span&gt;
    &lt;span&gt;return&lt;/span&gt; &lt;span&gt;nil&lt;/span&gt;;
&lt;span&gt;&amp;#125;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;h2&gt;The Shell Script&lt;/h2&gt;

&lt;p&gt;Here&amp;#8217;s the script that does all the work. The script looks for all &amp;#8220;png&amp;#8221; images in the given folder, then creates C code representing each image along with wrapper code to give access to the image byte arrays, with help from the template.&lt;/p&gt;

&lt;p&gt;This script goes into a &amp;#8220;Run Script&amp;#8221; phase, placed at the beginning of the library&amp;#8217;s build process.&lt;/p&gt;


&lt;div class="wp_syntax"&gt;&lt;div class="code"&gt;&lt;pre class="bash"&gt;&lt;span&gt;#!/bin/sh&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# Where the images are (get this from the first &amp;quot;Input Files&amp;quot; entry)&lt;/span&gt;
&lt;span&gt;RESOURCES_FOLDER&lt;/span&gt;=&lt;span&gt;`&lt;/span&gt;&lt;span&gt;dirname&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$SCRIPT_INPUT_FILE_0&lt;/span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;`&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# The name of the source template, minus extension&lt;/span&gt;
&lt;span&gt;SOURCE_NAME&lt;/span&gt;=&lt;span&gt;&amp;quot;TPCompiledResources&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# Create C arrays, representing each image&lt;/span&gt;
&lt;span&gt;tmp&lt;/span&gt;=&lt;span&gt;&amp;quot;&lt;span&gt;$TEMP_FILES_DIR&lt;/span&gt;/compile-images-$$.tmp&amp;quot;&lt;/span&gt;
&lt;span&gt;cd&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$RESOURCES_FOLDER&lt;/span&gt;&amp;quot;&lt;/span&gt;
&lt;span&gt;for&lt;/span&gt; image &lt;span&gt;in&lt;/span&gt; &lt;span&gt;*&lt;/span&gt;.png; &lt;span&gt;do&lt;/span&gt;
    xxd &lt;span&gt;-i&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$image&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span&gt;$tmp&lt;/span&gt;.1
&lt;span&gt;done&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# Read the code template&lt;/span&gt;
&lt;span&gt;TEMPLATE&lt;/span&gt;=&lt;span&gt;`&lt;/span&gt;&lt;span&gt;sed&lt;/span&gt; &lt;span&gt;-n&lt;/span&gt; &lt;span&gt;'/{%LOAD_TEMPLATE%}/,/{%LOAD_TEMPLATE END%}/ p'&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$RESOURCES_FOLDER&lt;/span&gt;/&lt;span&gt;$SOURCE_NAME&lt;/span&gt;.m&amp;quot;&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; &lt;span&gt;sed&lt;/span&gt; &lt;span&gt;'1 d;$ d'&lt;/span&gt;&lt;span&gt;`&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# Create loader code for each image&lt;/span&gt;
&lt;span&gt;for&lt;/span&gt; image &lt;span&gt;in&lt;/span&gt; &lt;span&gt;*&lt;/span&gt;.png; &lt;span&gt;do&lt;/span&gt;
    &lt;span&gt;if&lt;/span&gt; &lt;span&gt;echo&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$image&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; &lt;span&gt;grep&lt;/span&gt; &lt;span&gt;-q&lt;/span&gt; &lt;span&gt;&amp;quot;@2x&amp;quot;&lt;/span&gt;; &lt;span&gt;then&lt;/span&gt; &lt;span&gt;continue&lt;/span&gt;; &lt;span&gt;fi&lt;/span&gt;
    &lt;span&gt;ORIGINAL_FILENAME&lt;/span&gt;=&lt;span&gt;&amp;quot;&lt;span&gt;$image&lt;/span&gt;&amp;quot;&lt;/span&gt;
    &lt;span&gt;SANITISED_FILENAME&lt;/span&gt;=&lt;span&gt;`&lt;/span&gt;&lt;span&gt;echo&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$ORIGINAL_FILENAME&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; &lt;span&gt;sed&lt;/span&gt; &lt;span&gt;'s/[^a-zA-Z0-9]/_/g'&lt;/span&gt;&lt;span&gt;`&lt;/span&gt;
    &lt;span&gt;SANITISED_2X_FILENAME&lt;/span&gt;=&lt;span&gt;`&lt;/span&gt;&lt;span&gt;echo&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$SANITISED_FILENAME&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; &lt;span&gt;sed&lt;/span&gt; &lt;span&gt;'s/_png/_2x_png/'&lt;/span&gt;&lt;span&gt;`&lt;/span&gt;
    &lt;span&gt;echo&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$TEMPLATE&lt;/span&gt;&amp;quot;&lt;/span&gt; &lt;span&gt;|&lt;/span&gt; &lt;span&gt;sed&lt;/span&gt; &lt;span&gt;&amp;quot;s/ORIGINAL_FILENAME/&lt;span&gt;$ORIGINAL_FILENAME&lt;/span&gt;/g;s/SANITISED_FILENAME/&lt;span&gt;$SANITISED_FILENAME&lt;/span&gt;/g;s/SANITISED_2X_FILENAME/&lt;span&gt;$SANITISED_2X_FILENAME&lt;/span&gt;/g&amp;quot;&lt;/span&gt; &lt;span&gt;&amp;gt;&amp;gt;&lt;/span&gt; &lt;span&gt;$tmp&lt;/span&gt;.2
&lt;span&gt;done&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# Create the source file from the template and our generated code&lt;/span&gt;
&lt;span&gt;sed&lt;/span&gt; &lt;span&gt;&amp;quot;/{%IMAGEDATA START%}/ r &lt;span&gt;$tmp&lt;/span&gt;.1
1,/{%IMAGEDATA START%}/!{/{%IMAGEDATA END%}/,/{%IMAGEDATA START%}/! d;}
/{%IMAGELOADERS START%}/ r &lt;span&gt;$tmp&lt;/span&gt;.2
1,/{%IMAGELOADERS START%}/!{/{%IMAGELOADERS END%}/,/{%IMAGELOADERS START%]/! d;}&amp;quot;&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$RESOURCES_FOLDER&lt;/span&gt;/&lt;span&gt;$SOURCE_NAME&lt;/span&gt;.m&amp;quot;&lt;/span&gt; &lt;span&gt;&amp;gt;&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$DERIVED_FILE_DIR&lt;/span&gt;/&lt;span&gt;$SOURCE_NAME&lt;/span&gt;.m&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;# Copy the template header file in&lt;/span&gt;
&lt;span&gt;cp&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$RESOURCES_FOLDER&lt;/span&gt;/&lt;span&gt;$SOURCE_NAME&lt;/span&gt;.h&amp;quot;&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$DERIVED_FILE_DIR&lt;/span&gt;/&lt;span&gt;$SOURCE_NAME&lt;/span&gt;.h&amp;quot;&lt;/span&gt;
&amp;nbsp;
&lt;span&gt;rm&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$tmp&lt;/span&gt;.1&amp;quot;&lt;/span&gt; &lt;span&gt;&amp;quot;&lt;span&gt;$tmp&lt;/span&gt;.2&amp;quot;&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;


&lt;p&gt;The &amp;#8220;Run Script&amp;#8221; phase that hosts this script also needs a couple of additions, to tell Xcode what the inputs and outputs to the script are: In the &amp;#8220;Input Files&amp;#8221; section, the path to the image resource folder, with a &amp;#8220;&lt;em&gt;&amp;#42;.png&lt;/em&gt;&amp;#8221; wildcard at the end, and also the path to those template files, &lt;code&gt;TPCompiledResources.{h,m}&lt;/code&gt;. Finally, the two output files go in the &amp;#8220;Output Files&amp;#8221; section:&lt;/p&gt;

&lt;p&gt;&lt;img class="aligncenter" src="http://atastypixel.com/blog/wp-content/uploads/2012/05/Screen-Shot-2012-05-15-at-20.42.46.png" alt="Screen Shot 2012 05 15 at 20 42 46" title="Screen Shot 2012-05-15 at 20.42.46.png" border="0" width="400" height="155" /&gt;&lt;/p&gt;

&lt;h2&gt;Project Setup&lt;/h2&gt;

&lt;p&gt;Now it was just a matter of setting up the project to include the derived source files in the build. This was a bit messy and took a little doing, but with guidance from this article by Ben Zado on &lt;a href="http://www.benzado.com/blog/post/352/file-references-relative-to-derived_file_dir-in-xcode"&gt;file references relative to DERIVED_FILE_DIR&lt;/a&gt;, it wasn&amp;#8217;t too painful:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Build, in order to generate the derived source files.&lt;/li&gt;
&lt;li&gt;Navigate to the derived sources folder within the build products, and drag the &lt;code&gt;TPCompiledResources.{m,h}&lt;/code&gt; into the project, placed within a new group (I called the group &amp;#8220;Derived Sources&amp;#8221;).&lt;/li&gt;
&lt;li&gt;The path type for those files (accessible from the properties viewer &amp;#8212; Cmd-I) should be &amp;#8220;Relative to Enclosing Group&amp;#8221;, and consequently the &amp;#8220;Path&amp;#8221; field should just show the filename, with no path component. This was a bit touch-and-go for me, and I had a hard time making this happen, so I left it as-is for now, fixing it manually later in step 8.&lt;/li&gt;
&lt;li&gt;Under &lt;em&gt;Xcode Preferences &amp;raquo; Locations &amp;raquo; Source Trees&lt;/em&gt;, add an entry with setting name &amp;#8220;&lt;code&gt;DERIVED_FILE_DIR&lt;/code&gt;&amp;#8220;, display name &amp;#8220;Derived Files&amp;#8221; and path &amp;#8220;&lt;code&gt;$(DERIVED_FILE_DIR)&lt;/code&gt;&amp;#8220;.&lt;/li&gt;
&lt;li&gt;Set the path type for the group containing the two derived sources to &amp;#8220;Relative to Derived Files&amp;#8221;.&lt;/li&gt;
&lt;li&gt;Quit Xcode, and open the &lt;code&gt;project.pbxproj&lt;/code&gt; file from within your project&amp;#8217;s bundle.&lt;/li&gt;
&lt;li&gt;Find the &amp;#8220;Derived Sources&amp;#8221; group (or whatever it was named in step 2), and delete the &amp;#8220;path&amp;#8221; property from the list of attributes.&lt;/li&gt;
&lt;li&gt;I had to also find the &lt;code&gt;TPCompiledResources.{m,h}&lt;/code&gt; file sections and delete the &amp;#8220;path&amp;#8221; attribute for those, too.&lt;/li&gt;
&lt;li&gt;Reopen Xcode, and build &amp;#8212; it should be good to go (don&amp;#8217;t worry that the derived sources are shown in red in the project group &amp;#8212; Xcode&amp;#8217;ll find them).&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now that&amp;#8217;s done, images can be accessed by &lt;code&gt;TPGetCompiledImage(@"ImageName.png")&lt;/code&gt;. Yay!&lt;/p&gt;
 &lt;img src="http://atastypixel.com/blog/wp-content/plugins/wordpress-feed-statistics/feed-statistics.php?view=1&amp;amp;post_id=2523" width="1" height="1" /&gt;</content>
		<author>
			<name>A Tasty Pixel</name>
			<uri>http://atastypixel.com/blog</uri>
		</author>
		<source>
			<title type="html">A Tasty Pixel » Blog</title>
			<link rel="self" href="http://atastypixel.com/blog/feed/planet-cocoa/" />
			<id>http://atastypixel.com/blog/feed/planet-cocoa/</id>
			<updated>2012-05-16T11:19:16+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Permanently Unhide Library</title>
		<link href="http://www.red-sweater.com/blog/2448/permanently-unhide-library" />
		<id>http://www.red-sweater.com/blog/?p=2448</id>
		<updated>2012-05-15T14:20:32+00:00</updated>
		<content type="html">&lt;p&gt;When Apple shipped Mac OS X Lion 10.7, the &amp;#8220;Library&amp;#8221; folder located within every user&amp;#8217;s home folder, which had previously been visible to users in the Finder, was made invisible. To access the Library folder, users must now hold down the &lt;em&gt;option&lt;/em&gt; key while selecting the &amp;#8220;Go&amp;#8221; menu in the Finder.&lt;/p&gt;
&lt;p&gt;This is probably a good move for the vast majority of Mac users, but for folks with even a small amount of interest in tinkering with the configuration files and caches of various applications, it&amp;#8217;s an outright nuisance.&lt;/p&gt;
&lt;p&gt;The nuisance is exacerbated by Apple&amp;#8217;s decision to build in the &amp;#8220;make invisible&amp;#8221; action into every single dot-update to the OS. So if you&amp;#8217;ve taken the trouble to undo Apple&amp;#8217;s work and make the folder visible again, you&amp;#8217;ll notice that when you updated from 10.7.3 to 10.7.4, &lt;em&gt;poof!&lt;/em&gt;, it&amp;#8217;s gone again.&lt;/p&gt;
&lt;p&gt;I solved this very early on for my own needs by adding the command-line instructions for re-showing the Library folder to my Terminal configuration script. Every time I open a new Terminal window, the Library folder is aggressively set to visible again. In practice, this has meant that since 10.7 shipped, I&amp;#8217;ve never been bothered once by Apple&amp;#8217;s disappearing act.&lt;/p&gt;
&lt;p&gt;For less Terminal-intensive Mac users, this solution might not be sufficient. If you, or somebody you love, truly wants the Library folder to be forever visible in the Finder, a good trick is to add a script Login item to do the deed. Here are detailed instructions for achieving this:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Download  &lt;a href="http://www.red-sweater.com/blog/wp-content/downloads/2012/05/UnhideLibrary1.zip" title="UnhideLibrary.zip" alt="UnhideLibrary"&gt;UnhideLibrary&lt;/a&gt;. Make sure it unzips to a script application file after downloading. You&amp;#8217;ll need to keep this file around, so I recommend storing it somewhere in your home folder.&lt;/li&gt;
&lt;li&gt;Open System Preferences.&lt;/li&gt;
&lt;li&gt;Click the Users &amp;#038; Groups icon.&lt;/li&gt;
&lt;li&gt;Select the Login Items tab for appropriate user.&lt;/li&gt;
&lt;li&gt;Click the + icon and select the downloaded UnhideLibrary script item.&lt;/li&gt;
&lt;li&gt;Log out and log back in again.&lt;/li&gt;
&lt;li&gt;Never curse Apple&amp;#8217;s Library folder policy again.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The script file is just a few lines of AppleScript code to invoke the appropriate shell script. I originally used a plain shell script file but Thomas Borowski noticed it sometimes &lt;a href="https://twitter.com/thomasborowski/status/202404757648850946"&gt;opens as a regular document&lt;/a&gt; at login time. He also wrote &lt;a href="http://mandogmachine.com/2012/05/unhide-your-user-library-folder-automatically/"&gt;his own post&lt;/a&gt; essentially stating all the things I&amp;#8217;m now repeating here!&lt;/p&gt;
&lt;p&gt;So long Library folder, see you again, automatically, on 10.7.5.&lt;/p&gt;</content>
		<author>
			<name>Red Sweater Blog</name>
			<uri>http://www.red-sweater.com/blog</uri>
		</author>
		<source>
			<title type="html">Red Sweater Blog</title>
			<subtitle type="html">Mac &amp;amp; Technology Writings by Daniel Jalkut</subtitle>
			<link rel="self" href="http://www.red-sweater.com/blog/feed" />
			<id>http://www.red-sweater.com/blog/feed</id>
			<updated>2012-05-26T21:49:40+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Last week in WebKit: Tab sizing and strings for IndexedDB</title>
		<link href="http://www.webkit.org/blog/2022/last-week-in-webkit-tab-sizing-and-strings-for-indexeddb/" />
		<id>http://www.webkit.org/blog/?p=2022</id>
		<updated>2012-05-14T14:54:07+00:00</updated>
		<content type="html">&lt;p&gt;A total of 650 commits landed in WebKit&amp;#8217;s repositories last week, ending with revision 116915.&lt;/p&gt;
&lt;p&gt;Web Inspector&amp;#8217;s search box &lt;a title="Web Inspector: Search box doesn't allow CSS selectors anymore " href="http://trac.webkit.org/changeset/116755"&gt;supports CSS selectors again&lt;/a&gt;, JavaScriptCore timers &lt;a title="Instrument timer function calls so they show up in the Web Inspector Timeline. " href="http://trac.webkit.org/changeset/116821"&gt;will now show up&lt;/a&gt; on the timeline and a context menu &lt;a title="Web Inspector: add tab context menu " href="http://trac.webkit.org/changeset/116853"&gt;has been added&lt;/a&gt; for tabs.&lt;/p&gt;
&lt;p&gt;Text decorations, such as underlines, &lt;a title=":first-line text-decorations are not rendered " href="http://trac.webkit.org/changeset/116373"&gt;will now be rendered&lt;/a&gt; for text in :first-line selectors. Implementation of the :first-letter selector &lt;a title="CSS 2.1 failure: first-letter-nested-004.htm fails " href="http://trac.webkit.org/changeset/116438"&gt;was aligned&lt;/a&gt; with the specification. Eric landed &lt;a title="Add stylesheet inheritance support to IFRAME_SEAMLESS " href="http://trac.webkit.org/changeset/116471"&gt;stylesheet inheritance support&lt;/a&gt; for seamless iframes, as well as the &lt;a title="Make IFRAME_SEAMLESS child documents inherit styles from their parent iframe element " href="http://trac.webkit.org/changeset/116694"&gt;ability to inherit styles&lt;/a&gt; from their parent iframe. The RadioNodeList interface &lt;a title="RadioNodeList support in HTMLFormElement::elements " href="http://trac.webkit.org/changeset/116487"&gt;is now supported&lt;/a&gt;, background-size &lt;a title="[CSS3 Backgrounds and Borders] Add background-size to the background shorthand " href="http://trac.webkit.org/changeset/116645"&gt;is now part of&lt;/a&gt; the &amp;#8220;background&amp;#8221; shorthand and, albeit disabled, &lt;a title="[Web Intents] Flagged-off implementation of an intent tag for registration. " href="http://trac.webkit.org/changeset/116384"&gt;the &amp;lt;intent&amp;gt; element has landed&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;IndexedDB &lt;a title="IndexedDB: Replace numeric constants with strings " href="http://trac.webkit.org/changeset/116337"&gt;now uses strings&lt;/a&gt; instead of numeric constants. Violation reports generated by Content Security Policy &lt;a title="CSP violation reports should have all the fields required by the spec " href="http://trac.webkit.org/changeset/116274"&gt;now also include&lt;/a&gt; the referer, original policy and the URL which got blocked. The File System API is now able to deal with &lt;a title="Support cross-filesystem operations in FileSystem API " href="http://trac.webkit.org/changeset/116388"&gt;cross-file system operations&lt;/a&gt;, widths and heights &lt;a title="width/height attributes of input element cannot be accessed by JavaScript. " href="http://trac.webkit.org/changeset/116389"&gt;are now exposed&lt;/a&gt; for &amp;lt;input type=image&amp;gt; images, and the offsetLeft property &lt;a title="offsetLeft broken within CSS3 columns " href="http://trac.webkit.org/changeset/116446"&gt;was broken&lt;/a&gt; when used together with CSS Columns.&lt;/p&gt;
&lt;p&gt;WebKit &lt;a title="WebKit should support tab-size. " href="http://trac.webkit.org/changeset/116723"&gt;has also gained support&lt;/a&gt; for the tab-size CSS property. This property, which is also supported by Firefox and Opera, allows you to define the number of spaces a tab should be equal to.&lt;/p&gt;
&lt;p&gt;Included &lt;a title="Add a link to WebKit trademark terms of use, other small website changes " href="http://trac.webkit.org/changeset/116770"&gt;among other minor updates&lt;/a&gt; on the WebKit website, the conditions under which the WebKit trademark can be used &lt;a title="TRADEMARK INFORMATION" href="http://www.macosforge.org/terms/#trademark-information"&gt;are now available&lt;/a&gt; on the Mac OS Forge website.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Other changes which occurred last week&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Half a megabyte of memory &lt;a title="Shrink ElementAttributeData by factoring out Attr object count. " href="http://trac.webkit.org/changeset/116419"&gt;was saved&lt;/a&gt; by Andreas when viewing the full HTML5 specification.&lt;/li&gt;
&lt;li&gt;The IETC CSS Values and Units tests &lt;a title="Integrate IETC CSS : values and units tests " href="http://trac.webkit.org/changeset/116658"&gt;have been added&lt;/a&gt; to WebKit&amp;#8217;s test suite.&lt;/li&gt;
&lt;li&gt;&lt;a title="Implement HTML Media Capture " href="http://trac.webkit.org/changeset/116592"&gt;A first step&lt;/a&gt; towards implementing the HTML Media Capture API has been made.&lt;/li&gt;
&lt;li&gt;Pages served with an XHTML-MP doctype will now automatically &lt;a title="Use suitable viewport values on XHTML-MP pages. " href="http://trac.webkit.org/changeset/116571"&gt;use a suitable viewport&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">The Sandbox’s Big Red Button</title>
		<link href="http://www.red-sweater.com/blog/2438/the-sandboxs-big-red-button" />
		<id>http://www.red-sweater.com/blog/?p=2438</id>
		<updated>2012-05-12T20:42:29+00:00</updated>
		<content type="html">&lt;p&gt;If you&amp;#8217;ve been following the debate surrounding Apple&amp;#8217;s Application Sandbox, you know that many developers are concerned about the implications for existing apps of adopting the sandbox. &lt;/p&gt;
&lt;p&gt;Apple has been threatening for almost a year that apps for sale in the Mac App Store will need to embrace the Application Sandbox, or else further updates to the apps will not be accepted. The deadline for adopting the sandbox has slipped several times, but it currently rests at &lt;a href="https://developer.apple.com/news/index.php?id=02212012a"&gt;June 1, 2012&lt;/a&gt;. That&amp;#8217;s only a few weeks away, and comes just ahead of Apple&amp;#8217;s annual developer conference.&lt;/p&gt;
&lt;p&gt;I&amp;#8217;ve written a few rants about the Application Sandbox, culminating in my February 2012 piece imploring Apple to &lt;a href="http://www.red-sweater.com/blog/feed"&gt;&amp;#8220;Fix the Sandbox.&amp;#8221;&lt;/a&gt; Slowly but surely, they are improving the technology that drives the sandboxing features of Mac OS X, but by June 1, it appears that many classes of application will still be &amp;#8220;unsandboxable&amp;#8221; under the current permissions model supplied by Apple.&lt;/p&gt;
&lt;p&gt;The shortage of permissions, or &amp;#8220;entitlements&amp;#8221; in sandbox lingo, has always been at the root of my concerns. Especially because of the political move requiring existing Mac App Store apps to adopt the sandbox, it is easy to imagine a features bloodbath come June, or whenever the requirement goes into place. When Apple announced the postponement to June 1, they also took care to make assurances that bug-fix updates would still be allowed for non-sandboxed apps, which is a nice break, but will still leave many apps to die on the vine in lieu of suitable sandboxing entitlements for the features various apps provide.&lt;/p&gt;
&lt;p&gt;Apple publicly documents the &lt;a href="http://developer.apple.com/library/ios/#DOCUMENTATION/Miscellaneous/Reference/EntitlementKeyReference/EnablingAppSandbox/EnablingAppSandbox.html"&gt;list of entitlements&lt;/a&gt; available to Mac software developers. One of my major concerns has always been that because the list of entitlements doesn&amp;#8217;t cover all the nuanced, legitimate tasks that an app might want to perform on a user&amp;#8217;s behalf, that Application Sandbox ran the risk of permanently forbidding certain types of application behavior from being conducted in the sandbox.&lt;/p&gt;
&lt;p&gt;The high-level list of Application Sandbox permissions is intentionally coarser-grained than the lower-level &amp;#8220;sandbox facility&amp;#8221; which ultimately imposes the restrictions. Some developers criticize Apple for failing to embrace the sanbdbox with their own apps, while expecting developers to embrace it for the Mac App Store. On Mac OS X 10.7.4, the two notably sandboxed apps from Apple remain Preview and TextEdit, two apps that would be relatively simple to sandbox compared to a large number of complex, 3rd party products.&lt;/p&gt;
&lt;p&gt;But Apple has applied a good deal of sandboxing to their code. For example, take a look at /usr/share/sandbox/ and /System/Library/Sandbox/Profiles/ for examples a variety of &amp;#8220;.sb&amp;#8221; files that specify the sandbox restrictions of a variety of system services and tools. These files are expressed in SBPL, or the &lt;a href="http://www.romab.com/ironsuite/SBPL.html"&gt;Sandbox Policy Language&lt;/a&gt;, which is a scheme-based language used to express the &lt;em&gt;fine-grained permission&lt;/em&gt; the sandbox facility is capable of controlling. See my &lt;a href="http://www.red-sweater.com/blog/2170/sandbox-corners"&gt;&amp;#8220;Sandbox Corners&amp;#8221;&lt;/a&gt; for a bit more about the lower-level sandbox facility and SBPL files.&lt;/p&gt;
&lt;p&gt;Today I decided to take a closer look at one SBPL file of particular interest: &lt;em&gt;/System/Library/Sandbox/Profiles/application.sb&lt;/em&gt;. This is the SBPL file that, so far as I can tell, translates the high-level &amp;#8220;entitlements&amp;#8221; of the Application Sandbox into corresponding lower-level policy expressions for the sandbox facility. For example:&lt;/p&gt;
&lt;pre&gt;
(if (entitlement "com.apple.security.network.client")
    (allow network-outbound (remote ip)))
&lt;/pre&gt;
&lt;p&gt;You can get a taste for how the high level &amp;#8220;I&amp;#8217;m a network client&amp;#8221; translates specifically to &amp;#8220;allow out bound ip traffic&amp;#8221; at the sandbox facility level. Other high-level rules express much more complex logic. For example, the &amp;#8220;I want to use the printer&amp;#8221; entitlement translates to a variety of low-level permissions to communicate with printer-system daemons, and read from printer configuration files on the system.&lt;/p&gt;
&lt;p&gt;But by far the most interesting entitlement of all is one that I found at the bottom of application.sb. It&amp;#8217;s not documented on Apple&amp;#8217;s site, and from what I can tell this blog post will become the first Google match on the term. The entitlement is &amp;#8220;com.apple.security.temporary-exception.sbpl&amp;#8221;, and the comment above it reads simply: &amp;#8220;Big Red Button&amp;#8221;.&lt;/p&gt;
&lt;pre&gt;
;; Big Red Button
(sandbox-array-entitlement
  "com.apple.security.temporary-exception.sbpl"
  (lambda (string)
    (let* ((port (open-input-string string))
           (sbpl (read port)))
      (eval sbpl))))
&lt;/pre&gt;
&lt;p&gt;This temporary entitlement enables a high-level Application Sandbox-restricted application to supply, along with whatever other high-level entitlements it requests, an entitlement that brings with it as a parameter a literal SBPL program, that will be evaluated and thus applied by the lower-level sandboxing facility. &lt;/p&gt;
&lt;p&gt;In short: the Big Red Button gives Apple an out.&lt;/p&gt;
&lt;p&gt;Whatever mistakes they make in the devising of high-level entitlements can be theoretically undone after-the-fact by supplying developers with special Big Red Button entitlements that pass along specific permissions to the lower-level sandbox, liberating the application to do whatever important task it needs to do.&lt;/p&gt;
&lt;p&gt;Of course, the fact that this facility exists does not say anything about whether Apple will indulge its use. And just because you, as a developer, could use this entitlement key to empower your sandboxed app to &lt;em&gt;do practically anything&lt;/em&gt;, it doesn&amp;#8217;t mean that Apple&amp;#8217;s App Store reviewers would look kindly upon it. In fact, I&amp;#8217;m almost positive that at this point, any developer who submits a sandboxed app with this entitlement will have to have already conversed extensively with Apple about the need for such a transgression.&lt;/p&gt;
&lt;p&gt;But the entitlement is there, and that makes me breathe a little easier. The Application Sandbox is, so far as I can tell, technically capable of granting whatever permission any app could reasonably need. The only obstacle, and it&amp;#8217;s a big one at that, is the political challenge of App Store approval.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Update:&lt;/strong&gt; John Brayton made an interesting point in the comments, that regardless of MAS policy, the Big Red Button might be useful to non-MAS developers who wish to adopt the Application Sandbox , but can&amp;#8217;t manage to squeeze all their functionality into the confines of its entitlements. I originally thought this made good sense, but then realized how risky a move this would be in practice. Because the entitlement in question here has not been documented by Apple, and is furthermore only listed in an implementation file for the system itself, the behavior of this entitlement can&amp;#8217;t be relied upon.&lt;/p&gt;
&lt;p&gt;Indeed, above I suggested that the entitlement would grant developers the power to enable virtually any capability in their sandboxed apps, but we have no idea how Apple has actually implemented support for the entitlement inside Apple. They could very well have a special case inside the SBPL language evaluator itself that looks for and rejects scripts that it doesn&amp;#8217;t recognize as its own.&lt;/p&gt;
&lt;p&gt;The application.sb file even has a strong disclaimer to this effect:&lt;/p&gt;
&lt;pre&gt;
WARNING: The sandbox rules in this file currently constitute
Apple System Private Interface and are subject to change at any time and
without notice. The contents of this file are also auto-generated and
not user editable; it may be overwritten at any time.
&lt;/pre&gt;
&lt;p&gt;In other words: you can&amp;#8217;t count on the details of this file remaining stable from release to release. It would be foolish to base the behavior of any shipping app on entitlements listed there, but not documented by Apple. I think the Big Red Button is a very interesting find, and I&amp;#8217;m very curious about it. But that&amp;#8217;s how it should be considered: as a curiosity.&lt;/p&gt;</content>
		<author>
			<name>Red Sweater Blog</name>
			<uri>http://www.red-sweater.com/blog</uri>
		</author>
		<source>
			<title type="html">Red Sweater Blog</title>
			<subtitle type="html">Mac &amp;amp; Technology Writings by Daniel Jalkut</subtitle>
			<link rel="self" href="http://www.red-sweater.com/blog/feed" />
			<id>http://www.red-sweater.com/blog/feed</id>
			<updated>2012-05-26T21:49:40+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Illuminate 1.2 Overhauls the Window Switching UI</title>
		<link href="http://staging.losingfight.com/blog/2012/05/09/illuminate-1-2-overhauls-the-window-switching-ui/" />
		<id>http://staging.losingfight.com/blog/?p=539</id>
		<updated>2012-05-09T17:15:52+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href="http://fortunatebear.com/products/illuminate/"&gt;Illuminate 1.2&lt;/a&gt; is out with major changes to how the cycle windows feature works. Since cycle windows is the main feature in Illuminate, I made an effort to streamline it and make it usable in fewer keystrokes. The most noticeable change is that Cycle (All) Windows and Cycle (All) Tabs have been consolidated into one feature: Cycle Windows. Cycle Windows cycles through all the windows and tabs using just one keyboard shortcut (Option-Tab), plus they&amp;rsquo;re now grouped by application, making application switching more obvious.&lt;/p&gt;
&lt;p&gt;&lt;img src="http://losingfight.com/blog/wp-content/uploads/2012/05/Screenshot1.png" alt="Screenshot1" border="0" width="600" height="375" /&gt;&lt;/p&gt;
&lt;p&gt;In order to speed up switching between windows, sticky mode has be turned off by default so the window selection happens as soon as you let up on the modifier keys. Also, there is now a configurable delay between when the keyboard shortcut is pressed and the UI shows up. This means you can quickly switch between windows or tabs without the UI flashing up or otherwise having to wait on it.&lt;/p&gt;
&lt;p&gt;The 1.2 includes some other features and bug fixes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Support for Google Chrome tabs&lt;/p&gt;&lt;/li&gt;&lt;/ul&gt;

&lt;li&gt;
&lt;p&gt;Ability to exclude certain applications from the window switching list.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;You can now change the order windows appear in when switching windows: last time accessed or alphabetical.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Improved layout in the cycle windows UI so more space is used by the window thumbnails.&lt;/p&gt;&lt;/li&gt;

&lt;li&gt;
&lt;p&gt;Fix for a crashing bug.&lt;/p&gt;&lt;/li&gt;


&lt;p&gt;The update is free for existing customers, $9.99 for new customers, and is available from &lt;a href="http://fortunatebear.com/products/illuminate/buy/"&gt;Fortunate Bear&amp;rsquo;s online store&lt;/a&gt; or &lt;a href="http://itunes.apple.com/us/app/illuminate/id504770329?ls=1&amp;amp;mt=12"&gt;Apple&amp;rsquo;s Mac App Store&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;You can &lt;a href="http://prmac.com/release-id-42459.htm"&gt;read the full press release here&lt;/a&gt;.&lt;/p&gt;</content>
		<author>
			<name>Safe from the Losing Fight</name>
			<uri>http://staging.losingfight.com/blog/</uri>
		</author>
		<source>
			<title type="html">Safe from the Losing Fight</title>
			<subtitle type="html">because I don&amp;rsquo;t write software for Windows</subtitle>
			<link rel="self" href="http://losingfight.com/blog/feed/" />
			<id>http://losingfight.com/blog/feed/</id>
			<updated>2012-05-25T01:03:18+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Last weeks in WebKit: sub-pixel layout and seamless iframes</title>
		<link href="http://www.webkit.org/blog/2011/last-weeks-in-webkit-sub-pixel-layout-and-seamless-iframes/" />
		<id>http://www.webkit.org/blog/?p=2011</id>
		<updated>2012-05-08T14:07:59+00:00</updated>
		<content type="html">&lt;p&gt;Since there wasn&amp;#8217;t an update last week, this one briefly covers changes between revisions 114867 and 116271.&lt;/p&gt;
&lt;p&gt;Web Inspector now offers the ability to &lt;a href="http://trac.webkit.org/changeset/115323"&gt;disable all JavaScript execution&lt;/a&gt; on a page, and also allows Web Socket frames &lt;a href="http://trac.webkit.org/changeset/115427"&gt;to be inspected&lt;/a&gt;. The shortcut overlay has received &lt;a href="http://trac.webkit.org/changeset/115568"&gt;some UI polish&lt;/a&gt; and the Timeline Frame Mode has been taken &lt;a href="http://trac.webkit.org/changeset/116237"&gt;out of experimental&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Fixed placeholders &lt;a href="http://trac.webkit.org/changeset/114999"&gt;have been implemented&lt;/a&gt; for date input types, a form field&amp;#8217;s entries supplied through a &amp;lt;datalist&amp;gt; are now &lt;a href="http://trac.webkit.org/changeset/115407"&gt;barred from validation&lt;/a&gt;. The Apple Mac port &lt;a href="http://trac.webkit.org/changeset/115666"&gt;removed support&lt;/a&gt; for BlobBuilder and the Selector APIs have been &lt;a href="http://trac.webkit.org/changeset/115971"&gt;aligned with the specification&lt;/a&gt; when pseudo-element selectors are used.&lt;/p&gt;
&lt;p&gt;Retrieving a canvas&amp;#8217; image data &lt;a href="http://trac.webkit.org/changeset/114992"&gt;will now return&lt;/a&gt; a Uint8ClampedArray instead of a CanvasPixelArray object. In preparation of supporting getUserMedia on Chromium, the Peer Connection API implementation &lt;a href="http://trac.webkit.org/changeset/115109"&gt;has been separated&lt;/a&gt; with a compile time flag. Tables &lt;a href="http://trac.webkit.org/changeset/115160"&gt;now support&lt;/a&gt; the createTBody() method and the IndexedDB implementation can now &lt;a href="http://trac.webkit.org/changeset/115255"&gt;open cursors&lt;/a&gt; based on an IDBKey, and &lt;a href="http://trac.webkit.org/changeset/115282"&gt;advance cursors&lt;/a&gt; as well.&lt;/p&gt;
&lt;p&gt;Eric landed the first parts of support for seamless iframes in WebKit, namely &lt;a href="http://trac.webkit.org/changeset/115742"&gt;some tests&lt;/a&gt;, &lt;a href="http://trac.webkit.org/changeset/115773"&gt;sandbox and styling&lt;/a&gt; and &lt;a href="http://trac.webkit.org/changeset/115796"&gt;navigation&lt;/a&gt;. A vendor-prefixed version of the Performance Timeline API &lt;a href="http://trac.webkit.org/changeset/115274"&gt;landed&lt;/a&gt;, the getUserMedia() method now takes &lt;a href="http://trac.webkit.org/changeset/115810"&gt;an object instead of a string&lt;/a&gt; and the noteOn and noteOff methods of the Web Audio API&amp;#8217;s oscillator &lt;a href="http://trac.webkit.org/changeset/116201"&gt;got implemented&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Antti made it possible to share stylesheet data structures between documents, &lt;a href="http://trac.webkit.org/changeset/116235"&gt;decreasing memory usage&lt;/a&gt; by several megabytes &lt;em&gt;(take note, kling)&lt;/em&gt; depending on the port&amp;#8217;s implementation. Furthermore, parsed stylesheets may now be cached, &lt;a href="http://trac.webkit.org/changeset/115379"&gt;increasing performance&lt;/a&gt; of subsequent page loads.&lt;/p&gt;
&lt;p&gt;Per &lt;a href="http://trac.webkit.org/changeset/116009"&gt;commit 116009&lt;/a&gt;, Levi and Emil were able to close &lt;a href="https://bugs.webkit.org/show_bug.cgi?id=60318"&gt;the meta bug&lt;/a&gt; for supporting sub-pixel layout in WebKit. While this has not yet been enabled for any port, this is a significant milestone for the project. &lt;a href="http://blogs.msdn.com/b/ie/archive/2012/02/17/sub-pixel-rendering-and-the-css-object-model.aspx"&gt;This article&lt;/a&gt; provides some insight in the importance.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Other changes which occurred last week:&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Code supporting positioned floats &lt;a href="http://trac.webkit.org/changeset/115668"&gt;has been removed&lt;/a&gt; from WebKit, pending proper implementation.&lt;/li&gt;
&lt;li&gt;The EFL port &lt;a href="http://trac.webkit.org/changeset/115341"&gt;has enabled&lt;/a&gt; support for the &amp;lt;track&amp;gt; element, the &lt;a href="http://trac.webkit.org/changeset/115046"&gt;Web Timing API&lt;/a&gt; and the &lt;a href="http://trac.webkit.org/changeset/115800"&gt;Web Audio API&lt;/a&gt;!&lt;/li&gt;
&lt;li&gt;The BlackBerry port &lt;a href="http://trac.webkit.org/changeset/116265"&gt;enabled support&lt;/a&gt; for the download attribute on anchors.&lt;/li&gt;
&lt;li&gt;Abhishek Arya (inferno) is now &lt;a href="http://trac.webkit.org/changeset/115257"&gt;a WebKit Reviewer&lt;/a&gt;, congratulations!&lt;/li&gt;
&lt;li&gt;Alexis Menard is now &lt;a href="http://www.webkit.org/blog/2002/alexis-menard-is-a-webkit-reviewer/"&gt;a WebKit Reviewer&lt;/a&gt; as well, congratulations!&lt;/li&gt;
&lt;li&gt;Chromium is working towards &lt;a href="http://trac.webkit.org/changeset/115109"&gt;enabling&lt;/a&gt; getUserMedia by default.&lt;/li&gt;
&lt;li&gt;Multiple input channels are now &lt;a href="http://trac.webkit.org/changeset/115699"&gt;supported&lt;/a&gt; for the JavaScriptAudioNode.&lt;/li&gt;
&lt;/ul&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">MarsEdit 3.5.1: Tying Up Loose Ends</title>
		<link href="http://www.red-sweater.com/blog/2435/marsedit-3-5-1-tying-up-loose-ends" />
		<id>http://www.red-sweater.com/blog/?p=2435</id>
		<updated>2012-05-07T23:38:40+00:00</updated>
		<content type="html">&lt;p&gt;&lt;a href="https://www.red-sweater.com/marsedit"&gt;MarsEdit 3.5.1&lt;/a&gt; is now available on the &lt;a href="http://bit.ly/marseditmacappstore" target="itunes_store"&gt;Mac App Store&lt;/a&gt; and directly from the &lt;a href="https://www.red-sweater.com/store/"&gt;Red Sweater Store&lt;/a&gt;. This is a free update for licensed MarsEdit customers.&lt;/p&gt;
&lt;p&gt;When I released MarsEdit 3.5 a few weeks ago, it included some very significant overhaul to MarsEdit&amp;#8217;s handling of rich text formatting, including new support for customized formatting macros in Rich Text mode.&lt;/p&gt;
&lt;p&gt;Given the large number of changes, I was not too surprised that a few annoying bugs snuck in as well. In particular, it became unreliable to apply some formatting options like heading and block quote in Rich Text mode. I took the opportunity while fixing those things to take care of a bunch of other little gotchas, including some more compatibility tweaks for the forthcoming Mountain Lion 10.8 release.&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Fix the preview window to recognize and substitute template placeholders in the section&lt;/li&gt;
&lt;li&gt;Fix a bug with Squarespace and Expression Engine not prompting for username/password on new blog&lt;/li&gt;
&lt;li&gt;Restore ability to set &amp;#8220;Warn when no title&amp;#8221; option on Blogger blogs&lt;/li&gt;
&lt;li&gt;Fix a bug that prevented some blog-configuration options from being selected after switching system type&lt;/li&gt;
&lt;li&gt;Restore ability to start a Header or Blockquote before typing content&lt;/li&gt;
&lt;li&gt;Pressing return twice to exit Preformatted works again&lt;/li&gt;
&lt;li&gt;Improve support for future releases of Mac OS X
&lt;ul&gt;
&lt;li&gt;Address an issue with icon view when resizing the Media Manager window&lt;/li&gt;
&lt;li&gt;Avoid crashes caused by conflicting system libraries&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;</content>
		<author>
			<name>Red Sweater Blog</name>
			<uri>http://www.red-sweater.com/blog</uri>
		</author>
		<source>
			<title type="html">Red Sweater Blog</title>
			<subtitle type="html">Mac &amp;amp; Technology Writings by Daniel Jalkut</subtitle>
			<link rel="self" href="http://www.red-sweater.com/blog/feed" />
			<id>http://www.red-sweater.com/blog/feed</id>
			<updated>2012-05-26T21:49:40+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Solving Simulator Bootstrap Errors</title>
		<link href="http://www.mikeash.com/pyblog/solving-simulator-bootstrap-errors.html" />
		<id>http://www.mikeash.com/?page=pyblog/solving-simulator-bootstrap-errors.html</id>
		<updated>2012-05-07T20:06:00+00:00</updated>
		<content type="html">I'm sure every iOS developer has seen the dreaded bootstrap error. "Couldn't register com.yourcompany.yourapp with the bootstrap server. Error: unknown error code. This generally means that another instance of this process was already running or is hung in the debugger." After nearly throwing my Mac out the window for the Nth time today, I finally managed to come up with a simple fix. Run this in the shell: &lt;code&gt;launchctl list|grep UIKitApplication|awk '{print $3}'|xargs launchctl remove&lt;/code&gt;. And your bootstrap errors magically melt away.&lt;br /&gt;&lt;a href="http://www.mikeash.com/pyblog/solving-simulator-bootstrap-errors.html"&gt;(Read More)&lt;/a&gt;</content>
		<author>
			<name>NSBlog</name>
			<uri>http://www.mikeash.com/pyblog/</uri>
		</author>
		<source>
			<title type="html">NSBlog</title>
			<subtitle type="html">Mac OS X and Cocoa programming</subtitle>
			<link rel="self" href="http://www.mikeash.com/pyblog/rss.py" />
			<id>http://www.mikeash.com/pyblog/rss.py</id>
			<updated>2012-05-26T21:49:07+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Friday Q&amp;amp;amp;A 2012-05-04: PLCrashReporter and Unwinding the Stack With DWARF, Part 2</title>
		<link href="http://www.mikeash.com/pyblog/friday-qa-2012-05-04-plcrashreporter-and-unwinding-the-stack-with-dwarf-part-2.html" />
		<id>http://www.mikeash.com/?page=pyblog/friday-qa-2012-05-04-plcrashreporter-and-unwinding-the-stack-with-dwarf-part-2.html</id>
		<updated>2012-05-04T18:44:00+00:00</updated>
		<content type="html">Here I am, yet again! This week, I'm continuing where my last article left off, regarding PLCrashReporter and unwinding stack frames on x86_64. In particular, I go into how I got at and used all the various data I &lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-04-27-plcrashreporter-and-unwinding-the-stack-with-dwarf.html"&gt;discussed in last week's article&lt;/a&gt;, and why some of the existing solutions in the wild weren't suited for our use.&lt;br /&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-05-04-plcrashreporter-and-unwinding-the-stack-with-dwarf-part-2.html"&gt;(Read More)&lt;/a&gt;</content>
		<author>
			<name>NSBlog</name>
			<uri>http://www.mikeash.com/pyblog/</uri>
		</author>
		<source>
			<title type="html">NSBlog</title>
			<subtitle type="html">Mac OS X and Cocoa programming</subtitle>
			<link rel="self" href="http://www.mikeash.com/pyblog/rss.py" />
			<id>http://www.mikeash.com/pyblog/rss.py</id>
			<updated>2012-05-26T21:49:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">RubyMotion brings serious Ruby development to the iOS world</title>
		<link href="http://programmingzen.com/2012/05/03/rubymotion-brings-serious-ruby-development-to-the-ios-world/" />
		<id>http://programmingzen.com/?p=1463</id>
		<updated>2012-05-03T16:40:09+00:00</updated>
		<content type="html">&lt;p&gt;For the past several months I&amp;#8217;ve been &lt;a href="http://www.rubymotion.com/about/"&gt;involved&lt;/a&gt; with, but unable to publicly discuss, an exciting project called &lt;a href="http://www.rubymotion.com/"&gt;RubyMotion&lt;/a&gt;. My friend Laurent Sansonetti, creator of MacRuby, has now officially launched a serious alternative to Objective-C for iPhone and iPad development.&lt;/p&gt;
&lt;p&gt;RubyMotion is not a bridge; it actually generates native applications that are as fast as the ones written in Objective-C . You can check out &lt;a href="http://arstechnica.com/business/news/2012/05/exclusive-building-ruby-ios-applications-with-rubymotion.ars"&gt;Ars Technica&amp;#8217;s exclusive article&lt;/a&gt; for more details on the project and watch the Pragmatic Studio&amp;#8217;s 50 minute &lt;a href="http://pragmaticstudio.com/screencasts/rubymotion"&gt;free screencast&lt;/a&gt; about it to get a better idea of how RubyMotion works in practice.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.rubymotion.com/"&gt;&lt;img title="rubymotion.png" src="http://programmingzen.com/wp-content/uploads/2012/05/rubymotion.png" alt="RubyMotion" width="600" height="367" border="0" /&gt;&lt;/a&gt;For a limited time you can buy RubyMotion at an &lt;a href="http://sites.fastspring.com/hipbyte/product/rubymotion"&gt;early bird discount&lt;/a&gt; rate of 25% off. It&amp;#8217;s such a productive and affordable solution, that I&amp;#8217;m sure it will quickly become popular among Ruby developers who are interested in iOS development and testing, as well as among existing iOS developers.&lt;/p&gt;
&lt;p&gt;Many of the questions you may have can likely be found in the &lt;a href="http://www.rubymotion.com/support/#faq"&gt;FAQ&lt;/a&gt; section, but feel free to ask any additional questions here. Enjoy it.&lt;/p&gt;
&lt;p&gt;Possibly related posts:&lt;ol&gt;
&lt;li&gt;&lt;a href="http://programmingzen.com/2008/04/20/is-the-enteprise-world-rails-ready/" rel="bookmark" title="Is the Enterprise world Rails ready?"&gt;Is the Enterprise world Rails ready?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programmingzen.com/2010/06/17/would-you-use-a-mac-mini-as-your-development-machine/" rel="bookmark" title="Would you use a Mac mini as your development machine?"&gt;Would you use a Mac mini as your development machine?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://programmingzen.com/2011/09/20/mobile-development-marketshare/" rel="bookmark" title="Mobile Development Marketshare Among Hacker News&amp;#8217; Participants"&gt;Mobile Development Marketshare Among Hacker News&amp;#8217; Participants&lt;/a&gt;&lt;/li&gt;
&lt;/ol&gt;&lt;/p&gt;</content>
		<author>
			<name>Zen and the Art of Programming</name>
			<uri>http://programmingzen.com</uri>
		</author>
		<source>
			<title type="html">Zen and the Art of Programming » Cocoa and Objective-C</title>
			<subtitle type="html">Meditations on programming, startups, and technology</subtitle>
			<link rel="self" href="http://programmingzen.com/category/cocoa-and-objective-c/feed/" />
			<id>http://programmingzen.com/category/cocoa-and-objective-c/feed/</id>
			<updated>2012-05-26T21:50:03+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Alexis Menard is a WebKit Reviewer!</title>
		<link href="http://www.webkit.org/blog/2002/alexis-menard-is-a-webkit-reviewer/" />
		<id>http://www.webkit.org/blog/?p=2002</id>
		<updated>2012-04-30T15:02:48+00:00</updated>
		<content type="html">&lt;p&gt;Alexis (aka darktears on IRC) has been an unstoppable WebKit coder in the last couple of years working at INdT/Nokia Brazil.&lt;/p&gt;
&lt;p&gt;Among his contributions would be the Qt multimedia backends with GStreamer/QTKit, improvements to getComputedStyle, and countless other contributions in various parts of WebKit.&lt;/p&gt;
&lt;p&gt;We&amp;#8217;re happy to finally remove the word &amp;#8220;unofficial&amp;#8221; from his reviews. Welcome Alexis!&lt;/p&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">Friday Q&amp;amp;amp;A 2012-04-27: PLCrashReporter and Unwinding the Stack With DWARF</title>
		<link href="http://www.mikeash.com/pyblog/friday-qa-2012-04-27-plcrashreporter-and-unwinding-the-stack-with-dwarf.html" />
		<id>http://www.mikeash.com/?page=pyblog/friday-qa-2012-04-27-plcrashreporter-and-unwinding-the-stack-with-dwarf.html</id>
		<updated>2012-04-27T14:11:00+00:00</updated>
		<content type="html">I'm back once again for Friday Q&amp;amp;A. Today I'm going to talk about some work I recently did on &lt;a href="http://plcrashreporter.googlecode.com/"&gt;PLCrashReporter&lt;/a&gt;, adding support for unwinding stack frames on x86_64. PLCrashReporter was originally targeted solely at iOS, where both ARM and x86-32 (the simulator) make crash reporting relatively straight-forward; we can simply walk the stack via the preserved frame pointer. On x86-64, matters are different, leading to the need to implement support for alternative methods for stack unwinding. This work was sponsored by &lt;a href="http://www.hockeyapp.net"&gt;HockeyApp&lt;/a&gt;, to support their &lt;a href="http://www.hockeyapp.net/blog/2012/4/27/mac-os-x-sandbox-support-is-coming.html"&gt;upcoming release&lt;/a&gt; of Mac OS X sandbox-compatible crash reporting. I'll talk about DWARF debugging information, the compact unwind encoding, and stack scanners. I assume at least some knowledge of x86_64 architecture, for simplicity's sake.&lt;br /&gt;&lt;a href="http://www.mikeash.com/pyblog/friday-qa-2012-04-27-plcrashreporter-and-unwinding-the-stack-with-dwarf.html"&gt;(Read More)&lt;/a&gt;</content>
		<author>
			<name>NSBlog</name>
			<uri>http://www.mikeash.com/pyblog/</uri>
		</author>
		<source>
			<title type="html">NSBlog</title>
			<subtitle type="html">Mac OS X and Cocoa programming</subtitle>
			<link rel="self" href="http://www.mikeash.com/pyblog/rss.py" />
			<id>http://www.mikeash.com/pyblog/rss.py</id>
			<updated>2012-05-26T21:49:07+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Last week in WebKit: The Contributors Meeting and datalists</title>
		<link href="http://www.webkit.org/blog/1993/last-week-in-webkit-the-contributors-meeting-and-datalists/" />
		<id>http://www.webkit.org/blog/?p=1993</id>
		<updated>2012-04-26T00:01:25+00:00</updated>
		<content type="html">&lt;p&gt;A total of 652 changes landed last week in various branches of WebKit&amp;#8217;s repository. This update covers changes up to revision 114894.&lt;/p&gt;
&lt;p&gt;Last Thursday and Friday, Apple kindly hosted the 2012 WebKit Contributors Meeting in Cupertino. With contributors from many different vendors around, a large number of subjects were covered in presentations and discussions. Transcripts of most of these &lt;a href="http://trac.webkit.org/wiki/April%202012%20Meeting"&gt;are available on WebKit&amp;#8217;s Trac&lt;/a&gt;, including a group photo of all attendees.&lt;/p&gt;
&lt;p&gt;An experimental Style Panel &lt;a title="Web Inspector: introduce styles panel as an experiment " href="http://trac.webkit.org/changeset/114637"&gt;has been introduced&lt;/a&gt; to Web Inspector which mimics the interface of the Script Panel, which &lt;a title="Web Inspector: implement &amp;quot;open stylesheet&amp;quot; dialog. " href="http://trac.webkit.org/changeset/114878"&gt;also features&lt;/a&gt; an open stylesheet-dialog. Cross-frame security error spam when typing in the console &lt;a title="Web Inspector: x-frame security errors logged when typing in the console are annoying. " href="http://trac.webkit.org/changeset/114632"&gt;is gone&lt;/a&gt;, calling document.open() &lt;a title="Web Inspector: document.open removes the documentElement, but does not clear the elements panel. " href="http://trac.webkit.org/changeset/114494"&gt;will now reset&lt;/a&gt; the Elements Panel and the Inspector is now shimming the startsWith() and endsWith() methods on the String prototype, anticipating implementation of &lt;a title="String extras" href="http://wiki.ecmascript.org/doku.php?id=harmony:string_extras"&gt;Microsoft&amp;#8217;s proposal&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Parsing rules of the :nth-*() pseudo-classes &lt;a title="CSS3 Selectors failures on css3test.com " href="http://trac.webkit.org/changeset/114261"&gt;has been aligned&lt;/a&gt; with the specification. Clipping issues with the CSS drop-shadow filter &lt;a title="[CSS Filters] Do not use clipping rect when calculating the bounds of a layer " href="http://trac.webkit.org/changeset/114518"&gt;have been resolved&lt;/a&gt; and the &amp;#8220;-webkit-filter&amp;#8221; CSS property &lt;a title="-webkit-filter missing from computed style enumeration " href="http://trac.webkit.org/changeset/114766"&gt;will now show up&lt;/a&gt; when enumerating over an element&amp;#8217;s computed style.&lt;/p&gt;
&lt;p&gt;Support for the HTML5 &amp;lt;datalist&amp;gt; element &lt;a title="[chromium] Turn on ENABLE_DATALIST for chromium " href="http://trac.webkit.org/changeset/114545"&gt;has been enabled&lt;/a&gt; for Chromium. It provides similar functionality to suggestions by the browser based on what you previously entered in a text field, with the difference that these suggestions are provided by the website.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Other changes which occurred last week&lt;/strong&gt;:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;The WebKitGTK port &lt;a title="[GTK] Enable Web Timing " href="http://trac.webkit.org/changeset/114736"&gt;has enabled&lt;/a&gt; the Web Timing implementation.&lt;/li&gt;
&lt;li&gt;Performance of several String-returning DOM attribute and property getters &lt;a title="[Performance][V8] Skip Isolate look-up to find StringCache " href="http://trac.webkit.org/changeset/114421"&gt;has been improved&lt;/a&gt; for v8.&lt;/li&gt;
&lt;li&gt;The localStorage.setItem() method cannot &lt;a title="localStorage.setItem can overwrite localStorage methods " href="http://trac.webkit.org/changeset/114427"&gt;override methods&lt;/a&gt; on the Storage prototype anymore.&lt;/li&gt;
&lt;li&gt;The footprint of an element&amp;#8217;s attributes has been &lt;a title="Optimize Element attribute storage for the common case (no Attr objects.) " href="http://trac.webkit.org/changeset/114870"&gt;reduced to a minimum&lt;/a&gt; for common usage.&lt;/li&gt;
&lt;li&gt;The IndexedDB implementation can now &lt;a title="IndexedDB: Support get/getKey(keyRange) " href="http://trac.webkit.org/changeset/114805"&gt;retrieve values or keys&lt;/a&gt; by IDBKeyRanges.&lt;/li&gt;
&lt;/ul&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en">
		<title type="html">Abhishek Arya is now a WebKit reviewer!</title>
		<link href="http://www.webkit.org/blog/1990/abhishek-arya-is-now-a-webkit-reviewer/" />
		<id>http://www.webkit.org/blog/?p=1990</id>
		<updated>2012-04-25T23:03:04+00:00</updated>
		<content type="html">&lt;p&gt;Abhishek, better known to the community as inferno, joined the WebKit community in March 2010, and he has been fixing security bugs in CSS, DOM, editing, rendering, and various other components in WebKit. Abhishek has contributed more than 260 patches, many of which are fixes to severe security bugs.&lt;/p&gt;
&lt;p&gt;Please join me in welcoming Abhishek Arya as a new WebKit reviewer.&lt;/p&gt;</content>
		<author>
			<name>Surfin' Safari</name>
			<uri>http://www.webkit.org/blog</uri>
		</author>
		<source>
			<title type="html">Surfin' Safari</title>
			<subtitle type="html">All about WebKit development</subtitle>
			<link rel="self" href="http://www.webkit.org/blog/feed/" />
			<id>http://www.webkit.org/blog/feed/</id>
			<updated>2012-05-23T10:49:43+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-us">
		<title type="html">SkyDrive</title>
		<link href="http://shapeof.com/archives/2012/04/skydrive.html" />
		<id>urn:uuid:3840225b-228b-4e6f-892c-c4c27c7b5590</id>
		<updated>2012-04-23T23:26:09+00:00</updated>
		<content type="html" xml:lang="en">I just found out about Microsoft's &lt;a href="https://skydrive.live.com"&gt;SkyDrive&lt;/a&gt; from Macworld: "&lt;a href="http://www.macworld.com/article/1166514/new_and_improved_skydrive_is_a_threat_to_dropbox.html#lsrc.rss_main"&gt;New and improved SkyDrive is a threat to Dropbox&lt;/a&gt;".&lt;br /&gt;
&lt;br /&gt;
Since it works similar to Dropbox, I figured I'd try out syncing a &lt;a href="http://flyingmeat.com/voodoopad/"&gt;VoodooPad 5&lt;/a&gt; document from Mac to Mac.  And sure enough, it worked just fine.  I saw new pages being added and modified, without having to close a document.</content>
		<author>
			<name>Gus Mueller</name>
			<uri>http://shapeof.com/</uri>
		</author>
		<source>
			<title type="html">The Shape of Everything</title>
			<link rel="self" href="http://gusmueller.com/blog/atom.xml" />
			<id>http://shapeof.com/</id>
			<updated>2012-05-17T22:32:08+00:00</updated>
		</source>
	</entry>

	<entry>
		<title type="html">An RSS-feed and location-based iOS application</title>
		<link href="http://feedproxy.google.com/~r/CocoaWithLove/~3/LiBRVKUsMGc/process-of-writing-ios-application.html" />
		<id>tag:blogger.com,1999:blog-371408380585915800.post-431916901041080621</id>
		<updated>2012-04-23T22:46:54+00:00</updated>
		<content type="html">&lt;span class="introduction"&gt;&lt;p&gt;The purpose of this post is so that I will have a link to give people when they ask: how do I write an iOS application that pulls data from an RSS feed, displays it pretty and can put things on a map. I'll show you all of that and more as I rewrite my oldest iOS application from scratch: FuelView.&lt;/p&gt;&lt;/span&gt;&lt;blockquote&gt;The app presented in this post, &lt;a href="http://itunes.apple.com/au/app/fuelview/id290932924?mt=8"&gt;FuelView, is freely available on the Australian App Store&lt;/a&gt;.&lt;/blockquote&gt;&lt;span class="fullpost"&gt;&lt;h4&gt;Introduction&lt;/h4&gt;&lt;p&gt;I am commonly asked to write a post where I show a basic "pull data from the network and display" application.&lt;/p&gt;&lt;p&gt;But I think "basic" is boring and I try to avoid it in my blog posts. Instead, I decided to rewrite an application that &lt;em&gt;looks&lt;/em&gt; simple but actually has a deceptively large amount of work to perform. It's a far better example of a real-world iOS application since there should always be enough work done transparently by your application that it leaves the user with a "Wow!"&lt;/p&gt;&lt;p&gt;The actual application is only 3 screens. While a truly simple three screen application might take about 2-3 hours per screen to implement (even if you're just stumbling your way through), this program actually took me about twice that time to implement (around 15 hours or two full days of programming) and I definitely knew what I was doing, since I've written the entire program before.&lt;/p&gt;&lt;p&gt;If you're curious though, in its first incarnation, this program took me 2 weeks to fully implement &amp;mdash; way back in July 2008. It was the first program I ever tried to write for iPhone OS 2.0 and I did a lot of things the wrong way. Having a vague idea what you're trying to do really does make a 5 to 10 times difference to implementation time and unfortunately, the only way to learn is to stumble headlong into things and run the risk of getting everything wrong the first time.&lt;/p&gt;&lt;p&gt;There's a reason why this version is a rewrite from scratch.&lt;/p&gt;&lt;h4&gt;Useful code in this post&lt;/h4&gt;&lt;p&gt;While the application in this post is only directly useful to people living in Western Australia, I think this is a &lt;em&gt;really&lt;/em&gt; interesting project as it contains a lot of very useful snippets of code (some of which I've written posts on before) including:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;strong&gt;An iOS version of my Gloss Gradient drawing code&lt;/strong&gt; (you can see the Mac version in &lt;a href="http://cocoawithlove.com/2008/09/drawing-gloss-gradients-in-coregraphics.html"&gt;Drawing gloss gradients in CoreGraphics&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Two persistent stores with one &lt;code&gt;NSPersistentStoreCoordinator&lt;/code&gt;&lt;/strong&gt;. It seems like a strange scenario that would only be needed in strange situations but the use case turns out to be really common.&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A full set of "single line Core Data fetch" methods&lt;/strong&gt; (something I've previously written about in &lt;a href="http://cocoawithlove.com/2008/03/core-data-one-line-fetch.html"&gt;Core Data: one line fetch&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Getting the GPS location&lt;/strong&gt; (which you can also see in my earlier posts: &lt;a href="http://cocoawithlove.com/2009/09/whereismymac-snow-leopard-corelocation.html"&gt;WhereIsMyMac, a Snow Leopard CoreLocation project&lt;/a&gt; and &lt;a href="http://cocoawithlove.com/2009/12/sample-iphone-application-with-complete.html"&gt;A sample iPhone application with complete unit tests&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Pulling data from an RSS feed&lt;/strong&gt; (using my &lt;code&gt;XMLFetcher&lt;/code&gt; class from &lt;a href="http://cocoawithlove.com/2011/05/classes-for-fetching-and-parsing-xml-or.html"&gt;Classes for fetching and parsing XML or JSON via HTTP&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Caching data in the Application Support directory&lt;/strong&gt; (using a &lt;code&gt;DirectoryLocations&lt;/code&gt; category from &lt;a href="http://cocoawithlove.com/2010/05/finding-or-creating-application-support.html"&gt;Finding or creating the application support directory&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Function to create a two point &lt;code&gt;CGGradientRef&lt;/code&gt; from two &lt;code&gt;UIColors&lt;/code&gt;&lt;/strong&gt; (another in a long list of convenience functions that I'm surprised aren't part of Cocoa)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;An example of using a category as an Adapter interface&lt;/strong&gt; (something I discussed in &lt;a href="http://cocoawithlove.com/2008/05/adapter-interfaces-in-objective-c-using.html"&gt;Adapter interfaces in Objective-C, using categories&lt;/a&gt; without giving any concrete examples)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Scrolling a text field that isn't in a table&lt;/strong&gt; (a similar idea but different implementation to my earlier post &lt;a href="http://cocoawithlove.com/2008/10/sliding-uitextfields-around-to-avoid.html"&gt;Sliding &lt;code&gt;UITextFields&lt;/code&gt; around to avoid the keyboard&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A Core Data Postcode database&lt;/strong&gt; (originally created from a CSV file as shown in &lt;a href="http://cocoawithlove.com/2009/11/writing-parser-using-nsscanner-csv.html"&gt;Writing a parser using &lt;code&gt;NSScanner&lt;/code&gt;&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A flexible, reusable controller/table/cell structure&lt;/strong&gt; (as I discussed in &lt;a href="http://cocoawithlove.com/2010/12/uitableview-construction-drawing-and.html"&gt;&lt;code&gt;UITableView&lt;/code&gt; construction, drawing and management&lt;/a&gt;)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;A &lt;code&gt;CheckmarkCell&lt;/code&gt; that self-manages radio button style selection&lt;/strong&gt; (without the &lt;code&gt;UITableViewController&lt;/code&gt; needing to do anything when the cell is selected, the cells in the section will automatically ensure only one is selected at a time)&lt;/li&gt;&lt;li&gt;&lt;strong&gt;Forward geocoding using Google's Maps API&lt;/strong&gt; (&lt;code&gt;MKReverseGeocoder&lt;/code&gt; goes the other way but a non-Cocoa approach is needed to go from an address to longitude/latitude)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Plus a whole lot more. It really is a densely packed little program.&lt;/p&gt;&lt;blockquote&gt;&lt;strong&gt;So where is all the "useful code"?&lt;/strong&gt; If you skip forward to the second last section, I reveal where in the program you can find all of these code samples.&lt;/blockquote&gt;&lt;h4&gt;About FuelView&lt;/h4&gt;&lt;p&gt;FuelView is an application for getting fuel (petrol/gasoline, diesel, etc) prices in Western Australia. It pulls its information from an RSS feed provided by the &lt;a href="http://www.fuelwatch.wa.gov.au/"&gt;Western Australian government's "Fuel Watch" scheme&lt;/a&gt; that provides fuel prices for all stations in that state.&lt;/p&gt;&lt;p&gt;(No, I don't live in Western Australia &amp;mdash; I'm on the opposite coast of Australia &amp;mdash; but it seemed like a good idea for an iPhone app at the time.)&lt;/p&gt;&lt;p&gt;The application looks like this:&lt;/p&gt;&lt;img src="http://lh6.ggpht.com/-Gk6IssuG7HM/TfykQt5Lz6I/AAAAAAAAAtA/_VQ0Tt0Qu74/fuelviewscreenshots.png?imgmax=800" alt="Fuelviewscreenshots" border="0" width="552" height="358" /&gt;&lt;blockquote&gt;&lt;strong&gt;Download the complete project associated with this post: &lt;a href="http://projectswithlove.com/projects/FuelView.zip"&gt;FuelView.zip&lt;/a&gt; (330kb).&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; the code is all freely available under a zlib-style license but this license does &lt;em&gt;not&lt;/em&gt; extend to the other assets. You may not use the icons or application name in your own programs.&lt;br /&gt;&lt;br /&gt;
The previous version of FuelView (1.1.10 is available for free from the iTunes App Store in Australia. I'll be resubmitting this version (probably 1.2) in a week or two.&lt;/blockquote&gt;&lt;h4&gt;Deceptive complexity&lt;/h4&gt;&lt;p&gt;It all looks very simple; you get the location from the GPS, you pull the correct RSS feed for the location, stick pins in a map for the result.&lt;/p&gt;&lt;p&gt;If that were the actual number of steps involved, it would be great. However, it's not so simple. Let's take a quick look at the issues that will cause the most trouble for this program.&lt;/p&gt;&lt;h5&gt;User location issues&lt;/h5&gt;&lt;p&gt;The GPS gives latitude/longitude but the getting the RSS requires a Western Australian suburb name. In order to make this work, you need to be able to look up all the Western Australian suburbs and find the nearest one for your longitude/latitude. This requires a database of suburb names and their longitude/latitude and some code to search this.&lt;/p&gt;&lt;p&gt;Additionally, I want to be able to let the user specify a postcode for their location instead of using the GPS. Again, I need to be able to look up the suburb name for the postcode. Additionally, any code that requires the user's location must be able to tolerate the location being a postcode, not a raw longitude latitude.&lt;/p&gt;&lt;p&gt;A further complication arises because the FuelWatch RSS feed only exists for "larger" suburbs. Names of smaller suburbs can't be used, so the list of suburbs must be filtered to match the list that the FuelWatch website recognizes.&lt;/p&gt;&lt;h5&gt;Station location issues&lt;/h5&gt;&lt;p&gt;The RSS feed gives the fuel station locations as street addresses but I need longitude and latitudes for them so I can stick pins in the map or calculate the distance between the user and the station.&lt;/p&gt;&lt;p&gt;While this is a similar problem to resolving the user's location, it is actually trickier since new stations appear all the time, so this database must be dynamic (unlike the static postcode database).&lt;/p&gt;&lt;p&gt;I need to actually perform geocoding of fuel stations but there's a problem: Google's APIs are highly restrictive about how often you can make requests. The only way to avoid problems is to pre-populate the database and then have users only perform forward geocoding requests when an unknown fuel station appears and immediately add the new station to the database.&lt;/p&gt;&lt;h5&gt;Custom drawing&lt;/h5&gt;&lt;p&gt;Then I have the more straightforward complexity of custom drawing. I want to have most of the interface follow a custom aesthetic (because plain is boring) and that takes time and effort. I also need to ensure that drawing and layout function properly on an iPad and an iPhone.&lt;/p&gt;&lt;h4&gt;The real design of the program&lt;/h4&gt;&lt;img src="http://lh4.ggpht.com/-ZG5lr97QYP0/Tf2AN6pzN8I/AAAAAAAAAtQ/iyXa-3gFf_U/FuelViewDesign.png?imgmax=800" alt="FuelViewDesign" border="0" width="550" height="318" /&gt;&lt;p&gt;In the diagram here, the green objects are the 3 main view controllers, the orange objects are the main "model" of the program (being the data that is actually displayed and passed between the &lt;code&gt;ResultsViewController&lt;/code&gt; and the &lt;code&gt;MapViewController&lt;/code&gt;) and the blue objects are the data controllers or functional pipelines of the program.&lt;/p&gt;&lt;p&gt;You can see some of the "deceptive complexity" here: the &lt;code&gt;ResultsViewController&lt;/code&gt; is managing three different kinds of model data, and is also managing input from the &lt;code&gt;CLLocationManager&lt;/code&gt; and &lt;code&gt;UITextField&lt;/code&gt;. All this is apart from the normal responsibility of showing and displaying the &lt;code&gt;UITableView&lt;/code&gt; and its rows.&lt;/p&gt;&lt;h4&gt;Initial design of the program&lt;/h4&gt;&lt;p&gt;While I'd love to say: I had this entire design ready when I started, it's simply not true. What I actually had was a quick UI design and a quick sketch of the data pipeline.&lt;/p&gt;&lt;p&gt;My inital sketch for the UI looked like this:&lt;/p&gt;&lt;img src="http://lh5.ggpht.com/-sdmsxw1dApQ/Tf2InYY-yzI/AAAAAAAAAtY/In598Bu8ams/FuelViewInterfaceDesign.png?imgmax=800" alt="FuelViewInterfaceDesign" border="0" width="450" height="253" /&gt;&lt;p&gt;I didn't really need to do this sketch for this program (since the UI is pretty simple) but it's a good way to start all user programs.&lt;/p&gt;&lt;img src="http://lh6.ggpht.com/-VSyoFYV9JKg/Tf2Iwz2dh1I/AAAAAAAAAtc/429b_DA1jh8/FuelViewInitialDesign.png?imgmax=800" alt="FuelViewInitialDesign" border="0" width="450" height="363" /&gt;&lt;p&gt;As you can see, in the three years since I wrote FuelView, I had entirely forgotten about the need to resolve postcodes to suburb names and resolve station locations &amp;mdash; instead I've simply shown the network pipeline.&lt;/p&gt;&lt;p&gt;This forgetfulness is pretty disappointing. Not only does it make me think the program is taking longer than it should but it ultimately leads to some of the design problems I discuss later.&lt;/p&gt;&lt;p&gt;But we're not there yet.&lt;/p&gt;&lt;h4&gt;First implementation iteration&lt;/h4&gt;&lt;p&gt;I'm going to refer to the design stages as "iterations". These steps are often called milestones (or mini-milestones when they're this small) but milestone implies you're only going forward, instead of the reality where you normally need to update the existing interfaces on your classes as part of integrating new features &amp;mdash; so I prefer to think about it as iterating the program.&lt;/p&gt;&lt;p&gt;The first iteration involved implementing the program as described in the "FuelView Initial Dataflow design" shown above.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Created a new project from my &lt;code&gt;PageViewController&lt;/code&gt; template&lt;/li&gt;&lt;li&gt;Pulled in an &lt;code&gt;XMLFetcher&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Hardwired the code to pull the RSS feed for a specific suburb&lt;/li&gt;&lt;li&gt;Displayed the list of addresses from the results as a basic text list&lt;/li&gt;&lt;/ol&gt;&lt;img src="http://lh6.ggpht.com/-dYqprH1duy8/Tf2LO-oZc5I/AAAAAAAAAtk/TfVwYnOvcjY/screenshot4.png?imgmax=800" alt="Screenshot4" border="0" width="180" height="350" /&gt;&lt;h4&gt;Second design iteration&lt;/h4&gt;&lt;p&gt;Now I need to be able to resolve locations from the &lt;code&gt;CLLocationManager&lt;/code&gt; to suburb names. I also need to be able to resolve user-entered postcodes to actual suburb names. Finally, there needs to be logic so that a manually entered suburb name supercedes the GPS.&lt;/p&gt;&lt;img src="http://lh6.ggpht.com/-xcun0_lGflA/Tf2MFY07IpI/AAAAAAAAAts/aGUybd087K0/locationsources.png?imgmax=800" alt="Locationsources" border="0" width="450" height="292" /&gt;&lt;p&gt;Again, I wouldn't ordinarily draw little design diagrams for this but &amp;mdash; its a blog post and big walls of text are boring.&lt;/p&gt;&lt;h4&gt;Second implementation iteration&lt;/h4&gt;&lt;p&gt;To make the second design iteration work, I go through the following steps:&lt;/p&gt;&lt;ol&gt;&lt;li&gt;Modified the &lt;code&gt;CSVImporter&lt;/code&gt; from my &lt;a href="http://cocoawithlove.com/2009/11/writing-parser-using-nsscanner-csv.html"&gt;Writing a parser using &lt;code&gt;NSScanner&lt;/code&gt;&lt;/a&gt; post to generate a list of Western Australian postcodes with longitude and latitude. At the same time, I need to filter out suburbs that won't be recognized by the FuelWatch website&lt;/li&gt;&lt;li&gt;Brought in a standard class for managing a Core Data &lt;code&gt;NSManagedObjectContext&lt;/code&gt; and used the class to perform lookups on the list of &lt;code&gt;Postcodes&lt;/code&gt;&lt;/li&gt;&lt;li&gt;Added code to the &lt;code&gt;ResultsViewController&lt;/code&gt; for &lt;code&gt;CLLocationManager&lt;/code&gt; GPS locations&lt;/li&gt;&lt;li&gt;Added code to the &lt;code&gt;ResultsViewController&lt;/code&gt; to switch between the &lt;code&gt;CLLocationManager&lt;/code&gt; and user-entered &lt;code&gt;Postcode&lt;/code&gt; data sources&lt;/li&gt;&lt;/ol&gt;&lt;h4&gt;Design Mistake #1&lt;/h4&gt;&lt;p&gt;In a general sense, the program is "well-designed" but it still contains two design mistakes. I could fix these mistakes but (a) I'm lazy and (b) I wanted to talk about both of them since I think they're under-discussed design problems.&lt;/p&gt;&lt;p&gt;By this point in the implementation, the first mistake has emerged: the ambiguous overuse of the word "location".&lt;/p&gt;&lt;p&gt;Yes, ambiguous naming is a design mistake. It's not exactly an aspect of design that is thoroughly discussed &amp;mdash; probably because it's considered self-evident &amp;mdash; but as your program evolves and new functions, roles and elements are added to existing classes, it is sometimes necessary to change the names of the classes.&lt;/p&gt;&lt;p&gt;In this program, the word &lt;em&gt;location&lt;/em&gt; has a few different meanings:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;GPS location from the &lt;code&gt;CLLocationManager&lt;/code&gt; (&lt;code&gt;gpsLocation&lt;/code&gt; in the program)&lt;/li&gt;&lt;li&gt;User-specified postcode (&lt;code&gt;usingManualLocation&lt;/code&gt;/&lt;code&gt;postcodeValue&lt;/code&gt; in the program)&lt;/li&gt;&lt;li&gt;Resolved suburb name used for searching (&lt;code&gt;location&lt;/code&gt; property on &lt;code&gt;ResultsViewController&lt;/code&gt; &amp;mdash; a &lt;code&gt;Postcode&lt;/code&gt; object&lt;/li&gt;&lt;li&gt;The location of fuel stations (instances of the &lt;code&gt;Location&lt;/code&gt; class)&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;Yuck, what a nightmare.&lt;/p&gt;&lt;p&gt;The single biggest mistake here is that the &lt;code&gt;location&lt;/code&gt; property on the &lt;code&gt;ResultsViewController&lt;/code&gt; is a &lt;code&gt;Postcode&lt;/code&gt; object, despite the name implying the &lt;code&gt;Location&lt;/code&gt; class. This is an ambiguity you should work really hard to avoid &amp;mdash; and fix when it occurs.&lt;/p&gt;&lt;p&gt;A far better approach would actually be: rename the &lt;code&gt;PostcodesController&lt;/code&gt; to &lt;code&gt;SuburbsController&lt;/code&gt;, rename &lt;code&gt;Postcode&lt;/code&gt; to &lt;code&gt;Suburb&lt;/code&gt;, rename the &lt;code&gt;suburb&lt;/code&gt; property on &lt;code&gt;Suburb&lt;/code&gt; to &lt;code&gt;name&lt;/code&gt; and rename the &lt;code&gt;location&lt;/code&gt; property to &lt;code&gt;suburb&lt;/code&gt;. In addition, it would be better to rename &lt;code&gt;Location&lt;/code&gt; to &lt;code&gt;Station&lt;/code&gt;.&lt;/p&gt;&lt;h4&gt;Third implementation iteration&lt;/h4&gt;&lt;p&gt;Now that the main data path is working, it's time to start on the custom views.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;GradientBackgroundTable&lt;/code&gt; will be the main &lt;code&gt;UITableView&lt;/code&gt; class in the program. Its name is a bit of a misnomer: not so much of a misnomer that it's a design mistake but the table can draw as a gradient but can also draw as a flat color &amp;mdash; it would be better named "Custom colored background table" or something like that.&lt;/p&gt;&lt;p&gt;Each result row will be represented using the following classes:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;&lt;code&gt;ResultCell&lt;/code&gt; &amp;mdash; controller that constructs the rest of the row&lt;/li&gt;&lt;li&gt;&lt;code&gt;ResultCellBackground&lt;/code&gt; &amp;mdash; set as the &lt;code&gt;backgroundView&lt;/code&gt; of the cell. Draws the gray gradient background and not much else&lt;/li&gt;&lt;li&gt;&lt;code&gt;ResultView&lt;/code&gt; &amp;mdash; draws all of the text (does not use &lt;code&gt;UILabels&lt;/code&gt;) and uses the Gloss Gradient code to construct the backing for the actual price display&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;This now brings us a main screen that looks like this:&lt;/p&gt;&lt;img src="http://lh4.ggpht.com/-Dap3YbLri00/Tf2PcfattyI/AAAAAAAAAt8/p0UUkXeeEgg/customdrawing.png?imgmax=800" alt="Customdrawing" border="0" width="200" height="300" /&gt;&lt;p&gt;Note that each row simply shows an orange "cents per litre" line under the price. Ultimately, this should show the distance from the user's current GPS location to the station but since I don't yet have the locations for the stations, I can only show "cents per litre". Note that this "cents per litre" will continue to display in the final program if the user is using a manually-entered postcode (and I don't necessarily know their GPS location).&lt;/p&gt;&lt;h4&gt;Fourth implementation iteration&lt;/h4&gt;&lt;p&gt;Now I need to resolve station locations. I have the street addresses from the FuelWatch RSS feed results but I need to turn this into longitude and latitude to calculate the distance or stick a pin in a map.&lt;/p&gt;&lt;p&gt;I'll use the Google APIs for this. As I've said though, the Google Maps API won't let you perform a large number of requests per second so I need to aggressively pre-cache station locations and only perform a geocoding request when a new fuel station appears for the first time.&lt;/p&gt;&lt;p&gt;The &lt;code&gt;LocationsController&lt;/code&gt; and the &lt;code&gt;Location&lt;/code&gt; lookup generally work like the &lt;code&gt;Postcode&lt;/code&gt; lookup on the &lt;code&gt;PostcodesController&lt;/code&gt; when the station is cached, otherwise, I need a callback when the actual response comes back from Google.&lt;/p&gt;&lt;p&gt;The LocationsController normally uses two Core Data data stores: one is read-only and is the "pre-cached" set of fuel station results (shipped with the application). The second is the read-write data store, saved in the Application Support directory (which is writeable, unlike the application's bundle). This second location will get all new locations for which we need to query Google.&lt;/p&gt;&lt;p&gt;To prepare the pre-cached file of stations that we can ship with the application, the best approach is simply to run in the iPhone Simulator with the LocationController's primary data store set to Read/Write (and the read-only store removed) and when the primary data store fills with results, let it save to file, copy the cached results file from the iPhone Simulator's directory back into the Project.&lt;/p&gt;&lt;p&gt;Once the location is resolved to a longitude and latitude, I can calculate the approximate distance to the user's GPS location, using the approximate kilometres per longitude and latitude at 30 degrees latitude (this is not highly accurate but is sufficient given that most of Western Australia is relatively close to 30 degrees latitude.&lt;/p&gt;&lt;p&gt;With the locations available, I can display the distance in the &lt;code&gt;ResultsView&lt;/code&gt; and color code the distance bar based on how far away the station is.&lt;/p&gt;&lt;img src="http://lh4.ggpht.com/-t8gTWblOCIQ/Tf2S9qG0kAI/AAAAAAAAAuE/BNoTB5pCGO4/locationsavailable.png?imgmax=800" alt="Locationsavailable" border="0" width="200" height="300" /&gt;&lt;blockquote&gt;&lt;strong&gt;Maps Key Note&lt;/strong&gt;: I have removed my Google Maps API key from the code. If you want to use this code, you'll need to apply for your own Google Maps API key and set it the &lt;code&gt;MapsKey&lt;/code&gt; at the top of the LocationsController.m file.&lt;/blockquote&gt;&lt;h4&gt;Fifth implementation iteration&lt;/h4&gt;&lt;p&gt;Implementing the &lt;code&gt;SettingsViewController&lt;/code&gt; to switch fuel types and the &lt;code&gt;MapsViewController&lt;/code&gt; to show the current array of results on a map turns out to be very simple. There's not a significant amount of complexity in either of these views.&lt;/p&gt;&lt;h4&gt;Design Mistake #2&lt;/h4&gt;&lt;p&gt;One point to notice in the implementation of the &lt;code&gt;MapViewController&lt;/code&gt; is that I needed to implement an "Adapter category" on &lt;code&gt;NSDictionary&lt;/code&gt; to allow the &lt;code&gt;NSDictionary&lt;/code&gt; to respond to the &lt;code&gt;MKAnnotion&lt;/code&gt; protocol so I could use the dictionaries to display the pins in the map.&lt;/p&gt;&lt;p&gt;How is this a design mistake?&lt;/p&gt;&lt;p&gt;Needing to put categories on generic classes like this is an indication that you probably should have used a dedicated class to contain your data. The results in the program should not be generic &lt;code&gt;NSDictionary&lt;/code&gt; objects.&lt;/p&gt;&lt;p&gt;Until this point, the "generic"-ness of the main data type in the program has been ignored. The reality though is that the construction of &lt;code&gt;NSDictionary&lt;/code&gt; results from &lt;code&gt;XPathResultNodes&lt;/code&gt; and the resolving of station location for each result has been handled by the &lt;code&gt;ResultsViewController&lt;/code&gt; &amp;mdash; this is all work that a &lt;code&gt;Result&lt;/code&gt; class should be performing for itself instead of using a generic &lt;code&gt;NSDictionary&lt;/code&gt; class and making the &lt;code&gt;ResultViewController&lt;/code&gt; handle all the work.&lt;/p&gt;&lt;p&gt;But ad hoc trickery like adding categories to generic container classes is a big flag that you've forgotten to use a custom class for objects that genuinely need their own behaviors. If you find yourself needing something like this: replace the generic container with a proper custom class.&lt;/p&gt;&lt;p&gt;I'm &lt;em&gt;not&lt;/em&gt; saying that adapter categories are a bad idea. Sometimes you can't or shouldn't change the underlying class &amp;mdash; in this case and adapter is a &lt;em&gt;good&lt;/em&gt; thing. But here in FuelView I can change the 
underlying class and should, in order to reduce the code burden on our controllers.

&lt;h4&gt;So where is all the "useful code"?&lt;/h4&gt;&lt;strong&gt;An iOS version of my Gloss Gradient drawing code&lt;/strong&gt;&lt;p&gt;The GlossGradients.m code is in the project. It's very similar to the original code except that there aren't HSV conversion methods on &lt;code&gt;UIColor&lt;/code&gt; like there is on &lt;code&gt;NSColor&lt;/code&gt;, so I've had to write these methods myself. It is used in the &lt;code&gt;ResultsView&lt;/code&gt; drawing code.&lt;/p&gt;&lt;strong&gt;Two persistent stores with one &lt;code&gt;NSPersistentStoreCoordinator&lt;/code&gt;&lt;/strong&gt;&lt;p&gt;The &lt;code&gt;LocationsController&lt;/code&gt; uses two different persistent stores: a read-only store inside the application bundle that is shipped with the application contains the pre-supplied results for station lookups. But the application bundle can't be changed, so I create a read-write store in the Application Support directory. The &lt;code&gt;NSPersistentStoreCoordinator&lt;/code&gt; is smart enough to save the store to the correct location automatically.&lt;/p&gt;&lt;strong&gt;A full set of "single line Core Data fetch" methods&lt;/strong&gt;&lt;p&gt;The NSManagedObjectContext+FetchAdditions.m file contains a range of different fetch request creation methods and single line fetching implementations (for set, array and single object results). It is used in the &lt;code&gt;LocationsController&lt;/code&gt; and the &lt;code&gt;PostcodesController&lt;/code&gt; to perform the actual queries on the Core Data context.&lt;/p&gt;&lt;strong&gt;Getting the GPS location&lt;/strong&gt;&lt;p&gt;The &lt;code&gt;ResultsViewController&lt;/code&gt; operates as a &lt;code&gt;CLLocationManagerDelegate&lt;/code&gt;. The location receiving code is pretty simple but I think the error handling code in locationFailedWithCode: is more interesting.&lt;/p&gt;&lt;strong&gt;Pulling data from an RSS feed&lt;/strong&gt;&lt;p&gt;Of course, an RSS feed is just XML. We're after the &amp;lt;item&amp;gt; nodes in the result so I use an &lt;code&gt;XMLFetcher&lt;/code&gt; to with an XPath query of "//item". You can see this in the &lt;code&gt;setLocation:&lt;/code&gt; method and the response is handled in the &lt;code&gt;responseReceived:&lt;/code&gt; method (the &lt;code&gt;XPathQueryNodes&lt;/code&gt; are turned into an &lt;code&gt;NSDictionary&lt;/code&gt;).&lt;/p&gt;&lt;strong&gt;Caching data in the Application Support directory&lt;/strong&gt;&lt;p&gt;The application support directory is accessed/created in the &lt;code&gt;persistentStoreCoordinator&lt;/code&gt; method of the &lt;code&gt;LocationsController&lt;/code&gt;. As I said above, this is for writing extra Locations to the Locations Core Data context.&lt;/p&gt;&lt;strong&gt;Function to create a two point CGGradientRef from two UIColors&lt;/strong&gt;&lt;p&gt;The function &lt;code&gt;TwoPointGradient&lt;/code&gt; is pretty simple; it just creates a &lt;code&gt;CGGradientRef&lt;/code&gt; taking two &lt;code&gt;UIColors&lt;/code&gt; to use as the endpoints of the gradient. However, it's 23 lines of code that don't need to be retyped in the &lt;code&gt;ResultCellBackground&lt;/code&gt;, &lt;code&gt;ResultView&lt;/code&gt; and the &lt;code&gt;PageCellBackground&lt;/code&gt;.&lt;/p&gt;&lt;strong&gt;An example of using a category as an Adapter interface&lt;/strong&gt;&lt;p&gt;Putting an adapter on a generic container class is a bad idea if you can easily change the class to something of your own implementation. But this is still an example of adapting a class' interface to suit your own needs &amp;mdash; something that is very useful when you don't have control over the underlying class.&lt;/p&gt;&lt;strong&gt;Scrolling a text field that isn't in a table&lt;/strong&gt;&lt;p&gt;The manually entered postcode is in a text field on a &lt;code&gt;UIToolbar&lt;/code&gt; and when the keyboard appears, the entire &lt;code&gt;UIToolbar&lt;/code&gt; scrolls up with the keyboard. This behavior is handled by the &lt;code&gt;PageViewController&lt;/code&gt; (everything below the "Handle the sliding/scrolling of the view when the keyboard appears" pragma except the dealloc method). The &lt;code&gt;PageViewController&lt;/code&gt; needs to be set as the delegate of the &lt;code&gt;UITextField&lt;/code&gt; for this to work.&lt;/p&gt;&lt;strong&gt;A Core Data Postcode database&lt;/strong&gt;&lt;p&gt;The &lt;code&gt;PostcodesController&lt;/code&gt; shows how to implement a static data store using Core Data. I think I could probably write a base-class for this type of singleton that would dramatically reduce the common code between the &lt;code&gt;PostcodesController&lt;/code&gt; and the &lt;code&gt;LocationsController&lt;/code&gt;.&lt;/p&gt;&lt;strong&gt;A flexible, reusable controller/table/cell structure&lt;/strong&gt;&lt;p&gt;The &lt;code&gt;PageViewController&lt;/code&gt;, &lt;code&gt;PageCell&lt;/code&gt;, all the view controllers and all the table cells are directly based on the code I presented in &lt;a href="http://cocoawithlove.com/2010/12/uitableview-construction-drawing-and.html"&gt;UITableView construction, drawing and management&lt;/a&gt;.&lt;/p&gt;&lt;strong&gt;A &lt;code&gt;CheckmarkCell&lt;/code&gt; that self-manages radio button style selection&lt;/strong&gt;&lt;p&gt;It's strongly reliant on the &lt;code&gt;PageViewController&lt;/code&gt; and &lt;code&gt;PageCell&lt;/code&gt; classes but the &lt;code&gt;CheckmarkCell&lt;/code&gt; shows an easy way (easy for the rest of the program) to manage a section in a table where only one row can be selected.&lt;/p&gt;&lt;strong&gt;Forward geocoding using Google's Maps API&lt;/strong&gt;&lt;p&gt;The &lt;code&gt;locationForAddress:receiver:&lt;/code&gt; method in &lt;code&gt;LocationsController&lt;/code&gt; performs an XML request on Googles Maps API to forward geocode addresses into longitude and latitude (the response is handled in &lt;code&gt;mapsResponseReceived:&lt;/code&gt;). Again: you'll need your own Maps API Key to make this work.&lt;/p&gt;&lt;h4&gt;Conclusion&lt;/h4&gt;&lt;blockquote&gt;&lt;strong&gt;Download the complete project associated with this post: &lt;a href="http://projectswithlove.com/projects/FuelView.zip"&gt;FuelView.zip&lt;/a&gt; (330kb).&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Note:&lt;/strong&gt; the code is all freely available under a zlib-style license but this license does &lt;em&gt;not&lt;/em&gt; extend to the other assets. You may not use the icons or application name in your own programs.&lt;br /&gt;&lt;br /&gt;
The app presented in this post, &lt;a href="http://itunes.apple.com/au/app/fuelview/id290932924?mt=8"&gt;FuelView, is freely available on the Australian App Store&lt;/a&gt;.&lt;/blockquote&gt;&lt;p&gt;I did this rewrite of FuelView for three reasons:&lt;/p&gt;&lt;ul&gt;&lt;li&gt;I hadn't written any code at work for a week or two &amp;mdash; I needed to scratch my codemonkey itch with a few hours of actual programming instead of meetings and documentation.&lt;/li&gt;&lt;li&gt;Preparing code like this for my blog motivates me to review my reusable classes and make them more presentable.&lt;/li&gt;&lt;li&gt;I'm often asked to show an iOS program that pulls data from an RSS feed.&lt;/li&gt;&lt;/ul&gt;&lt;p&gt;The first two points are entirely for my own purposes and went fine, thanks.&lt;/p&gt;&lt;p&gt;On the third point &amp;mdash; this is definitely code that pulls from an RSS feed. I hope the scale of the program doesn't make it hard to see how the basics work. In addition to RSS feed handling though, there's lot of other code here so I hope there's something here for programmers at a range of different skill levels.&lt;/p&gt;&lt;/p&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;All content in this post is © Matt Gallagher (CocoaWithLove.com), all rights reserved.
Code samples may be freely used in any programming project, commercial or otherwise, at your risk.&lt;img width="1" height="1" src="https://blogger.googleusercontent.com/tracker/371408380585915800-431916901041080621?l=cocoawithlove.com" alt="" /&gt;&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/CocoaWithLove/~4/LiBRVKUsMGc" height="1" width="1" /&gt;</content>
		<author>
			<name>Matt Gallagher</name>
			<email>noreply@blogger.com</email>
			<uri>http://cocoawithlove.com/</uri>
		</author>
		<source>
			<title type="html">Cocoa with Love</title>
			<subtitle type="html">Advanced programming tips, tricks and hacks for Mac development in C/Objective-C and Cocoa.</subtitle>
			<link rel="self" href="http://cocoawithlove.com/feeds/posts/default?alt=rss" />
			<id>tag:blogger.com,1999:blog-371408380585915800</id>
			<updated>2012-05-21T13:49:22+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-us">
		<title type="html">VoodooPad 5.0 Released</title>
		<link href="http://shapeof.com/archives/2012/04/voodoopad_5.0_released.html" />
		<id>urn:uuid:d9019e2a-aaa4-493f-a006-d1d5faa1dfc5</id>
		<updated>2012-04-21T19:47:19+00:00</updated>
		<content type="html" xml:lang="en">VoodooPad 5.0 is finally out.&lt;br /&gt;
&lt;br /&gt;
You can read about my &lt;a href="http://flyingmeat.com/blog/archives/2012/04/voodoopad_5.0_released.html"&gt;favorite new features on the FM Blog&lt;/a&gt;, and you can download VoodooPad 5 from the &lt;a href="http://www.flyingmeat.com/voodoopad/"&gt;VoodooPad website&lt;/a&gt;.&lt;br /&gt;
&lt;br /&gt;
It feels really really good to finally release this; VP5 was one of the most difficult releases I've ever done.  So much internally has changed, and combined with VP for iOS 2.0 being released at the same time- I'm surprised I didn't kill myself.&lt;br /&gt;
&lt;br /&gt;
Even though Acorn brings in the lion's share of my revenues for Flying Meat (over 90%), I still love using and working on VoodooPad.  It works like I do, and it allows me to squirrel away thoughts and info and write my documentation and everything in it.  If you're a long time VoodooPad geek, I think you're &lt;a href="http://www.flyingmeat.com/voodoopad/"&gt;really going to like this update&lt;/a&gt;.</content>
		<author>
			<name>Gus Mueller</name>
			<uri>http://shapeof.com/</uri>
		</author>
		<source>
			<title type="html">The Shape of Everything</title>
			<link rel="self" href="http://gusmueller.com/blog/atom.xml" />
			<id>http://shapeof.com/</id>
			<updated>2012-05-17T22:32:08+00:00</updated>
		</source>
	</entry>

	<entry xml:lang="en-us">
		<title type="html">Forbes: It's Time to End the Drug War</title>
		<link href="http://shapeof.com/archives/2012/04/forbes:_it_s_time_to_end_the_drug_war.html" />
		<id>urn:uuid:8105254d-4f15-4817-b927-fd5a07daa64e</id>
		<updated>2012-04-20T18:49:45+00:00</updated>
		<content type="html" xml:lang="en">Forbes: &lt;a href="http://www.forbes.com/sites/artcarden/2012/04/19/lets-be-blunt-its-time-to-end-the-drug-war/"&gt;It's Time to End the Drug War&lt;/a&gt;:&lt;br /&gt;
&lt;br /&gt;
&lt;blockquote&gt;"April 20 is the counter-culture “holiday” on which lots and lots of people come together to advocate marijuana legalization (or just get high). Should drugs—especially marijuana—be legal? The answer is “yes.” Immediately. Without hesitation. Do not pass Go. Do not collect $200 seized in a civil asset forfeiture. The war on drugs has been a dismal failure. It’s high time to end prohibition. Even if you aren’t willing to go whole-hog and legalize all drugs, at the very least we should legalize marijuana."&lt;/blockquote&gt;
&lt;br /&gt;
I'm tempted to quote the whole (relatively short) article since it touches on just about every reason I support full legalization of marijuana.</content>
		<author>
			<name>Gus Mueller</name>
			<uri>http://shapeof.com/</uri>
		</author>
		<source>
			<title type="html">The Shape of Everything</title>
			<link rel="self" href="http://gusmueller.com/blog/atom.xml" />
			<id>http://shapeof.com/</id>
			<updated>2012-05-17T22:32:08+00:00</updated>
		</source>
	</entry>

</feed>

