<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Notes From Andy</title>
	<atom:link href="http://www.notesfromandy.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.notesfromandy.com</link>
	<description>Andy Lee&#039;s weblog</description>
	<lastBuildDate>Fri, 18 May 2012 16:44:02 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Thanks, Mom</title>
		<link>http://www.notesfromandy.com/2012/05/13/thanks-mom/</link>
		<comments>http://www.notesfromandy.com/2012/05/13/thanks-mom/#comments</comments>
		<pubDate>Sun, 13 May 2012 19:00:44 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1039</guid>
		<description><![CDATA[When you create a project in Xcode, the default About box thanks Mom: I don&#039;t remember if this was the case ten years ago &#8212; I&#039;m not sure there even was a default Credits file &#8212; but I&#039;m quite sure &#8230; <a href="http://www.notesfromandy.com/2012/05/13/thanks-mom/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>When you create a project in Xcode, the default About box thanks Mom:</p>

<p><img src="http://www.notesfromandy.com/wp-content/uploads/2012/05/DefaultAboutBox.png" alt="Default About box" width="284" height="346" style="margin-left:50px; border: 1px solid lightgray; padding:2px 2px;" /></p>

<p>I don&#039;t remember if this was the case ten years ago &#8212; I&#039;m not sure there even <em>was</em> a default Credits file &#8212; but I&#039;m quite sure it was my own idea to thank my Mom in AppKiDo&#039;s About box:</p>

<p><img src="http://www.notesfromandy.com/wp-content/uploads/2012/05/AppKiDoAboutBox.png" alt="AppKiDo About box" width="377" height="221" style="margin-left:50px; border: 1px solid lightgray; padding:2px 2px;" /></p>

<p>It bears repeating: Thanks, Mom! I love you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/05/13/thanks-mom/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>John Geleynse</title>
		<link>http://www.notesfromandy.com/2012/05/11/john-geleynse/</link>
		<comments>http://www.notesfromandy.com/2012/05/11/john-geleynse/#comments</comments>
		<pubDate>Fri, 11 May 2012 16:15:08 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1032</guid>
		<description><![CDATA[Last year I wondered about Ron Okamoto&#039;s responsibilities at Apple. (Who is Ron Okamoto, you ask? Exactly.) I guessed, or maybe saw somewhere, that Okamoto manages John Geleynse. Today I was thinking about Developer Relations again and came across Geleynse&#039;s &#8230; <a href="http://www.notesfromandy.com/2012/05/11/john-geleynse/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>Last year I <a target="_blank" href="/2011/01/11/who-is-in-charge-of-developer-relations/">wondered</a> about Ron Okamoto&#039;s responsibilities at Apple. (Who is Ron Okamoto, you ask? <a target="_blank" href="http://twitter.com/#!/cocoadog/status/200940577989206016">Exactly</a>.)</p>

<p>I guessed, or maybe saw somewhere, that Okamoto manages John Geleynse. Today I was thinking about Developer Relations again and came across Geleynse&#039;s <a target="_blank" href="http://www.linkedin.com/in/jgeleynse">LinkedIn page</a>, where he describes his dual role as both Director of Technology Evangelism and User Experience Evangelist at Apple.</p>

<p>Geleynse&#039;s mission, as I understand it, is to help developers be <em>Apple</em> developers in the strongest possible sense of the term. He and his team help us learn and use Apple technology, and he helps us design user experiences that are up to Apple&#039;s standards.</p>

<p>I see he&#039;s not responsible for the sort of plumbing issues that are most often complained about, like <a target="_blank" href="http://thenextweb.com/apple/2012/04/13/app-developers-frustrated-with-bug-reporting-tools-call-on-apple-to-fix-radar-or-gtfo/">Radar</a>, like app reviews and rejections, or like the recent fiasco with WWDC tickets <a target="_blank" href="http://appadvice.com/appnn/2012/04/apple-apparently-canceling-wwdc-tickets-of-ineligible-buyers">being</a> <a target="_blank" href="http://twitter.com/#!/marczak/status/200936099445616641">revoked</a>. But he might be someone to bug (assuming he&#039;s approachable) about the uncertainty around <a target="_blank" href="http://www.red-sweater.com/blog/2324/fix-the-sandbox">sandboxing</a>.</p>

<p>I saw Geleynse helping someone at a Tech Talk years ago, and he seemed interesting. I wonder if he&#039;ll give a talk or have some sort of presence at WWDC other than hosting the Apple Design Awards.</p>

<blockquote>
  <p><strong>Director, Technology Evangelism</strong><br />
  Apple Inc.<br />
  Public Company; 10,001+ employees; AAPL; Consumer Electronics industry<br />
  December 2002 – Present (9 years 6 months)<br />
  Responsible for directing a team of technology Evangelists who:</p>
  
  <ul>
  <li>Provide the technical guidance and insight needed by 3rd parties to build elegant, attractive, innovative, connected, integrated, and great software solutions for iPad, iPhone, and Mac</li>
  <li>Promote advanced iOS and OS X technologies and software development techniques to the 3rd party ISV and software development community</li>
  <li>Work with Apple’s engineering and interface design teams to efficiently address technology adoption issues faced by 3rd party software developers</li>
  <li>Track 3rd party developer technology needs and communicate them cross-functionally within Apple</li>
  <li>Define and manage the technical content for the annual Apple Worldwide Developer&#039;s Conference (WWDC) and annual Tech Talks</li>
  <li>Manage and host the annual Apple Design Awards</li>
  </ul>
  
  <p><strong>User Experience Evangelist</strong><br />
  Apple Inc.<br />
  Public Company; 10,001+ employees; AAPL; Consumer Electronics industry<br />
  November 1999 – Present (12 years 7 months)<br />
  The user experience for Mac OS X applications encompasses the visual appearance, interactive behavior, and assistive capabilities of software.</p>
  
  <p>Primary responsibilites include:</p>
  
  <ul>
  <li>Working one on one with 3rd party software development team to ensure that products they&#039;re building deliver a truly Mac OS X user experience</li>
  <li>Improving the user interfaces of 3rd party software products via design audit/review meetings in which every application window, dialog, palette, toolbar, and icon is reviewied for Aqua compliance and the overall usability and interaction design is analyzed and re-designed</li>
  <li>Defining the lions-share contents of each revision of the Apple Human Interface Guidelines</li>
  <li>Working closely with Apple OS Engineering to ensure Aqua adoption issues faced by 3rd party developers are addressed.</li>
  </ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/05/11/john-geleynse/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A quick look at Dash for doc browsing</title>
		<link>http://www.notesfromandy.com/2012/05/10/a-quick-look-at-dash-for-doc-browsing/</link>
		<comments>http://www.notesfromandy.com/2012/05/10/a-quick-look-at-dash-for-doc-browsing/#comments</comments>
		<pubDate>Thu, 10 May 2012 17:04:19 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1021</guid>
		<description><![CDATA[Dash, by Bogdan Popescu, is a brilliant developer utility that removes friction from two key areas of programming: looking up documentation and reusing code snippets. I haven&#039;t played with the snippets manager, and I&#039;ve only played with the doc browser &#8230; <a href="http://www.notesfromandy.com/2012/05/10/a-quick-look-at-dash-for-doc-browsing/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><img width="480" height="300" src="http://kapeli.com/wp-content/uploads/2011/08/Screenshot-16.png"/></p>

<p><a target="_blank" href="http://kapeli.com/dash/">Dash</a>, by Bogdan Popescu, is a brilliant developer utility that removes friction from two key areas of programming: looking up documentation and reusing code snippets. I haven&#039;t played with the snippets manager, and I&#039;ve only played with the doc browser for a few minutes, but already I notice some excellent things:</p>

<ul>
<li>It&#039;s <strong>fast to open</strong> and dismiss with a hotkey.</li>
<li>It performs <strong>fast live-searching</strong> as you type into the search field.</li>
<li>It includes a <strong>ton of docsets</strong> for a variety of languages and platforms, not just Cocoa and iOS. See the screenshot above for a complete list.</li>
<li>You can <strong>add your own docsets</strong>. The Kapeli web site helpfully <a target="_blank" href="http://kapeli.com/docsets/">points</a> you to instructions for creating them.</li>
<li>It shows an <a target="_blank" href="http://fileability.net/ingredients/">Ingredients</a>-like <strong>table of contents</strong> listing methods, properties, etc. for the class you&#039;re looking at.</li>
<li>It has options to <strong>search Google and StackOverflow</strong>, all while staying within the app.</li>
<li>It handles URLs of the form &#034;<strong>dash://foo</strong>&#034;. If you click on such a URL, the Dash window will open and perform a search for &#034;foo&#034;. This can be useful for things like emailing URLs as pointers to documentation, and putting links in one&#039;s own notes. Who knows, maybe someday there will be a web site called &#034;Let Me Dash That For You&#034; (although lmdtfy.com is already taken).</li>
</ul>

<p>In Xcode, URLs are clickable when they appear in comments. Unfortunately, this doesn&#039;t work with dash:// URLs. I&#039;ve filed a <a target="_blank" href="http://openradar.appspot.com/radar?id=1678405">Radar</a> requesting the ability to specify more URL schemes for Xcode to recognize. In the meantime, if one wanted clickable links badly enough, I suppose one could run a local HTTP server that converts localhost URLs to Dash URLs. Maybe Dash could have such a server built in? Would it be worth it?</p>

<p>More suggestions:</p>

<ul>
<li><p><strike><strong>Add a Service</strong> that performs a search, much like a dash:// URL, but using the currently selected text in my frontmost application (which might be Dash itself).</strike></p>

<p>[<strong>UPDATE:</strong> @kapelimac <a target="_blank" href="http://twitter.com/#!/kapelimac/status/200636329552388096">informs me</a> that Dash has had a "Lookup in Dash" Service for quite a while. My fault for not spotting it.]</p></li>
<li><p><strong>Auto-detect method names.</strong> When I come across a method call like <code>[obj doThis:xxx withThis:yyy]</code> I&#039;d like to be able to double-click one of the brackets to select the whole expression, and invoke the above-mentioned Service to perform a search. I&#039;d like Dash to recognize that what I mean to search for is &#034;doThis:withThis:&#034;. For extra credit, be able to detect a method name in <em>any</em> string that contains a colon. Or if that&#039;s too hard, any string that begins with a square bracket.</p></li>
<li><p><strong>Add a social element</strong> such as Scott Anguish <a target="_blank" href="http://www.cocoabuilder.com/archive/cocoa/207176-documetation-suggestion-was-re-cocoa-et-al-as-hci-usability-problem.html?q=integrated+into+something+like+AppKido#207860">suggested</a> a while back. This might not be a direction Bogdan wants to invest in, but it would be an interesting experiment. Of course, that&#039;s easy to say when I&#039;m not the one doing the investing.</p>

<p>[<strong>UPDATE:</strong> <a target="_blank" href="http://twitter.com/#!/kapelimac/status/200636676123537408">More</a> from @kapelimac: "And another note: Dash has had Wiki pages for each method/class, but no one used them, so I removed them. <a target="_blank" href="http://twitter.com/#!/kapelimac/status/200636997386248192">And</a>: "I plan on adding Disqus threads to all documentation pages, but I'm still waiting on a reply from @disqushelp if they allow it."]</p></li>
</ul>

<p>I see from Dash&#039;s Twitter feed that Bogdan is quite actively working on the app, and in fact plans to start <a target="_blank" href="https://twitter.com/#!/kapelimac/status/200547953381867520">charging</a> for it with the next release. I  encourage you to check it out now while it is free, and to consider buying when Bogdan sets a price on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/05/10/a-quick-look-at-dash-for-doc-browsing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Liking SpeakerDeck</title>
		<link>http://www.notesfromandy.com/2012/04/26/liking-speakerdeck/</link>
		<comments>http://www.notesfromandy.com/2012/04/26/liking-speakerdeck/#comments</comments>
		<pubDate>Thu, 26 Apr 2012 05:22:15 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1014</guid>
		<description><![CDATA[I&#039;m glad I learned about SpeakerDeck from Samuel Goodwin, who used it to share the slides from his presentation at last month&#039;s CocoaHeadsNYC. I used it to embed Bob Clair&#039;s slides (also from last month) and again this month to &#8230; <a href="http://www.notesfromandy.com/2012/04/26/liking-speakerdeck/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I&#039;m glad I learned about <a target="_blank" href="http://speakerdeck.com/">SpeakerDeck</a> from Samuel Goodwin, who used it to share the slides from his presentation at <a target="_blank" href="http://www.cocoaheadsnyc.org/2012/04/08/march-2012-samuel-and-bob/">last month&#039;s CocoaHeadsNYC</a>. I used it to embed Bob Clair&#039;s slides (also from last month) and again this month to embed <a target="_blank" href="http://www.cocoaheadsnyc.org/2012/04/25/april-2012-isaac/">Isaac Schmidt&#039;s slides</a>.</p>

<p>SpeakerDeck seems great not only for sharing but for <a target="_blank" href="http://speakerdeck.com/search?q=cocoa">discovering</a> interesting presentations. Henceforth, unless I find something about SpeakerDeck that changes my mind, the CocoaHeadsNYC slides will be at &lt;<a target="_blank" href="http://speakerdeck.com/u/cocoaheadsnyc">http://speakerdeck.com/u/cocoaheadsnyc</a>>. The only drawback I can think of is that too many embedded slideshows might bog down the load time of the CocoaHeadsNYC home page. If that turns out to be the case I&#039;m sure I can tweak WordPress to show fewer articles per page.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/04/26/liking-speakerdeck/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why no PC guilt?</title>
		<link>http://www.notesfromandy.com/2012/04/09/why-no-pc-guilt/</link>
		<comments>http://www.notesfromandy.com/2012/04/09/why-no-pc-guilt/#comments</comments>
		<pubDate>Mon, 09 Apr 2012 05:58:49 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1010</guid>
		<description><![CDATA[I get the argument that Apple, which profits handsomely on the backs of cheap factory labor, has a special responsibility to improve labor conditions where it can. What I don&#039;t get is why PC users &#8212; not the companies but &#8230; <a href="http://www.notesfromandy.com/2012/04/09/why-no-pc-guilt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I get the argument that Apple, which profits handsomely on the backs of cheap factory labor, has a special responsibility to improve labor conditions where it can. What I don&#039;t get is why PC users &#8212; not the companies but the hundreds of millions of customers &#8212; have been silent for so long, and why they were silent in all the years before Apple climbed to its current position at the top.</p>

<p>Well, maybe &#034;silent&#034; is not the word. PC users and hobbyists have long bragged about how much less they pay than Mac users for equivalent or greater horsepower. Yet, by this very argument, PC customers benefit far more from harsh labor conditions than Apple customers. And over the years many more Windows computers have been sold than Apple computers (another point of pride for the PC crowd). Which community has the greater guilt?</p>

<p>In the decades that Windows has dominated the desktop, why haven&#039;t PC customers used their power to force manufacturers to improve conditions? We never hear a PC hobbyist say, &#034;I&#039;m conflicted. I love the killer system I built for under $200, but I&#039;m ashamed of exploiting people who have no right to unionize.&#034; We never hear noble offers to pay more for PC components, even as we are told the exact amount iPad owners should volunteer to pay so that Chinese workers can live a little better.</p>

<p>What&#039;s more important: humane working conditions, or saving twenty bucks on a graphics card that will let you play the latest game at 50 frames a second instead of 40? How many Xbox workers have to threaten suicide before somebody delivers a petition to Microsoft?</p>

<p>I&#039;m being deliberately inflammatory here. I don&#039;t think there&#039;s a simple &#034;me good, you bad&#034; answer for either side. My point is that it&#039;s easy to point a finger if you never examine your own actions.</p>

<p>By the way, a really interesting book on migrant factory workers in China is &#034;<a target="_blank" href="http://www.amazon.com/Factory-Girls-Village-Changing-China/dp/0385520182/">Factory Girls</a>&#034;, by Leslie T. Chang.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/04/09/why-no-pc-guilt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Spock using a spatial UI</title>
		<link>http://www.notesfromandy.com/2012/02/14/spock-using-a-spatial-ui/</link>
		<comments>http://www.notesfromandy.com/2012/02/14/spock-using-a-spatial-ui/#comments</comments>
		<pubDate>Tue, 14 Feb 2012 05:24:38 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1000</guid>
		<description><![CDATA[I was watching the very first Star Trek pilot, and I noticed that for one brief second Spock seems to use a spatial UI gesture to control the big screen. If you have streaming Netflix, you can see for yourself &#8230; <a href="http://www.notesfromandy.com/2012/02/14/spock-using-a-spatial-ui/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>I was watching the very first Star Trek pilot, and I noticed that for one brief second Spock seems to use a spatial UI gesture to control the big screen.</p>

<p>If you have streaming Netflix, you can see for yourself right now. Perhaps you can check whether I&#039;m mistaken. The episode is called &#034;The Cage&#034;, and the moment I&#039;m talking about is at 2:29. It looks like Spock swipes his finger in the air from left to right, causing the screen to change from a view of space to a map of some planets. He then says &#034;Records show the Talos group has never been explored.&#034;</p>

<p>I learned from <a href="http://en.wikipedia.org/wiki/The_Cage_(Star_Trek:_The_Original_Series)" target="_blank">Wikipedia</a> that although this episode was completed in 1965, it wasn&#039;t broadcast until 1988. Even with the 23-year delay, I wonder if it was the first example on TV of a spatial gesture-based UI, long predating &#034;Minority Report&#034; and the Kinect. Maybe not; I haven&#039;t watched all that much science fiction.</p>

<p>I&#039;d like to see someone try to use this as a prior art argument in a patent lawsuit, <a href="http://www.pcworld.com/article/238664/samsung_claims_tabletlike_device_in_2001_a_space_odyssey_invalidates_apple_patent.html" target="_blank">as was done</a> with the tablets in &#034;2001: A Space Odyssey&#034;.</p>

<p><img src="http://www.notesfromandy.com/wp-content/uploads/2012/02/spock-gesture-begin.png" alt="Spock gesture begin" title="spock-gesture-begin.png" border="0" width="320" height="239" /></p>

<p><img src="http://www.notesfromandy.com/wp-content/uploads/2012/02/spock-gesture-end.png" alt="Spock gesture end" title="spock-gesture-end.png" border="0" width="320" height="238" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/02/14/spock-using-a-spatial-ui/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Dumb comments on purpose</title>
		<link>http://www.notesfromandy.com/2012/02/12/dumb-comments-on-purpose/</link>
		<comments>http://www.notesfromandy.com/2012/02/12/dumb-comments-on-purpose/#comments</comments>
		<pubDate>Sun, 12 Feb 2012 06:26:22 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[ProgrammingHabits]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=991</guid>
		<description><![CDATA[(Note: This is about comments in code, not the topic of blog comments which was debated recently by various bloggers.) One of the first things they teach programmers about comments is, &#034;Don&#039;t merely repeat in the comment what the line &#8230; <a href="http://www.notesfromandy.com/2012/02/12/dumb-comments-on-purpose/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p><em>(Note: This is about comments in code, not the topic of blog comments which was debated recently by various bloggers.)</em></p>

<p>One of the first things they teach programmers about comments is, &#034;Don&#039;t merely repeat in the comment what the line of code literally does.&#034; A laughable example such as the following is usually given.</p>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;">x <span style="color: #002200;">=</span> y <span style="color: #002200;">*</span> y;  <span style="color: #11740a; font-style: italic;">// Set x to the square of y.</span></pre></div></div>


<p>In general I abide by this rule, but there is one exception: when I need a comment to turn a <em>line</em> of code into a <em>section</em> of code.</p>

<p>I use inline comments to break a block into logical sections. Taken by themselves, the comments tell a story. For example, here&#039;s a method that creates a cake, the way some people would write it:</p>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>xxx <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>cake
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// Bake in oven.</span>
    xxxxx;
    xxxxx;
    xxxxx;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Add icing.</span>
    xxxxx;
    xxxxx;
&nbsp;
    <span style="color: #a61390;">return</span> xxxxx;
<span style="color: #002200;">&#125;</span></pre></div></div>


<p>The above code doesn&#039;t look right to me, because it looks like the &#034;return xxxxx;&#034; is part of the &#034;Add icing&#034; step when it&#039;s not. To rectify this I add a dumb comment that puts &#034;return xxxxx;&#034; into its own section:</p>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span>xxx <span style="color: #002200;">*</span><span style="color: #002200;">&#41;</span>cake
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// Bake in oven.</span>
    xxxxx;
    xxxxx;
    xxxxx;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Add icing.</span>
    xxxxx;
    xxxxx;
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Return the result.</span>
    <span style="color: #a61390;">return</span> xxxxx;
<span style="color: #002200;">&#125;</span></pre></div></div>


<p>I do something similar with methods that run through a gauntlet of reasons for possibly returning early. If they survive the gauntlet, I add a dumb &#034;If we got this far&#8230;&#034; comment.</p>


<div class="wp_syntax"><div class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>shouldEatIceCream
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// Is the ice cream poisoned?</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>xxxxx<span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
        <span style="color: #a61390;">return</span> <span style="color: #a61390;">NO</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Is it my birthday?</span>
    <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>xxxxx<span style="color: #002200;">&#41;</span>
    <span style="color: #002200;">&#123;</span>
        <span style="color: #a61390;">return</span> <span style="color: #a61390;">YES</span>;
    <span style="color: #002200;">&#125;</span>
&nbsp;
    <span style="color: #11740a; font-style: italic;">// If we got this far, we shouldn't eat the ice cream.</span>
    <span style="color: #a61390;">return</span> <span style="color: #a61390;">NO</span>;
<span style="color: #002200;">&#125;</span></pre></div></div>


<p>I try to think of something more intelligent to say in these comments, but often I don&#039;t.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/02/12/dumb-comments-on-purpose/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ellen and Bill</title>
		<link>http://www.notesfromandy.com/2012/02/10/ellen-and-bill/</link>
		<comments>http://www.notesfromandy.com/2012/02/10/ellen-and-bill/#comments</comments>
		<pubDate>Fri, 10 Feb 2012 17:52:33 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=970</guid>
		<description><![CDATA[I think O&#039;Reilly&#039;s arguing on the right side for the wrong reasons. People most certainly can and should protest a business if they feel it is doing something wrong. The real issue is not whether it&#039;s wrong to protest a &#8230; <a href="http://www.notesfromandy.com/2012/02/10/ellen-and-bill/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<iframe width="480" height="274" src="http://www.youtube-nocookie.com/embed/sgm06iMF4uE?rel=0" frameborder="0" allowfullscreen></iframe>

<p></p>

<p>I think O&#039;Reilly&#039;s arguing on the right side for the wrong reasons. People most certainly can and should protest a business if they feel it is doing something wrong.</p>

<p>The real issue is not whether it&#039;s wrong to protest a &#034;business decision&#034;. The real issue is whether being gay has anything to do with morality in the first place. The people who are calling for Ellen to be fired believe it does, and the real answer is that <em>that</em> is wrong, not that business decisions are somehow exempt from protest.</p>

<p>He might be playing a little misdirection game here. Notice how he compares this to calls for him to be fired. (For me, Glenn Beck and Pat Buchanan came to mind.) He claims those are also wrong. I think he wants to be able to shoot down any attacks on him by saying &#034;Hey, I defended the liberal side when it came to a gay person. Aren&#039;t you being just as bad as OneMillionMoms?&#034;</p>

<p>I&#039;ll give O&#039;Reilly more credit the day he stops calling homosexuality a &#034;lifestyle&#034;, which is code for &#034;It has moral implications.&#034;</p>

<p>I did enjoy his mocking the OneMillionMoms for declining to appear on the show. And the fact remains that he is defending Ellen Degeneres, for which she&#039;s rightly <a href="http://youtu.be/_zNKTTtAXCs" target="_blank">thanked him</a>.</p>

<p>See also &#034;Ellen Addresses Her JCPenney Critics&#034;.</p>

<iframe width="480" height="274" src="http://www.youtube-nocookie.com/embed/_zNKTTtAXCs?rel=0" frameborder="0" allowfullscreen></iframe>

<p>[EDIT: Switched the second and third paragraphs.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/02/10/ellen-and-bill/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Docsets can have bugs</title>
		<link>http://www.notesfromandy.com/2012/02/09/docsets-can-have-bugs/</link>
		<comments>http://www.notesfromandy.com/2012/02/09/docsets-can-have-bugs/#comments</comments>
		<pubDate>Thu, 09 Feb 2012 10:32:58 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[AppKiDo]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=965</guid>
		<description><![CDATA[If you&#039;ve grabbed the latest AppKiDo (0.988; release notes here) and it seems to be a bit slower starting up, here&#039;s why. AppKiDo is a documentation browser for the Cocoa APIs. As such, it needs information about all sorts of &#8230; <a href="http://www.notesfromandy.com/2012/02/09/docsets-can-have-bugs/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>If you&#039;ve grabbed the latest AppKiDo (0.988; release notes <a href="http://homepage.mac.com/aglee/downloads/release-notes.html" target="_blank">here</a>) and it seems to be a bit slower starting up, here&#039;s why.</p>

<p>AppKiDo is a documentation browser for the Cocoa APIs. As such, it needs information about all sorts of API symbols: class names, protocol names, method names, function names, typedefs, and constants. This information is scraped from two places: Objective-C header files and special bundles called docsets.</p>

<p>A docset contains a bunch of HTML files (the documentation) along with a &#034;docset index&#034; &#8212; a SQLite database file named docSet.dsidx. One thing the docset index does is it maps each API symbol to two file paths:</p>

<ul>
<li>The header file where the symbol is declared.</li>
<li>The HTML file where the symbol is documented.</li>
</ul>

<p>The way AppKiDo is designed, it needs to know what framework every symbol belongs to. NSString and its methods belong to the Foundation framework, NSView and its methods belong to the AppKit framework, and so on. I&#039;ve been getting this framework information by querying two tables in the docset index:</p>

<ul>
<li>ZHEADER, which contains paths to header files, along with the name of the framework each header file belongs to. NSString.h belongs to the Foundation framework, NSView.h belongs to the AppKit framework, and so on.</li>
<li>ZTOKENMETAINFORMATION, which contains information about each API symbol, including a foreign key to ZHEADER.</li>
</ul>

<p>(By the way, the docset index is actually a Core Data database. Normally one shouldn&#039;t access Core Data&#039;s underlying tables directly, but AppKiDo&#039;s access is read-only so there&#039;s no risk of corrupting the database, and SQL queries were simpler to implement than reverse-engineering the managed object model. Also, the docset index is relatively static, although that&#039;s a topic for another discussion.)</p>

<p>Now here&#039;s the thing. For some symbols, ZTOKENMETAINFORMATION is missing the foreign key to ZHEADER. This means you can&#039;t tell purely by querying the database which header file those symbols are declared in or which framework they belong to.</p>

<p>As far as I can tell, this is simply a bug in the docset. I suspect if I studied up on <a href="https://developer.apple.com/library/mac/#documentation/DeveloperTools/Conceptual/Documentation_Sets/000-Introduction/introduction.html" target="_blank">how docsets get created</a> (which I should really do someday) I&#039;d have some idea why the bug is there. In any case, it&#039;s there, and when I get a chance to write it up in more detail I&#039;ll submit a Radar.</p>

<p>If you have Xcode 4, and if Apple hasn&#039;t fixed the docset by the time you read this, you can see an example of this. In an iOS project, type &#034;NSFetchedResultsControllerDelegate&#034; and Option-click on it. You&#039;ll see that the Quick Help popup is missing the &#034;Declared In&#034; line that appears for most other symbols.</p>

<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.notesfromandy.com/wp-content/uploads/2012/02/MissingDeclaredIn.png" alt="Missing the "Declared In" line." title="MissingDeclaredIn.png" border="0" width="416" height="243" /></p>

<p>Compare this to the Quick Help popup for NSString:</p>

<p><img style="display:block; margin-left:auto; margin-right:auto;" src="http://www.notesfromandy.com/wp-content/uploads/2012/02/ShowingDeclaredIn.png" alt="Showing the "Declared In" line." title="ShowingDeclaredIn.png" border="0" width="405" height="289" /></p>

<p>Because AppKiDo (or, for iOS docs, AppKiDo-for-iPhone) can&#039;t tell what framework the affected symbols belong to, it never loads the documentation for those symbols.</p>

<p>My workaround was to add a second query that assumes the path to a symbol&#039;s HTML file contains the name of its framework. This is not always true, but it&#039;s true often enough for AppKiDo to figure out that NSFetchedResultsControllerDelegate belongs to Core Data.</p>

<p>Doing the second query means AppKiDo takes a bit longer to start up, which you may or may not be able to tell given how long startup is already. You probably wouldn&#039;t notice except that the query contains a LIKE clause, which makes it relatively slow.</p>

<p>For more gory details, you can see the relevant <a href="https://github.com/aglee/appkido/commit/e7e26ce4769f737e5c8b3f0d3a4bd092e9879448" target="_blank">commit</a> on GitHub.</p>

<p>So now you know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2012/02/09/docsets-can-have-bugs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>&quot;Winning&quot; personality does not mean what some people think it means</title>
		<link>http://www.notesfromandy.com/2011/11/29/winning-personality-does-not-mean-what-some-people-think-it-means/</link>
		<comments>http://www.notesfromandy.com/2011/11/29/winning-personality-does-not-mean-what-some-people-think-it-means/#comments</comments>
		<pubDate>Tue, 29 Nov 2011 13:21:06 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=960</guid>
		<description><![CDATA[A Facebook friend linked to this article by Tom McNichol: With the death and canonization of Steve Jobs and the emergence of the Jobs biography as a kind of sacred text for managers, the ranks of bosses who see Bad &#8230; <a href="http://www.notesfromandy.com/2011/11/29/winning-personality-does-not-mean-what-some-people-think-it-means/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>A Facebook friend linked to <a target="_blank" href="http://www.theatlantic.com/business/archive/2011/11/be-a-jerk-the-worst-business-lesson-from-the-steve-jobs-biography/249136/">this article</a> by Tom McNichol:</p>

<blockquote>
  <p>With the death and canonization of Steve Jobs and the emergence of the Jobs biography as a kind of sacred text for managers, the ranks of bosses who see Bad Steve&#039;s nastier traits as something to imitate is liable to swell.</p>
</blockquote>

<p>Of the many, many documented things Jobs did while bringing Apple to where it is today, are there really managers out there picking the worst parts of his personality and deciding <strong>that&#039;s</strong> what to emulate? Or for that matter using Isaacson&#039;s bio as a &#034;sacred text&#034;? I haven&#039;t seen or heard of this management trend, but I haven&#039;t been around a lot of managers lately.</p>

<p>It&#039;s been pointed out that most of Apple&#039;s historic turnaround, including the iPod, iPhone, and iPad, happened while Jobs was sick. So I guess managers who want to emulate him should try to get cancer. You know, like those jazz musicians who thought if they shot heroin they&#039;d play like Charlie Parker.</p>

<p>Speaking of drugs, Jobs supposedly said that Bill Gates would have been better off if he&#039;d tried LSD in his youth. Why aren&#039;t managers following that advice? Or are they?</p>

<p>It&#039;s certainly possible there is a correlation between unpleasant personality traits and people who rise to the top in business. Let&#039;s just say such a correlation is not entirely implausible. That does not mean that by going out of your way to hurt people&#039;s feelings you will become a more successful manager or executive.</p>

<p>Here&#039;s Guy Kawasaki on the things he learned from Steve Jobs:</p>

<iframe width="420" height="315" src="http://www.youtube.com/embed/DR_wX0EwOMM" frameborder="0" allowfullscreen></iframe>

<p>Notice that &#034;be a jerk&#034; is not on the list, which Guy has also written up in various places including <a target="_blank" href="https://plus.google.com/112374836634096795698/posts/8cfpr9k5v6t">Google+</a>.</p>

<p>By the way, Guy gave an excellent version of this talk at MacTech Conference. MacTech will be making it <a target="_blank" href="http://mactech.com/conference/videostore">available</a> for free &#8212; soon, I hope.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2011/11/29/winning-personality-does-not-mean-what-some-people-think-it-means/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 0.949 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-05-18 15:06:27 -->

