<?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, 24 May 2013 00:48:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>What two minutes is and isn&#039;t</title>
		<link>http://www.notesfromandy.com/2013/05/23/what-two-minutes-is-and-isnt/</link>
		<comments>http://www.notesfromandy.com/2013/05/23/what-two-minutes-is-and-isnt/#comments</comments>
		<pubDate>Fri, 24 May 2013 00:48:14 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1390</guid>
		<description><![CDATA[We shouldn&#039;t read too much into the fact that WWDC sold out in under two minutes this year. In fact, we should get away from caring at all how fast it sells out. At first glance, Apple seems to have &#8230; <a href="http://www.notesfromandy.com/2013/05/23/what-two-minutes-is-and-isnt/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>We shouldn&#039;t read too much into the fact that WWDC sold out in under two minutes this year. In fact, we should get away from caring at all how fast it sells out.</p>

<p>At first glance, Apple seems to have set an impressive record <a href="http://thenextweb.com/apple/2013/04/25/apples-wwdc-conference-sells-out-in-minutes/" target="_blank">compared to previous years</a>:</p>

<blockquote>
  <ul>
  <li>2008 – 2 months</li>
  <li>2009 – 1 month</li>
  <li>2010 – 8 days</li>
  <li>2011 – 10 hours</li>
  <li>2012 – 2 hours</li>
  <li>2013 – 2 minutes</li>
  </ul>
</blockquote>

<p>What&#039;s different this year, however, is that availability was announced 24 hours in advance.  Everybody knew exactly when to be at their computers with their fingers poised over their keyboards. The moment tickets went on sale, many thousands of people around the world hit Apple&#039;s web site at the same time &#8212; many more than the number of available tickets.</p>

<p>This means the two-minute sellout time tells us nothing about customer interest or demand.  It only tells us how fast Apple&#039;s servers were at taking orders.  And even that&#039;s not quite true; it&#039;s not clear how many, but Apple had to call some people on the phone to complete orders that the servers had messed up.  You could argue that WWDC didn&#039;t really sell out until every one of those people got their ticket &#8212; and again, that revised time interval wouldn&#039;t reflect on the level of demand, only on the efficiency of the order-taking mechanism.</p>

<p>How fast would WWDC have sold out if the servers had worked flawlessly?  Not only don&#039;t we know; we shouldn&#039;t care.  We&#039;re beyond bragging rights about who can put up the &#034;sold out&#034; sign faster, or whether we were faster this year than last.  Everybody knows that WWDC, like Google I/O, has way more demand than supply, and it doesn&#039;t seem that&#039;ll change soon.</p>

<p>There have been suggestions to prioritize customers by some measure of merit, like old-timers first or newcomers first, but I don&#039;t agree.  Or rather, I mostly don&#039;t.  John Siracusa <a href="http://hypercritical.co/2013/04/26/the-lottery" target="_blank">writes</a> about a time when rushing to buy a ticket actually made a difference:</p>

<blockquote>
  <p>I wanted to preserve at least some aspect of the process that rewarded the most enthusiastic Apple fans: the people who are willing to be roused from bed at 2 a.m. and rush to their computers to buy tickets; the <a href="http://www.youtube.com/watch?v=dX9GTUMh490" target="_blank">crazy ones</a>; the people who just want it more.</p>
</blockquote>

<p>I too would love to see this aspect preserved; I am, after all, one of the crazy ones.  But Siracusa goes on to say that we&#039;re beyond that now, and I agree with that.</p>

<p>Things being as they are, I think every interested customer should get an equal chance at a ticket.  I agree with Siracusa that a lottery, which would <em>slow down</em> the ticket-buying process, is the best way to accomplish this.  What Apple should focus on is not speed, but selling its limited number of tickets in an orderly, reliable way with a minimum of stress for its customers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/05/23/what-two-minutes-is-and-isnt/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Idea for a pronounced improvement</title>
		<link>http://www.notesfromandy.com/2013/04/23/idea-for-a-pronounced-improvement/</link>
		<comments>http://www.notesfromandy.com/2013/04/23/idea-for-a-pronounced-improvement/#comments</comments>
		<pubDate>Tue, 23 Apr 2013 14:17:24 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1383</guid>
		<description><![CDATA[A friend wrote on Facebook: As a basic sign of respect for Lu Lingzi, the BU student killed in last week&#039;s bombing, can the NPR folks at least take five seconds to learn how to pronounce her name correctly? I&#039;ve &#8230; <a href="http://www.notesfromandy.com/2013/04/23/idea-for-a-pronounced-improvement/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>A friend wrote on Facebook:</p>

<blockquote>
  <p>As a basic sign of respect for Lu Lingzi, the BU student killed in last week&#039;s bombing, can the NPR folks at least take five seconds to learn how to pronounce her name correctly?</p>
</blockquote>

<p>I&#039;ve wished before for a class that would teach how to pronounce various languages. The idea is similar to those crash courses for tourists visiting foreign countries, but the focus would be on pronunciation, with vocabulary only as a happy side effect.</p>

<p>It could be done a lot of ways. It could be taught in grade school; it could be an adult education thing; it could be an app or family of apps; it could be a blog or tweet stream or a daily column in the newspaper or a YouTube channel.</p>

<p>It might help to have multiple teachers who specialize in different languages. Teaching could focus on just Romanized forms or, for the ambitious, it could include how to read non-Roman alphabets like Cyrillic and Korean.</p>

<p>I would benefit from such a class. At Thai and Vietnamese restaurants I&#039;m sometimes uncomfortable ordering things from the menu that I&#039;m not sure how to pronounce. One of these days I should put in the effort to learn.</p>

<p>Mandarin romanizes in a pretty straightforward way that I&#039;m sure most people could learn, especially if we set aside the tones. It would help if reporters would pronounce things right, which they could do on a case-by-case basis with just a minute of coaching. For starters, they could pronounce &#034;Beijing&#034; with the &#034;j&#034; in &#034;jingle bells&#034; rather than the &#034;zh&#034; in &#034;Doctor Zhivago&#034;.</p>

<p>Come to think of it, I&#039;m not positive I pronounce &#034;Zhivago&#034; correctly.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/04/23/idea-for-a-pronounced-improvement/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Faking &quot;switch&quot; with an object value</title>
		<link>http://www.notesfromandy.com/2013/04/07/faking-switch-with-an-object-value/</link>
		<comments>http://www.notesfromandy.com/2013/04/07/faking-switch-with-an-object-value/#comments</comments>
		<pubDate>Sun, 07 Apr 2013 23:03:13 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[CocoaProgramming]]></category>
		<category><![CDATA[StupidCodeTricks]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1361</guid>
		<description><![CDATA[Jeff Kelley started a thread on the objc-language mailing list with this idea: I would love to see a switch statement we could use for objects, testing equality with each case: statement. @switch would work nicely as the name, and &#8230; <a href="http://www.notesfromandy.com/2013/04/07/faking-switch-with-an-object-value/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Jeff Kelley started a <a href="http://lists.apple.com/archives/objc-language/2013/Apr/threads.html#00000" target="_blank">thread</a> on the objc-language mailing list with <a href="http://lists.apple.com/archives/objc-language/2013/Apr/msg00000.html" target="_blank">this idea</a>:</p>

<blockquote>I would love to see a switch statement we could use for objects, testing equality with each case: statement. @switch would work nicely as the name, and I envision it working like this:


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">@<span style="color: #a61390;">switch</span><span style="color: #002200;">&#40;</span>myString<span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span>
    <span style="color: #a61390;">case</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;hello world&quot;</span><span style="color: #002200;">:</span>
        <span style="color: #11740a; font-style: italic;">// Do something</span>
        <span style="color: #a61390;">break</span>;
    <span style="color: #a61390;">case</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;another one&quot;</span><span style="color: #002200;">:</span>
        <span style="color: #a61390;">break</span>;
<span style="color: #002200;">&#125;</span></pre></td></tr></table></div>




This would be equivalent to writing the code using if statements and sending -isEqual: messages, but with a much more readable control flow.
</blockquote>

<p></p>

<h2>The blocks approach</h2>

<p>One suggested approach was to use a dictionary to map each &#034;case&#034; value to a block that should be executed when the &#034;case&#034; value matches the &#034;switch&#034; value. Jeff Biggus posted <a href="http://lists.apple.com/archives/objc-language/2013/Apr/msg00023.html" target="_blank">this solution</a> mainly as an academic exercise, but I think it&#039;s about as tidy as the blocks-based approach gets:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">typedef</span> <span style="color: #a61390;">void</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">^</span>voidBlock<span style="color: #002200;">&#41;</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">void</span><span style="color: #002200;">&#41;</span>;
&nbsp;
<span style="color: #6e371a;">#define swoosh( test_var__, action_dictionary__... ) \</span>
        <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>voidBlock<span style="color: #002200;">&#41;</span>action_dictionary__<span style="color: #002200;">&#91;</span>test_var__<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#40;</span><span style="color: #002200;">&#41;</span>;
&nbsp;
<span style="color: #002200;">&#91;</span>...<span style="color: #002200;">&#93;</span>
&nbsp;
<span style="color: #400080;">NSString</span> <span style="color: #002200;">*</span>test <span style="color: #002200;">=</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;that&quot;</span>;
swoosh<span style="color: #002200;">&#40;</span> test, @<span style="color: #002200;">&#123;</span>
        <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;this&quot;</span> <span style="color: #002200;">:</span> <span style="color: #002200;">^</span><span style="color: #002200;">&#123;</span> NSLog<span style="color: #002200;">&#40;</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;found this&quot;</span> <span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span>,
        <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;that&quot;</span> <span style="color: #002200;">:</span> <span style="color: #002200;">^</span><span style="color: #002200;">&#123;</span> NSLog<span style="color: #002200;">&#40;</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;found that&quot;</span> <span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span>,
<span style="color: #002200;">&#125;</span><span style="color: #002200;">&#41;</span>;</pre></td></tr></table></div>


<p>Nicolas Bouilleaud posted an <a href="http://lists.apple.com/archives/objc-language/2013/Apr/msg00075.html" target="_blank">alternative solution</a> using +resolveInstanceMethod: that allows you to write:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #002200;">&#91;</span><span style="color: #002200;">&#91;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;foo&quot;</span> <span style="color: #a61390;">switch</span><span style="color: #002200;">&#93;</span>
 <span style="color: #a61390;">case</span><span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;bar&quot;</span> <span style="color: #002200;">:^</span><span style="color: #002200;">&#123;</span> success <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>; <span style="color: #002200;">&#125;</span>
 <span style="color: #a61390;">case</span><span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;baz&quot;</span> <span style="color: #002200;">:^</span><span style="color: #002200;">&#123;</span> success <span style="color: #002200;">=</span> <span style="color: #a61390;">NO</span>; <span style="color: #002200;">&#125;</span>
 <span style="color: #a61390;">case</span><span style="color: #002200;">:</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;foo&quot;</span> <span style="color: #002200;">:^</span><span style="color: #002200;">&#123;</span> success <span style="color: #002200;">=</span> <span style="color: #a61390;">YES</span>; <span style="color: #002200;">&#125;</span>
 <span style="color: #002200;">&#93;</span>;</pre></td></tr></table></div>


<p>I&#039;m not crazy about using blocks for a few reasons:</p>

<ul>
<li>You have to think about whether you need to use __block variables.</li>
<li>You can&#039;t put break, continue, or return statements in the blocks and have them work as they would in an analogous switch statement; often their very presence would be a syntax error.</li>
<li>If you use a dictionary of blocks, the &#034;case&#034; objects have to conform to NSCopying so that they can be dictionary keys. Also, as Nicolas points out, if you use a dictionary, you can&#039;t specify the order in which the cases are tested. So, no dictionaries; but you can imagine a similar approach using an array.</li>
<li>Xcode&#039;s auto-indenting of blocks looks really, really horrible. In theory, the typographical quirks of an IDE have nothing to do with the soundness of a technical approach, but Xcode is so bad about this that I can&#039;t ignore it. For example, if I put the first NSLog above on its own line, Xcode does this:</li>
</ul>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">swoosh<span style="color: #002200;">&#40;</span> test, @<span style="color: #002200;">&#123;</span>
       <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;this&quot;</span> <span style="color: #002200;">:</span> <span style="color: #002200;">^</span><span style="color: #002200;">&#123;</span>
    NSLog<span style="color: #002200;">&#40;</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;found this&quot;</span> <span style="color: #002200;">&#41;</span>;
<span style="color: #002200;">&#125;</span>,
       <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;that&quot;</span> <span style="color: #002200;">:</span> <span style="color: #002200;">^</span><span style="color: #002200;">&#123;</span> NSLog<span style="color: #002200;">&#40;</span> <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;found that&quot;</span> <span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span>,
       <span style="color: #002200;">&#125;</span><span style="color: #002200;">&#41;</span>;</pre></td></tr></table></div>


<h2>objswitch, objcase, endswitch</h2>

<p>I don&#039;t know how original this is, but by using a few macros and a small class used behind the scenes, I came up with a different approach that is essentially syntactic sugar around nested else-if statements. Here&#039;s an example of how it looks, as formatted by Xcode:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">objswitch<span style="color: #002200;">&#40;</span>someObject<span style="color: #002200;">&#41;</span>
objcase<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;one&quot;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// Nesting works.</span>
    objswitch<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;b&quot;</span><span style="color: #002200;">&#41;</span>
    objcase<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;a&quot;</span><span style="color: #002200;">&#41;</span> <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;one/a&quot;</span><span style="color: #002200;">&#41;</span>;
    objcase<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;b&quot;</span><span style="color: #002200;">&#41;</span> <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;one/b&quot;</span><span style="color: #002200;">&#41;</span>;
    endswitch
&nbsp;
    <span style="color: #11740a; font-style: italic;">// Any code can go here, including break/continue/return.</span>
    <span style="color: #11740a; font-style: italic;">// Xcode will indent it nicely.</span>
<span style="color: #002200;">&#125;</span>
objcase<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;two&quot;</span><span style="color: #002200;">&#41;</span> <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;It's TWO.&quot;</span><span style="color: #002200;">&#41;</span>;  <span style="color: #11740a; font-style: italic;">// Can omit braces.</span>
objcase<span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;three&quot;</span>,  <span style="color: #11740a; font-style: italic;">// Can have multiple values in one case.</span>
        <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;tres&quot;</span>,
        <span style="color: #bf1d1a;">@</span><span style="color: #bf1d1a;">&quot;trois&quot;</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span> <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;It's a THREE.&quot;</span><span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span>
defaultcase <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;None of the above.&quot;</span><span style="color: #002200;">&#41;</span>;  <span style="color: #11740a; font-style: italic;">// Default case is optional.</span>
endswitch</pre></td></tr></table></div>


<p>I would argue this is even a tiny bit nicer than switch/case syntax, because you don&#039;t need unsightly break statements to keep the cases from bleeding into each other.</p>

<p>If someObject is @&#034;one&#034;, the output is</p>

<pre>
oneb
</pre>

<p>If someObject is @&#034;tres&#034;, the output is</p>

<pre>
It's a THREE.
</pre>

<p>In this example all the &#034;case&#034; values are strings, but they can be any object.</p>

<p>The &#034;keywords&#034; objswitch, objcase, objkind, and endswitch are actually macros. There is a simple class called ObjectMatcher that is instantiated by objswitch. You can see the code on <a href="https://github.com/aglee/ObjectMatcher" target="_blank">GitHub</a>.</p>

<h2>objkind</h2>

<p>Some people mentioned wanting similar syntax for testing the class of the object rather than its value. Testing an object&#039;s class is often a sign of suboptimal design (see <a href="http://stackoverflow.com/questions/11510337/objective-c-checking-class-type-better-to-use-iskindofclass-or-respondstosele" target="_blank">here</a> for a brief discussion, <a href="/2013/03/05/what-is-it-vs-what-does-it-do-vs-just-do-it/" target="_blank">here</a> for my thoughts on the matter), but for those occasions when you decide it&#039;s the right approach, you can use my objkind macro:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">objswitch<span style="color: #002200;">&#40;</span>someObject<span style="color: #002200;">&#41;</span>
objkind<span style="color: #002200;">&#40;</span><span style="color: #400080;">NSNumber</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span> <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;It's a NUMBER.&quot;</span><span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span>
objkind<span style="color: #002200;">&#40;</span><span style="color: #400080;">NSString</span><span style="color: #002200;">&#41;</span> <span style="color: #002200;">&#123;</span> <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;It's a STRING.&quot;</span><span style="color: #002200;">&#41;</span>; <span style="color: #002200;">&#125;</span>
objkind<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSArray</span> class<span style="color: #002200;">&#93;</span>,
        <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDictionary</span> class<span style="color: #002200;">&#93;</span>,
        <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSSet</span> class<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span> <span style="color: #a61390;">printf</span><span style="color: #002200;">&#40;</span><span style="color: #bf1d1a;">&quot;It's a collection.&quot;</span><span style="color: #002200;">&#41;</span>;
endswitch</pre></td></tr></table></div>


<p>Note that if you&#039;re only passing one class name to objkind, you can just give the class name:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">objkind<span style="color: #002200;">&#40;</span><span style="color: #400080;">NSNumber</span><span style="color: #002200;">&#41;</span></pre></td></tr></table></div>


<p>But if you pass multiple classes, you have to say [MyClass class] or [MyClass self] (or, if you prefer, MyClass.class or MyClass.self) for every item after the first one. This is a limitation of <code>__VA_ARGS__</code> macros. I prefer all the items to look the same &#8212; hence:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">objkind<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSArray</span> class<span style="color: #002200;">&#93;</span>,
        <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSDictionary</span> class<span style="color: #002200;">&#93;</span>,
        <span style="color: #002200;">&#91;</span><span style="color: #400080;">NSSet</span> class<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span></pre></td></tr></table></div>


<p>Like objcase, objkind is just a wrapper around a nested else-if statement, so you can freely mix objcase and objkind within the same objswitch.</p>

<h2>selswitch, selcase</h2>

<p>One place I <em>might</em> like a similar construct is for doing a switch statement on a selector. I have validateUserInterfaceItem: methods all over the place with lots of nested if-statements like this:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">SEL</span> itemAction <span style="color: #002200;">=</span> <span style="color: #002200;">&#91;</span>anItem action<span style="color: #002200;">&#93;</span>;
&nbsp;
<span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>itemAction <span style="color: #002200;">==</span> <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectSuperclass<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// ...</span>
<span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">else</span> <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span>itemAction <span style="color: #002200;">==</span> <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectAncestorClass<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// ...</span>
<span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">else</span> <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#40;</span>itemAction <span style="color: #002200;">==</span> <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectFormalProtocolsTopic<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
         || <span style="color: #002200;">&#40;</span>itemAction <span style="color: #002200;">==</span> <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectInformalProtocolsTopic<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
         || <span style="color: #002200;">&#40;</span>itemAction <span style="color: #002200;">==</span> <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectFunctionsTopic<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// ...</span>
<span style="color: #002200;">&#125;</span></pre></td></tr></table></div>


<p>I created selswitch and selcase macros that let you do this:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">selswitch<span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>anItem action<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span>
selcase<span style="color: #002200;">&#40;</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectSuperclass<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// ...</span>
<span style="color: #002200;">&#125;</span>
selcase<span style="color: #002200;">&#40;</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectAncestorClass<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// ...</span>
<span style="color: #002200;">&#125;</span>
selcase<span style="color: #002200;">&#40;</span><span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectFormalProtocolsTopic<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span>,
        <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectInformalProtocolsTopic<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span>,
        <span style="color: #a61390;">@selector</span><span style="color: #002200;">&#40;</span>selectFunctionsTopic<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#41;</span>
<span style="color: #002200;">&#123;</span>
    <span style="color: #11740a; font-style: italic;">// ...</span>
<span style="color: #002200;">&#125;</span>
endswitch</pre></td></tr></table></div>


<p>I haven&#039;t decided whether the improvement is big enough that I&#039;d use this rather than plain old nested ifs, especially since validateUserInterfaceItem: is called very frequently and should be as fast as possible.</p>

<p>[<strong>UPDATE:</strong> I've made several edits since I first published this post, ranging from fixing typos to inserting a sentence or two. I was originally flagging each change, but to reduce clutter I decided just to add this mention at the bottom.]</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/04/07/faking-switch-with-an-object-value/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Writing a .service bundle</title>
		<link>http://www.notesfromandy.com/2013/04/05/writing-a-service-bundle/</link>
		<comments>http://www.notesfromandy.com/2013/04/05/writing-a-service-bundle/#comments</comments>
		<pubDate>Fri, 05 Apr 2013 15:33:27 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[CocoaProgramming]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1356</guid>
		<description><![CDATA[You can provide system services (items that appear in the Services menu) in two ways: through an application (YourApp.app) or through a standalone service (YourService.service). The first way is well documented, but I&#039;ve found it hard to find instructions for &#8230; <a href="http://www.notesfromandy.com/2013/04/05/writing-a-service-bundle/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>You can provide system services (items that appear in the Services menu) in two ways: through an application (YourApp.app) or through a standalone service (YourService.service). The first way is well documented, but I&#039;ve found it hard to find instructions for the second way.</p>

<h2>The first way: a regular .app</h2>

<p>Your Cocoa application can provide services that appear in the Services menu. Apple&#039;s &#034;<a href="http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/SysServices/introduction.html#//apple_ref/doc/uid/10000101-SW1" target="_blank">Services Implementation Guide</a>&#034; explains how to do this. Basically:</p>

<ul>
<li>Create a class (or use an existing class) with one method for each service. Each service receives input and optionally returns output by way of NSPasteboard.</li>
<li>Add an &#034;NSServices&#034; key to Info.plist with info about each service.</li>
<li>At some point during application startup, call NSRegisterServicesProvider().</li>
</ul>

<p>Put the application in /Applications, or a subfolder thereof, to get the system to detect the new service(s).</p>

<p>When an application service is invoked, the application becomes active. There seems to be no way to avoid this. At best you can immediately hide the application, but there will still be a flicker as windows appear and disappear.</p>

<p><strong>UPDATE:</strong> Mark Munz <a href="http://www.cocoabuilder.com/archive/cocoa/327157-providing-service-without-activating-an-app.html#327225" target="_blank">offered this tip</a> on the cocoa-dev mailing list:</p>

<blockquote>
  <p>[T]he solution I used to prevent Services from bringing the app forward is to have a background (LSUIElement) helper app that acts as the NSServices provider. Depending on what you need to do, you could either support the service directly in the helper app or use it to talk to the parent app to perform the necessary work (without requiring it to activate). I use the second approach.</p>
</blockquote>

<h2>The second way: a .service bundle</h2>

<p>If you want a service that is purely a background operation, you can  create a standalone service that has no UI. It&#039;s very simple once you know how, but I haven&#039;t found a lot of help online, although some books discuss it and you can find examples on GitHub by searching for NSRegisterServicesProvider.</p>

<p>I expected a &#034;System Service&#034; template in Xcode, but there is none. Instead, you use a &#034;Cocoa Application&#034; project and code it just like a regular application with services except:</p>

<ul>
<li>Change the target&#039;s wrapper extension from &#034;app&#034; to &#034;service&#034;: Project > Target > Build Settings > Wrapper Extension.</li>
<li>Make it a background application by adding to Info.plist: LSUIElement = YES. (This is the &#034;Application is background only&#034; item in the popup menu that appears in Xcode&#039;s plist editor.)</li>
<li>Remove resources you won&#039;t need, like MainMenu.xib, AppDelegate, and Credits.rtf.</li>
<li>Edit main.m to instantiate the service-provider object and enter a run loop. <a href="https://github.com/aglee/copyselector/blob/master/CopySelector/main.m" target="_blank">Here&#039;s an example.</a></li>
</ul>

<p>Build the project and copy YourService.service to ~/Library/Services. You may have to relaunch apps to get them to see the service.</p>

<h2>Tips</h2>

<ul>
<li><p>Instead of editing Info.plist to add the NSServices entries, you might prefer to use Xcode&#039;s UI. I don&#039;t know when this was added to Xcode, but you can go to Project > Target > Info and there&#039;s a &#034;Services&#034; area at the bottom. It&#039;s easy to miss if you don&#039;t know it&#039;s there.</p></li>
<li><p>To uninstall the service, remove YourService.service from ~/Library/Services. You won&#039;t be able to delete it if the service has a running process, so you might have to kill the process first.</p></li>
<li><p>If the service doesn&#039;t appear in the Services menu, you may have to force the menu to be reconstructed. Unfortunately there&#039;s no command you can call from the command line. It&#039;s trival to write one though &#8212; all it has to do is call NSUpdateDynamicServices().</p></li>
</ul>

<h2>See also</h2>

<p>As I mentioned, Apple&#039;s &#034;<a href="http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/SysServices/introduction.html#//apple_ref/doc/uid/10000101-SW1" target="_blank">Services Implementation Guide</a>&#034; has plenty of detail on writing application services, but as far as I can tell the only help it gives on standalone services is this one line:</p>

<pre><code>&gt; To build a standalone service, use the extension .service and store it in Library/Services.
</code></pre>

<p>The breakthrough that got me going was when I found example code on the <a href="http://blog.timac.org/?tag=nsservice" target="_blank">Timac blog</a>. I already had implemented a service in an application. By looking at Timac&#039;s code and doing monkey-see-monkey-do, I got my first standalone service working.</p>

<p>I then realized I could find plenty more examples by <a href="https://github.com/search?q=NSRegisterServicesProvider&#038;ref=commandbar&#038;type=Code" target="_blank">searching GitHub</a> for &#034;NSRegisterServicesProvider&#034;.</p>

<p><a href="https://github.com/aglee/copyselector" target="_blank">Here&#039;s</a> the service I wrote. It copies method names to the clipboard so you can paste them in emails, code comments, docs, and so forth.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/04/05/writing-a-service-bundle/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>&quot;What is it&quot; vs. &quot;What does it do&quot; vs. &quot;Just do it&quot;</title>
		<link>http://www.notesfromandy.com/2013/03/05/what-is-it-vs-what-does-it-do-vs-just-do-it/</link>
		<comments>http://www.notesfromandy.com/2013/03/05/what-is-it-vs-what-does-it-do-vs-just-do-it/#comments</comments>
		<pubDate>Tue, 05 Mar 2013 15:53:05 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1346</guid>
		<description><![CDATA[On the Objective-C mailing list, Patrick Collins asked the following: I am wondering, what is the difference between testing if an instance responds to a method, and checking the kind of class it is? I mean, I understand that if &#8230; <a href="http://www.notesfromandy.com/2013/03/05/what-is-it-vs-what-does-it-do-vs-just-do-it/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>On the Objective-C mailing list, Patrick Collins <a href="http://lists.apple.com/archives/objc-language/2013/Mar/msg00075.html">asked the following</a>:</p>

<blockquote>
<p>I am wondering, what is the difference between testing if an instance
responds to a method, and checking the kind of class it is?</p>

<p>I mean, I understand that if you had 10 classes that all have a method,
and one that doesn&#039;t, it&#039;s easier to just do [myClass
respondsToSelector:@selector(foo)], rather than doing [myClass
isKindOfClass:[Thing1ThatHasMethod class]] || [myClass
isKindOfClass:[Thing2ThatHasMethod class]] || &#8230;etc</p>

<p>But, I have a situation where an NSDictionary is holding an object that
is either an NSNumber or an NSArray of NSNumbers..  And I wondered
which of these is the best way to go?</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">  <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>item isKindOfClass<span style="color: #002200;">:</span><span style="color: #002200;">&#91;</span><span style="color: #400080;">NSArray</span> class<span style="color: #002200;">&#93;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span></pre></td></tr></table></div>




<p>vs.</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;">  <span style="color: #a61390;">if</span> <span style="color: #002200;">&#40;</span><span style="color: #002200;">&#91;</span>item respondsToSelector@selector<span style="color: #002200;">&#40;</span>objectAtIndex<span style="color: #002200;">:</span><span style="color: #002200;">&#41;</span><span style="color: #002200;">&#93;</span><span style="color: #002200;">&#41;</span></pre></td></tr></table></div>




<p>?</p>
</blockquote>

<p>Here&#039;s my personal roundup of how I use the approaches that were discussed in response to Patrick&#039;s question.</p>

<h3>isKindOfClass:</h3>

<p>I would use isKindOfClass: for the situation Patrick (the OP) described. You already have specific expectations that the dictionary entry will be either a number or an array (assuming your data isn&#039;t corrupted). You want to know which it is, so you ask it. To me, this maps most closely to my mental model of the situation.</p>

<p>One scenario where I&#039;ve used isKindOfClass: is when getting values from NSUserDefaults. I may have changed the app from allowing just one value for a user preference to multiple values, so I could reasonably expect to get either an NSNumber or an NSArray.</p>

<h3>respondsToSelector:</h3>

<p>I typically use respondsToSelector: in these scenarios:</p>

<ol>
<li><p>I&#039;m deciding whether to send a particular delegate message to my delegate, and there&#039;s no hint in the declaration of the delegate that lets me assume it implements the method. For example, the delegate might be declared as a plain id, so I have no idea at all what it implements. Or it might be declared as conforming to a delegate protocol, but that particular method might be @optional. Note that I&#039;m in this scenario when I&#039;m creating the class that does the delegating &#8212; that&#039;s the class that has to decide whether to send the message.</p></li>
<li><p>Occasionally in an action method I&#039;ll sanity-check the &#034;sender&#034; argument. I may be expecting the sender to respond to -representedObject (and not caring whether it&#039;s because it&#039;s an NSMenuItem or an NSButtonCell or whatever), so I check for that.</p></li>
<li><p>Occasionally I do something similar to the responder chain where I look for an object on some chain that responds to the message, and if I find one, I send the message.</p></li>
</ol>

<p>In all these scenarios the question is &#034;I have this message I might want to send, and I want to know whether and to what object I should send it.&#034;</p>

<h3>conformsToProtocol:</h3>

<p>I don&#039;t think I&#039;ve ever used conformsToProtocol:. I don&#039;t have a cogent explanation for why not. It&#039;s just never seemed to be the real question I wanted to ask.</p>

<h3>Category methods</h3>

<p>By adding category methods, you can let the inheritance mechanism do the &#034;if this kind of object, then do that&#034;, which is after all what it&#039;s designed for. Ondra Čada <a href="http://lists.apple.com/archives/objc-language/2013/Mar/msg00077.html">gave an example</a>:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@interface</span> <span style="color: #400080;">NSObject</span> <span style="color: #002200;">&#40;</span>MySum<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>mySum;
<span style="color: #a61390;">@end</span>
...
<span style="color: #a61390;">@implementation</span> <span style="color: #400080;">NSNumber</span> <span style="color: #002200;">&#40;</span>MySum<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>mySum <span style="color: #002200;">&#123;</span> <span style="color: #a61390;">return</span> self.intValue; <span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span>
<span style="color: #a61390;">@implementation</span> <span style="color: #400080;">NSObject</span> <span style="color: #002200;">&#40;</span>MySum<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">-</span><span style="color: #002200;">&#40;</span><span style="color: #a61390;">int</span><span style="color: #002200;">&#41;</span>mySum <span style="color: #002200;">&#123;</span> <span style="color: #a61390;">int</span> s<span style="color: #002200;">=</span><span style="color: #2400d9;">0</span>; <span style="color: #a61390;">for</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">id</span> o <span style="color: #a61390;">in</span> self.objectEnumerator<span style="color: #002200;">&#41;</span> s<span style="color: #002200;">+=</span><span style="color: #002200;">&#91;</span>o mySum<span style="color: #002200;">&#93;</span>; <span style="color: #a61390;">return</span> s; <span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span></pre></td></tr></table></div>


<p>Mike Ash <a href="http://lists.apple.com/archives/objc-language/2013/Mar/msg00098.html">gave a variation</a> which is the logical equivalent of isKindOfClass: in this special case:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="objc" style="font-family:monospace;"><span style="color: #a61390;">@interface</span> <span style="color: #400080;">NSObject</span> <span style="color: #002200;">&#40;</span>FooChecking<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>ma_isFoo; <span style="color: #11740a; font-style: italic;">// prefixed to avoid conflict</span>
<span style="color: #a61390;">@end</span>
&nbsp;
<span style="color: #a61390;">@implementation</span> <span style="color: #400080;">NSObject</span> <span style="color: #002200;">&#40;</span>FooChecking<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>ma_isFoo <span style="color: #002200;">&#123;</span> <span style="color: #a61390;">return</span> <span style="color: #a61390;">NO</span>; <span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span>
<span style="color: #a61390;">@implementation</span> Foo <span style="color: #002200;">&#40;</span>FooChecking<span style="color: #002200;">&#41;</span>
<span style="color: #002200;">-</span> <span style="color: #002200;">&#40;</span><span style="color: #a61390;">BOOL</span><span style="color: #002200;">&#41;</span>ma_isFoo <span style="color: #002200;">&#123;</span> <span style="color: #a61390;">return</span> <span style="color: #a61390;">YES</span>; <span style="color: #002200;">&#125;</span>
<span style="color: #a61390;">@end</span></pre></td></tr></table></div>


<p>Smalltalk takes a similar approach with methods like isNumber and isSymbol, which every Smalltalk object responds to.</p>

<p>I like the category approach and have used it on occasion, especially where (a) I&#039;m doing the check in a lot of places, and/or (b) I feel it expresses my question better. I am lazy enough that I&#039;ll just do an isKindOfClass: if it&#039;s only in one place.</p>

<p>Even with the isFoo approach you&#039;ll probably be casting to Foo* at some point, so you&#039;re still &#034;cheating&#034; in that you&#039;re using knowledge of an object&#039;s specific class.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/03/05/what-is-it-vs-what-does-it-do-vs-just-do-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The shi-shi-shi poem</title>
		<link>http://www.notesfromandy.com/2013/02/04/the-shi-shi-shi-poem/</link>
		<comments>http://www.notesfromandy.com/2013/02/04/the-shi-shi-shi-poem/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 16:37:31 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1334</guid>
		<description><![CDATA[Byron Han shared this article [1] by Jian Shuo Wang about a Chinese poem written in 1930 in which every word is &#034;shi&#034; [2]. Here&#039;s the text of the poem: 石室诗士施氏，嗜食狮，誓食十狮。适施氏时时适市视狮。十时，适十狮适市。是时，适施氏适市。氏视是十狮，恃矢势，使是十狮逝世。氏拾是十狮尸，适石室。石室湿，氏使侍拭石室。石室拭，氏始试食是十狮尸。食时，始识是十狮尸，实十石狮尸。试释是事。 I selected this text and told my Mac to &#8230; <a href="http://www.notesfromandy.com/2013/02/04/the-shi-shi-shi-poem/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Byron Han shared <a href="http://home.wangjianshuo.com/archives/20090607_shi_shi_shi_shi_-_chinese_pinyin.htm">this article</a> [1] by Jian Shuo Wang about a Chinese poem written in 1930 in which every word is &#034;shi&#034; [2].</p>

<p>Here&#039;s the text of the poem:</p>

<blockquote>
  <p>石室诗士施氏，嗜食狮，誓食十狮。适施氏时时适市视狮。十时，适十狮适市。是时，适施氏适市。氏视是十狮，恃矢势，使是十狮逝世。氏拾是十狮尸，适石室。石室湿，氏使侍拭石室。石室拭，氏始试食是十狮尸。食时，始识是十狮尸，实十石狮尸。试释是事。</p>
</blockquote>

<p>I selected this text and told my Mac to &#034;Start Speaking&#034;. For some reason in my System Preferences I had the &#034;Kyoko&#034; voice selected at the slowest speed, so it came out sounding like a drunk Japanese woman.</p>

<p>	<audio id="wp_mep_1"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2013/02/poem-japanese-slow.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2013/02/poem-japanese-slow.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_1').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
I changed to the &#034;Ting-Ting&#034; voice at normal speed and heard it in mainland Chinese as intended. Fun!</p>

<p>	<audio id="wp_mep_2"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2013/02/poem-chinese.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2013/02/poem-chinese.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_2').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
In Cantonese (the &#034;Sin-Ji&#034; voice) the words are not only different from Mandarin but much more different from each other than in Mandarin. In Cantonese most of the syllables are &#034;see&#034;, a few are &#034;sik&#034;, quite a few are different altogether. This did not surprise me.</p>

<p>	<audio id="wp_mep_3"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2013/02/poem-cantonese.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2013/02/poem-cantonese.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_3').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
What did surprise me was how it came out in the Taiwanese voice (&#034;Ya-Ling&#034;). I had thought mainland and Taiwanese Mandarin were pronounced the same word for word, with the only difference being a matter of accent, the way Minnesotans pronounce harder R&#039;s than Californians. But it turns out there are some words that are pronounced completely differently.</p>

<p>	<audio id="wp_mep_4"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2013/02/poem-taiwanese.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2013/02/poem-taiwanese.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_4').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
Wang gives a translation of the poem in his blog post. Rather than copy it here, I suggest you visit his blog at the link I gave. I like what Google Translate returns, especially the phrase &#034;relies on the vector potential&#034;:</p>

<blockquote>
  <p>The sarcophagus poetry Guests Amur, addicted to food lion, oath eat ten lions. Suitable Amur always suitable for the city, as the lion.Ten o&#039;clock, fitness, fitness ten lions. Yes, the appropriate Amur appropriate city. &#039;s Depending on those ten lions, relies on the vector potential, so that the death of ten lions. S pick the ten lions corpse, fitness sarcophagus. Shishi wet, that&#039;s so paternity swab sarcophagus. The sarcophagus the swab,&#039;s start tasting is ten lions corpse. Food before consensus is ten lions corpse, the real ten lions corpse. Interpreting things.</p>
</blockquote>

<p>I used the Mac&#039;s &#034;<code>say -o</code>&#034; command to generate the above audio files. The output was in AIFF format, which I converted to MP3 using an app called &#034;<a href="https://itunes.apple.com/us/app/music-converter/id468990728?mt=12">Music Converter</a>&#034;.</p>

<p>UPDATE 1: Edited to mention Jian Shuo Wang by name, and to mention that he offers his own translation of the poem.</p>

<p>UPDATE 2: It occurred to me that a person claiming to be a native Mandarin speaker could be tested by being made to read this poem aloud. In theory a real native speaker would have less trouble getting the tones right than a faker, making this poem &#8212; dare I say &#8212; a sort of &#034;shi-bboleth&#034;.</p>

<hr />

<p>[1] Actually Byron linked to an article on Shanghaiist.com, but I&#039;m linking here to the original article which it links to.</p>

<p>[2] Note that &#034;shi&#034; is not pronounced &#034;shee&#034; as you might think. It&#039;s more like the English word &#034;shirr&#034;. It amuses me that the word &#034;是&#034; by itself, which means &#034;Yes&#034; or &#034;Okay,&#034; sounds like &#034;Sure.&#034; It&#039;s an affirmative answer in two languages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/02/04/the-shi-shi-shi-poem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://notesfromandy.com/wp-content/uploads/2013/02/poem-japanese-slow.mp3" length="1426139" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2013/02/poem-chinese.mp3" length="917895" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2013/02/poem-cantonese.mp3" length="910374" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2013/02/poem-taiwanese.mp3" length="1156970" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2013/02/poem-japanese-slow.mp3" length="1426139" type="audio/mpeg" />
		</item>
		<item>
		<title>Minor fixes to Speech voices</title>
		<link>http://www.notesfromandy.com/2013/02/04/minor-fixes-to-speech-voices/</link>
		<comments>http://www.notesfromandy.com/2013/02/04/minor-fixes-to-speech-voices/#comments</comments>
		<pubDate>Mon, 04 Feb 2013 15:58:34 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1306</guid>
		<description><![CDATA[This is an update regarding my post about the international speech-to-text options on the Mac &#8212; specifically, about the text fragments they use for the &#034;speakers&#034; to introduce themselves. The text fragment used by the Cantonese Sin-Ji voice still contains &#8230; <a href="http://www.notesfromandy.com/2013/02/04/minor-fixes-to-speech-voices/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>This is an update regarding <a href="/2011/08/13/english-names-in-lions-voices/">my post</a> about the international speech-to-text options on the Mac &#8212; specifically, about the text fragments they use for the &#034;speakers&#034; to introduce themselves.</p>

<p>The text fragment used by the Cantonese Sin-Ji voice still contains the name &#034;Sin-Ji&#034; in Romanized form, but somehow when it&#039;s pronounced it sounds more like Cantonese than before.</p>

<p>Here&#039;s the text fragment that gets spoken:</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ plutil <span style="color: #660033;">-convert</span> xml1 <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Speech<span style="color: #000000; font-weight: bold;">/</span>Voices<span style="color: #000000; font-weight: bold;">/</span>Sin-Ji.SpeechVoice<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Info.plist  <span style="color: #660033;">-o</span> - <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-A</span> <span style="color: #000000;">1</span> VoiceDemoText
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>VoiceDemoText<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>您好，我叫 Sin-Ji。我講廣東話。<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>


<p>Here&#039;s how it used to sound:</p>

<p>	<audio id="wp_mep_5"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2011/08/Sin-Ji.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2011/08/Sin-Ji.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_5').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
Here&#039;s how it now sounds:</p>

<p>	<audio id="wp_mep_6"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2013/02/Sin-Ji.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2013/02/Sin-Ji.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_6').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
I wonder how it does that &#8212; how the text-to-speech engine can possibly know the right tones to use for &#034;Sin-Ji&#034;, or even that it&#039;s a Chinese name. Regardless, I wish they&#039;d use the Chinese characters for the name because I&#039;d like to know what they are.</p>

<p>The text fragment used by the Taiwanese Ya-Ling voice does what I want. It has replaced the Romanized &#034;Ya-Ling&#034; with Chinese characters.</p>

<p>Here&#039;s the new text fragment (&#034;Ya-Ling&#034; has been replaced with &#034;雅玲&#034;):</p>


<div class="wp_syntax"><table><tr><td class="code"><pre class="bash" style="font-family:monospace;">$ plutil <span style="color: #660033;">-convert</span> xml1 <span style="color: #000000; font-weight: bold;">/</span>System<span style="color: #000000; font-weight: bold;">/</span>Library<span style="color: #000000; font-weight: bold;">/</span>Speech<span style="color: #000000; font-weight: bold;">/</span>Voices<span style="color: #000000; font-weight: bold;">/</span>Ya-Ling.SpeechVoice<span style="color: #000000; font-weight: bold;">/</span>Contents<span style="color: #000000; font-weight: bold;">/</span>Info.plist  <span style="color: #660033;">-o</span> - <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">grep</span> <span style="color: #660033;">-A</span> <span style="color: #000000;">1</span> VoiceDemoText
&nbsp;
<span style="color: #000000; font-weight: bold;">&lt;</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>VoiceDemoText<span style="color: #000000; font-weight: bold;">&lt;/</span>key<span style="color: #000000; font-weight: bold;">&gt;</span>
<span style="color: #000000; font-weight: bold;">&lt;</span>string<span style="color: #000000; font-weight: bold;">&gt;</span>您好，我叫 雅玲。我說國語。<span style="color: #000000; font-weight: bold;">&lt;/</span>string<span style="color: #000000; font-weight: bold;">&gt;</span></pre></td></tr></table></div>


<p>Here&#039;s how it used to sound &#8212; pretty disastrous:</p>

<p>	<audio id="wp_mep_7"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2011/08/Ya-Ling.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2011/08/Ya-Ling.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_7').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
Here&#039;s how it now sounds &#8212; note how different the &#034;Ya-Ling&#034; is:</p>

<p>	<audio id="wp_mep_8"      controls="controls" preload="none"  >
		
		<source src="http://notesfromandy.com/wp-content/uploads/2013/02/Ya-Ling.mp3" type="audio/mp3" />
		
		
		
		
		
		<object width="400" height="30" type="application/x-shockwave-flash" data="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf">
			<param name="movie" value="http://www.notesfromandy.com/wp-content/plugins/media-element-html5-video-and-audio-player/mediaelement/flashmediaelement.swf" />
			<param name="flashvars" value="controls=true&amp;file=http://notesfromandy.com/wp-content/uploads/2013/02/Ya-Ling.mp3" />			
		</object>		
	</audio>
<script type="text/javascript">
jQuery(document).ready(function($) {
	$('#wp_mep_8').mediaelementplayer({
		m:1
		
		,features: ['playpause','current','progress','duration','volume','tracks','fullscreen']
		,audioWidth:400,audioHeight:30
	});
});
</script>

<br />
You can hear these voices yourself by going to System Preferences > Dictation &amp; Speech > Text to Speech. If you don&#039;t already have the voices for these languages installed, it&#039;ll take a while to download them.</p>

<p>I&#039;m on 10.8.2. I don&#039;t know when Apple made these changes.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/02/04/minor-fixes-to-speech-voices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
<enclosure url="http://notesfromandy.com/wp-content/uploads/2011/08/Sin-Ji.mp3" length="39207" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2013/02/Sin-Ji.mp3" length="109556" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2011/08/Ya-Ling.mp3" length="44693" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2013/02/Ya-Ling.mp3" length="116244" type="audio/mpeg" />
<enclosure url="http://notesfromandy.com/wp-content/uploads/2011/08/Sin-Ji.mp3" length="39207" type="audio/mpeg" />
		</item>
		<item>
		<title>East Bay Vivarium</title>
		<link>http://www.notesfromandy.com/2013/01/07/east-bay-vivarium/</link>
		<comments>http://www.notesfromandy.com/2013/01/07/east-bay-vivarium/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 15:46:23 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1298</guid>
		<description><![CDATA[Last week while in Berkeley I came across a reptile store called East Bay Vivarium. I wanted to stay all day. Here are two huge snakes they had: [Credit: kittyfisher on Flickr] [Credit: dotpolka on Flickr] Coiled up like this, &#8230; <a href="http://www.notesfromandy.com/2013/01/07/east-bay-vivarium/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>Last week while in Berkeley I came across a reptile store called <a href="http://www.eastbayvivarium.com/">East Bay Vivarium</a>. I wanted to stay all day.</p>

<p>Here are two huge snakes they had:</p>

<p><a href="http://www.flickr.com/photos/kittyfisherfoundit/5201963713/" title="ssssnake by kittyfisher, on Flickr"><img src="http://farm6.staticflickr.com/5049/5201963713_f276496e3b_n.jpg" width="320" height="240" alt="ssssnake"/></a><br />
<em>[Credit: kittyfisher on Flickr]</em></p>

<p><a href="http://www.flickr.com/photos/dotpolka/251896121/" title="asleep by dotpolka, on Flickr"><img src="http://farm1.staticflickr.com/109/251896121_276fcdab2f_n.jpg" width="320" height="213" alt="asleep"/></a><br />
<em>[Credit: dotpolka on Flickr]</em></p>

<p>Coiled up like this, they were each about the size of an automobile tire.</p>

<p>There are more great photos on the store&#039;s <a href="http://www.eastbayvivarium.com/gallery/lizgallery.html">web site</a> and <a href="https://www.facebook.com/EBViv">Facebook page</a>.</p>

<p>There was something intimate about viewing these creatures this way that I liked better in some ways than any zoo or aquarium.</p>

<p>Thanks to Google Maps, you can look around inside the store without being there.</p>

<iframe width="425" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="https://www.google.com/maps?q=east+bay+vivarium&amp;layer=c&amp;sll=37.869506,-122.299261&amp;cid=4838893757763137545&amp;panoid=gVKDzjUvs4Vq0BXwV3HG-Q&amp;cbp=13,0.22,,0,0&amp;ie=UTF8&amp;hq=east+bay+vivarium&amp;hnear=&amp;ll=37.869552,-122.299386&amp;spn=0.006295,0.006295&amp;t=m&amp;cbll=37.869621,-122.299129&amp;source=embed&amp;output=svembed"></iframe>

<p><br /><small><a href="https://www.google.com/maps?q=east+bay+vivarium&amp;layer=c&amp;sll=37.869506,-122.299261&amp;cid=4838893757763137545&amp;panoid=gVKDzjUvs4Vq0BXwV3HG-Q&amp;cbp=13,0.22,,0,0&amp;ie=UTF8&amp;hq=east+bay+vivarium&amp;hnear=&amp;ll=37.869552,-122.299386&amp;spn=0.006295,0.006295&amp;t=m&amp;cbll=37.869621,-122.299129&amp;source=embed" style="color:#0000FF;text-align:left">View Larger Map</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/01/07/east-bay-vivarium/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>$1 apartments &#8212; NOT</title>
		<link>http://www.notesfromandy.com/2013/01/07/1-apartments-not/</link>
		<comments>http://www.notesfromandy.com/2013/01/07/1-apartments-not/#comments</comments>
		<pubDate>Mon, 07 Jan 2013 14:26:17 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1293</guid>
		<description><![CDATA[I hate when apartment brokers list $1 rents on Craigslist so they will always show up in searches. The problem is worse in some neighborhoods than others (at least in NYC). In the Financial District, these misleading listings drown out &#8230; <a href="http://www.notesfromandy.com/2013/01/07/1-apartments-not/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>I hate when apartment brokers list $1 rents on Craigslist so they will always show up in searches. The problem is worse in some neighborhoods than others (at least in NYC). In the Financial District, these misleading listings drown out the listings that show only actual rent amounts.</p>

<p>It looks like the brokers who do this often deal in fairly pricey apartments, so it seems silly, not to mention spammish, to try to grab the attention of people seeking cheap rents.</p>

<p><img src="http://www.notesfromandy.com/wp-content/uploads/2013/01/one-dollar-rent.png" alt="One dollar rent" title="one-dollar-rent.png" border="0" width="480" height="69" style="border: 1px solid lightgray; padding:2px 2px;" /></p>

<p>This morning I realized it&#039;s easy to avoid those listings: just set the minimum rent to $2 instead of leaving it blank. Sure, it&#039;s obvious now, but this wouldn&#039;t be the first time I was slow on the uptake.</p>

<p>Speaking of slow uptakes: when I first started searching for apartments on Craigslist, it took me a while to figure out why there is a minimum-rent field at all. Who wouldn&#039;t want to pay as little as possible?</p>

<p>One reason is that you might figure you get what you pay for, and you don&#039;t want your search results cluttered with the cheap stuff.</p>

<p>Another reason is so that you can omit listings you&#039;ve already looked at. For example, if you don&#039;t like any of the apartments under $1000 and might consider bumping your budget up to $1100, you&#039;d search on the range $1000-$1100, because you don&#039;t need to see the under-$1000 listings again. (I picked $1000 because it&#039;s a nice round number, not because it&#039;d get more than a broom closet in NYC.)</p>

<p>And now I see a third reason: to avoid seeing the bogus $1 listings.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/01/07/1-apartments-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep posting those kid updates</title>
		<link>http://www.notesfromandy.com/2013/01/01/keep-posting-those-kid-updates/</link>
		<comments>http://www.notesfromandy.com/2013/01/01/keep-posting-those-kid-updates/#comments</comments>
		<pubDate>Wed, 02 Jan 2013 03:44:51 +0000</pubDate>
		<dc:creator>Andy</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.notesfromandy.com/?p=1289</guid>
		<description><![CDATA[People have all kinds of complaints about social media. Privacy is threatened. Stupidity abounds. People can&#039;t give politics a rest. People waste bandwidth on trivia like what they had for breakfast. One complaint I&#039;ve seen a few times goes something &#8230; <a href="http://www.notesfromandy.com/2013/01/01/keep-posting-those-kid-updates/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
				<content:encoded><![CDATA[<p>People have all kinds of complaints about social media. Privacy is threatened. Stupidity abounds. People can&#039;t give politics a rest. People waste bandwidth on trivia like what they had for breakfast.</p>

<p>One complaint I&#039;ve seen a few times goes something like: &#034;I&#039;m tired of people posting about their kids.&#034; I can see how people might feel that way, but I happen to feel the opposite, at least on Facebook. I <em>love</em> my friends&#039; kid photos and kid stories. Many times I&#039;ve chuckled out loud as if the kids were my own nieces and nephews.</p>

<p>Maybe I&#039;m just lucky to have friends who have great kids and also post plenty of non-kid stuff that I also like, so I never feel overwhelmed with updates on Little Johnny or Little Janey.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.notesfromandy.com/2013/01/01/keep-posting-those-kid-updates/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 11.824 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2013-05-24 03:07:51 -->
