<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel><atom:link rel="hub" href="http://tumblr.superfeedr.com/" xmlns:atom="http://www.w3.org/2005/Atom"/><description>
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));

  try {
    var pageTracker = _gat._getTracker("UA-9103050-1");
    pageTracker._trackPageview();
  } catch(err) {}
</description><title>Pennyworth Only</title><generator>Tumblr (3.0; @gcnovus)</generator><link>http://jamesarosen.com/</link><item><title>How Bose Lost a Customer for Life</title><description>&lt;p&gt;A few years ago, my father gave me a pair of &lt;a href="http://www.bose.com/"&gt;Bose&lt;/a&gt;’s QC-2 headphones. They were &lt;em&gt;awesome&lt;/em&gt;. I wore them while working at coffee shops, on airplanes, and to get the most out of my Brahms and Decemberists.&lt;/p&gt;

&lt;p&gt;Last week, alas, I broke a piece of plastic on one side of the headphones. It’s the bit that slides along the headband and swivels. It’s a pretty key element, especially given that piece of plastic cost Bose less than 8¢ and they charged $300 for the headphones. I knew the headphones were no longer under warranty, but I figured I could buy a replacement. I would’ve been happy to pay, say $10 for this 8¢ piece of plastic.&lt;/p&gt;

&lt;p&gt;Bose, however, wouldn’t settle for a profit margin of 12,400%. Nope. The only option they’re willing to give me is to trade in my QC2s along with $100 for a new pair of QC15s. (When I told them I wasn’t interested, they replied, “Apologies, but unfortunately the part you are looking for is not something we have available to sell individually.” Does that mean that actually &lt;em&gt;do&lt;/em&gt; have them but are unwilling to sell them?) I’m sure the QC15s are quite spiffy, but my QC2s have a lot of life left in them — if only I could get this part.&lt;/p&gt;

&lt;p&gt;Not only do they lose me as a customer, though, they also make an enemy. I’m going to work very hard to build a computer model of the part so that I and others can &lt;a href="http://en.wikipedia.org/wiki/3D_printing"&gt;print their own&lt;/a&gt;. Hopefully that will put a dent, however small, in their profits. Every time I wear my headphones out, people ask me what I think of them. I used to give glowing reviews. Now I’ll have nothing but vitriol to offer.&lt;/p&gt;

&lt;p&gt;And a final suggestion to every consumer products company out there: if the functionality of your $300 product can be lost for want of an 8¢ piece of plastic, order &lt;em&gt;lots&lt;/em&gt; of extras. Send one or two along with the original product and make it easy to order more. Make it &lt;em&gt;dead simple&lt;/em&gt; for your customers to like you instead of hate you.&lt;/p&gt;

&lt;p&gt;&lt;ins&gt;(&lt;em&gt;Later&lt;/em&gt;: I do have to give Bose credit for one thing: they responded quickly, both via email and Twitter. Their responses were ridiculous, but at least they didn’t leave me wondering.)&lt;/ins&gt;&lt;/p&gt;</description><link>http://jamesarosen.com/post/395098521</link><guid>http://jamesarosen.com/post/395098521</guid><pubDate>Wed, 17 Feb 2010 14:27:00 -0500</pubDate></item><item><title>Trash Day and the Fall of Civilization</title><description>&lt;p&gt;Today is trash day. That’s the day wherein we gather up all of our banana peels, used dental floss, socks with holes in them, and broken plant pots and put them on the curb for the nice garbage men&lt;sup&gt;1&lt;/sup&gt; to collect it. That’s the good part.&lt;/p&gt;

&lt;p&gt;Today is also recycling day. That’s the day wherein we gather up all of our wine bottles, empty dental floss containers, and news-magazines-we-never-got-around-to-reading-but-now-we’ve-gotten-the-next-issue-so-why-keep-the-old-one-around-s and put them on the curb for the nice recycling men&lt;sup&gt;1&lt;/sup&gt; to collect. The intent is good here — the less plastic that makes its way into the &lt;a href="http://en.wikipedia.org/wiki/Great_Pacific_Garbage_Patch"&gt;Pacific Gyre&lt;/a&gt;, the better off our planet is.&lt;/p&gt;

&lt;p&gt;The problem is that in Massachusetts we have a bottle deposit. When I buy a can of Coke or a bottle of Duvel, I pay an extra 5¢ to the state. Then, if I return the empty bottle, I get my 5¢ back. Sometimes I forget about a bottle and it goes into the normal recycling pile. No problem, I’m not worried about the occasional 5¢ and I’m happy for the state to keep it to work down its massive budget deficits.&lt;/p&gt;

&lt;p&gt;Except the state doesn’t get it. Every trash day there are roving bands of people with shopping carts who go around and poke through the trash and recycling looking for stray soda and beer bottles. I don’t begrudge them poking through my detritus. I sure don’t want it any more. What I do hate is that they tear open bags of trash and leave them mixed in with the recycling. Now &lt;em&gt;everything&lt;/em&gt; has to go into the garbage truck and there’s nothing left for the recycling people to pick up. All my effort of separating my garbage so the human race can live on Earth for an extra 0.0002 seconds is for naught.&lt;/p&gt;

&lt;p&gt;All for 5¢.&lt;/p&gt;

&lt;p&gt;[1] the three who do my street are all men. I’m sure this isn’t a global phenomenon.&lt;/p&gt;</description><link>http://jamesarosen.com/post/381950185</link><guid>http://jamesarosen.com/post/381950185</guid><pubDate>Wed, 10 Feb 2010 10:51:06 -0500</pubDate></item><item><title>Staff Bio</title><description>&lt;p&gt;Some day I hope to have a bio as creative as the ones on the &lt;a href="http://bandcamp.com/faq#whowebe"&gt;Bandcamp FAQ&lt;/a&gt;. For example:&lt;/p&gt;

&lt;blockquote&gt;
Shawn Grunberger helped negotiate the Peace of Westphalia in 1648. It was nontrivial.
&lt;/blockquote&gt;</description><link>http://jamesarosen.com/post/371170970</link><guid>http://jamesarosen.com/post/371170970</guid><pubDate>Thu, 04 Feb 2010 17:34:25 -0500</pubDate></item><item><title>Chuck Lorre Productions, #275: Ask Chuck!</title><description>&lt;p&gt;&lt;blockquote&gt;Dear Chuck,&lt;br/&gt;
At a recent dinner party, I found myself in an awkward situation when the host, a devout atheist, sneezed between spoonfuls of his gazpacho. Without thinking, I said, “God bless you.” He gave me a withering look and said, as if to a child, “Golly gee, I sure hope he does.” The other guests exploded with laughter, while I imploded with humiliation. To avoid future embarrassment, what is the correct response when an atheist sneezes?
Troubled with ahchoo&lt;br/&gt;
&lt;/blockquote&gt;

&lt;blockquote&gt;
Dear Troubled,&lt;br/&gt;
First, a little background information. Saying “God bless you” following a sneeze is thought by some to have originated in the sixth century in order to protect the sneezer from falling ill to the bubonic plague. Another possible origin is that people once believed that the devil entered the body during a sneeze and saying “God bless you” could help ward him off. Since the plague has killed something like two hundred million people and the words “God bless you” have, in all likelihood, been said countless times to Glenn Beck, we can safely assume the phrase has no real power against germs or demonic possession. What it does contain is simple human courtesy — a means by which we express concern for one another. As to how to respond to a sneezing atheist, well, that’s easy. Simply say, “Sounds like you’re coming down with something; I hope you don’t die and rot in a box.”
&lt;/blockquote&gt;&lt;/p&gt;</description><link>http://jamesarosen.com/post/367104885</link><guid>http://jamesarosen.com/post/367104885</guid><pubDate>Tue, 02 Feb 2010 11:21:02 -0500</pubDate></item><item><title>An Open Letter to Frank D. Wagner</title><description>&lt;p&gt;An open letter to &lt;a href="http://en.wikipedia.org/wiki/Frank_D._Wagner"&gt;Frank D. Wagner&lt;/a&gt;, Reporter of Decisions of the Supreme Court of the United States:&lt;/p&gt;

&lt;p&gt;Dear Mr. Wagner:&lt;/p&gt;

&lt;p&gt;In reading through the &lt;a href="http://www.scotusblog.com/wp-content/uploads/2010/01/citizens-opinion.pdf"&gt;slip opinion&lt;/a&gt; of &lt;i&gt;Citizens United v. Federal Election Commission&lt;/i&gt;, I noticed a grammatical error. Associate Justice Kennedy, writing for the majority, quotes &lt;i&gt;McConnell, supra&lt;/i&gt;, as follows:&lt;/p&gt;

&lt;blockquote&gt;Section 311 disclaimers provide information to the 
electorate, &lt;i&gt;McConnell, supra&lt;/i&gt;, at 196, and “insure that the voters are 
fully informed” about who is speaking… (&lt;i&gt;Citizens United&lt;/i&gt;, Syllabus, page 7)
&lt;/blockquote&gt;

&lt;p&gt;The meaning of &lt;i&gt;insure&lt;/i&gt; is generally taken to be “protect against financial loss” rather than “guarantee.” The original author, Associate Justice Stevens, likely meant that the disclaimers “ensure that the voters are fully informed.” The error is repeated verbatim in the opinion on page 52. Both quotes in &lt;i&gt;Citizens United&lt;/i&gt; should include “[sic]” indicating the original misuse.&lt;/p&gt;

&lt;p&gt;Sincerely,&lt;/p&gt;

&lt;p&gt;James Alexander Rosen&lt;/p&gt;</description><link>http://jamesarosen.com/post/358291149</link><guid>http://jamesarosen.com/post/358291149</guid><pubDate>Thu, 28 Jan 2010 14:47:00 -0500</pubDate></item><item><title>"Under the majority’s view, I suppose it may be a First Amendment problem that corporations are not..."</title><description>“Under the majority’s view, I suppose it may be a First Amendment problem that corporations are not permitted to vote, given that voting is, among other things, a form of speech.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;John Paul Stevens, in &lt;i&gt;&lt;a href="http://www.scotusblog.com/wp-content/uploads/2010/01/citizens-opinion.pdf"&gt;Citizens United v. Federal Election Commission&lt;/a&gt;&lt;/i&gt;&lt;/em&gt;</description><link>http://jamesarosen.com/post/358155368</link><guid>http://jamesarosen.com/post/358155368</guid><pubDate>Thu, 28 Jan 2010 12:47:09 -0500</pubDate></item><item><title>"But your children aren’t really yours. They have lives of their own. So when your designs do..."</title><description>“But your children aren’t really yours. They have lives of their own. So when your designs do change the world, you have to accept it. You have to say, ‘OK, this was such a good idea, other people took it and ran with it. I win.’”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Wil Shipley, as quoted in &lt;a href="http://www.washingtonpost.com/wp-dyn/content/article/2010/01/27/AR2010012704221.html"&gt;The Washington Post&lt;/a&gt;&lt;/em&gt;</description><link>http://jamesarosen.com/post/357969576</link><guid>http://jamesarosen.com/post/357969576</guid><pubDate>Thu, 28 Jan 2010 09:56:08 -0500</pubDate></item><item><title>"If the problem has a solution, worrying is pointless, in the end the problem will be solved. If the..."</title><description>“If the problem has a solution, worrying is pointless, in the end the problem will be solved. If the problem has no solution, there is no reason to worry, because it can’t be solved.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;Zen proverb&lt;/em&gt;</description><link>http://jamesarosen.com/post/356211732</link><guid>http://jamesarosen.com/post/356211732</guid><pubDate>Wed, 27 Jan 2010 10:01:47 -0500</pubDate></item><item><title>dancroak:

Electoral College reform. New states have roughly...</title><description>&lt;img src="http://30.media.tumblr.com/tumblr_kwte4bjTlQ1qz5x9po1_500.jpg"/&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://dancroak.com/post/352868687/electoral-college-reform-new-states-have-roughly" class="tumblr_blog"&gt;dancroak&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;&lt;a href="http://www.fakeisthenewreal.org/reform/"&gt;Electoral College reform&lt;/a&gt;. New states have roughly even populations around 5,617,000 according to the 2000 US Census.&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://jamesarosen.com/post/352872572</link><guid>http://jamesarosen.com/post/352872572</guid><pubDate>Mon, 25 Jan 2010 13:06:06 -0500</pubDate></item><item><title>OSX + Multiple Network Locations + Proxies</title><description>&lt;p&gt;At work I’m behind a proxy. At home I’m not. OSX provides a nice way to handle that problem: multiple network &lt;em&gt;locations&lt;/em&gt;. You can create a location (“work”) with some proxy settings and one (“home”) without, then simply switch between them as you commute back and forth.&lt;/p&gt;

&lt;p&gt;Those proxy settings work great for Safari, iChat, and iTunes. They work reasonably well for Firefox (using &lt;a href="http://systemproxy.mozdev.org/"&gt;SystemProxy&lt;/a&gt;). What they absolutely &lt;strong&gt;don’t&lt;/strong&gt; work for is scripts run in Terminal. Rubygems? Nope. Git? Nope. Curl? Nope.&lt;/p&gt;

&lt;p&gt;The normal solution is to put the following in your &lt;code&gt;~/.bash_profile&lt;/code&gt; (assuming you’re a &lt;code&gt;bash&lt;/code&gt; person like me):&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export HTTP_PROXY='http://proxy.mycompany.com:80'
export http_proxy=$HTTP_PROXY
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That works great at work, but not so well at home. Instead, I recommend this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;export HTTP_PROXY=system_profiler SPNetworkDataType|grep "HTTP Proxy Server"|awk {'sub(/^.*:[ \t]*/, "", $0); print $0;'}
export http_proxy=$HTTP_PROXY
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You’ll have to either open a new Terminal tab or run &lt;code&gt;source ~/.bash_profile&lt;/code&gt; after you switch locations, but that seems easier than resetting each variable. Does anyone know a way to delay the binding so that when scripts ask for &lt;code&gt;$http_proxy&lt;/code&gt; that function gets re-evaluated? If so, please tweet me &lt;a href="http://twitter.com/jamesarosen"&gt;@jamesarosen&lt;/a&gt;.&lt;/p&gt;</description><link>http://jamesarosen.com/post/346570628</link><guid>http://jamesarosen.com/post/346570628</guid><pubDate>Thu, 21 Jan 2010 18:20:07 -0500</pubDate></item><item><title>A Fast Random Lookup in SQL with Conditions.</title><description>&lt;p&gt;If you want a random element from a table from ActiveRecord, you might be tempted to do this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def MyModel.random
  find :first, :order =&gt; 'RAND()'
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That has two unfortunate problems: it’s &lt;em&gt;unbearably&lt;/em&gt; slow for large tables, and it doesn’t work on all databases. To fix those problems, you might try the technique from &lt;a href="http://github.com/hgimenez/fast_random"&gt;hgimenez’s fast_random&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def MyModel.random
  if (c = self.count) == 0
    nil
  else
    find :first, :offset =&gt; rand(c)
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;That works great… until you want to add some conditions. Let’s say you want a random element created in the last two weeks. You might try this:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def MyModel.random_in_last(since = nil)
  if (c = self.count) == 0
    nil
  else
    since ||= 2.weeks.ago
    find :first, :conditions =&gt; ["created_at &gt; ?", since],
                 :offset =&gt; rand(c)
  end
end
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Unfortunately, this goes &lt;strong&gt;bang&lt;/strong&gt;! The problem is that the &lt;code&gt;offset&lt;/code&gt; gets applied &lt;em&gt;first&lt;/em&gt;, and can point to a row that the &lt;code&gt;conditions&lt;/code&gt; exclude. You need to execute the &lt;code&gt;conditions&lt;/code&gt; in a sub-query so that by the time the &lt;code&gt;offset&lt;/code&gt; is applied, all rows are valid:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;def MyModel.random_in_last(since = nil)
  if (c = self.count) == 0
    nil
  else
    since ||= 2.weeks.ago
    find :first, :select =&gt; 'recent_models.*',
                 :from =&gt; "(select * from `#{self.table_name}` where " +
                            sanitize_sql_array(['created_at &gt; ?', since]) +
                          ") as recent_models",
                 :offset =&gt; rand(c))
  end
end
&lt;/code&gt;&lt;/pre&gt;</description><link>http://jamesarosen.com/post/341011059</link><guid>http://jamesarosen.com/post/341011059</guid><pubDate>Mon, 18 Jan 2010 10:37:47 -0500</pubDate></item><item><title>Getting Rails 3 (pre) up on OSX</title><description>&lt;p&gt;I sat down to work on the most recent &lt;a href="http://bugmash.com/" title="Railsbridge Bugmash January 2010"&gt;Bugmash&lt;/a&gt;. First I followed &lt;a href="http://yehudakatz.com/2009/12/31/spinning-up-a-new-rails-app/" title="Spinning up a new Rails app"&gt;Yehuda Katz’s instructions&lt;/a&gt; on getting started with Rails 3. Those instructions worked great for running an app on Rails 3, but they’re not quite sufficient for working on Rails itself. Here are some pointers for that, as well as a few unresolved issues:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the &lt;a href="http://dev.mysql.com/downloads/mysql/5.1.html"&gt;latest MySQL&lt;/a&gt; using the DMG version. By default, it installs into &lt;code&gt;/usr/local/mysql&lt;/code&gt;, which is fine.&lt;/li&gt;
&lt;li&gt;Install the &lt;a href="http://www.enterprisedb.com/products/pgdownload.do#osx"&gt;latest PostgreSQL&lt;/a&gt; also using the DMG version. By default, it installs into &lt;code&gt;/Library/PostgreSQL&lt;/code&gt;, which is fine.&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;/Library/PostgreSQL/bin&lt;/code&gt; to your &lt;code&gt;$PATH&lt;/code&gt;. You probably want to do this in your &lt;code&gt;~/.bash_profile&lt;/code&gt; or equivalent.&lt;/li&gt;
&lt;li&gt;Go to the directory in which you &lt;code&gt;clone&lt;/code&gt;d Rails and add a &lt;code&gt;build_options.yml&lt;/code&gt; file. In it, place the following:
&lt;script src="http://gist.github.com/279443.js?file=build_options.yml"&gt;&lt;/script&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;gem bundle -b build_options.yml&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;rake&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&lt;em&gt;Most&lt;/em&gt; of the tests run so far, but I’m still having trouble getting Rails 3 to actually connect to the MySQL and PostgreSQL databases. I’ll have to work on that.&lt;/p&gt;</description><link>http://jamesarosen.com/post/339319063</link><guid>http://jamesarosen.com/post/339319063</guid><pubDate>Sun, 17 Jan 2010 11:49:00 -0500</pubDate></item><item><title>Lessons in Toilet Paper Engineering</title><description>&lt;p&gt;First, a wonderful &lt;a href="http://currentconfig.com/images/overisright_hanger.pdf" title="Overhanging: Right for You, Right for Everyone"&gt;brochure&lt;/a&gt; created by Chris Rugen, author of an equally informative &lt;a href="http://currentconfig.com/2005/02/22/essential-life-lesson-1-over-is-right-under-is-wrong/" title="Essential Life Lesson #1: Over is Right, Under is Wrong"&gt;blog post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Second, &lt;a href="http://www.squidoo.com/ToiletPaperRollOverOrUnder" title="Should The Toilet Paper Roll Go on Over or Under?"&gt;two&lt;/a&gt; &lt;a href="http://www.squidoo.com/overorunder" title="OVER or UNDER: Which is correct for a roll of toilet paper?"&gt;different&lt;/a&gt; Squidoo pages.&lt;/p&gt;

&lt;p&gt;Third, a new &lt;a href="http://www.cottonellerollpoll.com/" title="Roll Poll"&gt;poll&lt;/a&gt; (read: &lt;em&gt;marketing campaign&lt;/em&gt;) by Cottonelle.&lt;/p&gt;

&lt;p&gt;The evidence is clear, folks. Friends don’t let friends hang toilet paper under.&lt;/p&gt;</description><link>http://jamesarosen.com/post/336693952</link><guid>http://jamesarosen.com/post/336693952</guid><pubDate>Fri, 15 Jan 2010 21:47:52 -0500</pubDate></item><item><title>Wine Review: 2006 Calatrava Sauvignon Blanc</title><description>&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Rating&lt;/th&gt;
&lt;td&gt;★✩✩✩✩&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Winery&lt;/th&gt;
&lt;td&gt;Calatrava&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Vintage&lt;/th&gt;
&lt;td&gt;2006&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Country&lt;/th&gt;
&lt;td&gt;Colchagua Valley, Chile&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Color&lt;/th&gt;
&lt;td&gt;White&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;td&gt;Sauvignon Blanc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Grape&lt;/th&gt;
&lt;td&gt;Sauvignon blanc&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Price Paid&lt;/th&gt;
&lt;td&gt;$4.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Good for&lt;/th&gt;
&lt;td&gt;foisting off on others at college house parties&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Bad for&lt;/th&gt;
&lt;td&gt;a bread and cheese plate&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Smells a bit of acetone and citrus rind. The most redeeming thing I can say about this wine is that I can drink a full glass of it without feeling ill. Oh, and it does actually have a rather nice heavy texture. Unfortunately, enjoying the texture means you have to taste the wine longer…&lt;/p&gt;</description><link>http://jamesarosen.com/post/327762992</link><guid>http://jamesarosen.com/post/327762992</guid><pubDate>Sun, 10 Jan 2010 19:37:50 -0500</pubDate></item><item><title>Wine Review: 2007 Carmim Terras d'el Rei</title><description>&lt;table&gt;&lt;tbody&gt;
&lt;tr&gt;
&lt;th&gt;Rating&lt;/th&gt;
&lt;td&gt;★★✩✩✩&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Winery&lt;/th&gt;
&lt;td&gt;Carmim&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Vintage&lt;/th&gt;
&lt;td&gt;2007&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Country&lt;/th&gt;
&lt;td&gt;Portugal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Color&lt;/th&gt;
&lt;td&gt;Red&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Name&lt;/th&gt;
&lt;td&gt;Terras d’el Rei&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Grape&lt;/th&gt;
&lt;td&gt;Trincadeira, Castelão, Moreto, Aragonês&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Price Paid&lt;/th&gt;
&lt;td&gt;$4.00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Good for&lt;/th&gt;
&lt;td&gt;not sure. Cheetos?&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;th&gt;Bad for&lt;/th&gt;
&lt;td&gt;first dates&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;p&gt;Sometimes you find a rare gem in the discount bin. This isn’t one of those times. It’s … wine. It’s definitely not horrible wine.&lt;/p&gt;</description><link>http://jamesarosen.com/post/322095567</link><guid>http://jamesarosen.com/post/322095567</guid><pubDate>Thu, 07 Jan 2010 16:35:26 -0500</pubDate></item><item><title>"Improved design process, not a perfectly realized building, is the most valuable thing you gain from..."</title><description>“Improved design process, not a perfectly realized building, is the most valuable thing you gain from one design studio and take with you to the next.”&lt;br/&gt;&lt;br/&gt; - &lt;em&gt;&lt;a href="http://www.amazon.com/101-Things-Learned-Architecture-School/dp/0262062666/ref=sr_1_1?ie=UTF8&amp;s=books&amp;qid=1260058551&amp;sr=8-1"&gt;Matthew Frederick, 101 Things I Learned in Architecture School&lt;/a&gt;&lt;/em&gt;</description><link>http://jamesarosen.com/post/270930742</link><guid>http://jamesarosen.com/post/270930742</guid><pubDate>Sat, 05 Dec 2009 19:16:38 -0500</pubDate></item><item><title>quaranto:

People really like Sarah Palin!</title><description>&lt;object width="400" height="336"&gt;&lt;param name="movie" value="http://www.youtube.com/v/mKKKgua7wQk&amp;rel=0&amp;egm=0&amp;showinfo=0&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/mKKKgua7wQk&amp;rel=0&amp;egm=0&amp;showinfo=0&amp;fs=1" type="application/x-shockwave-flash" width="400" height="336" allowFullScreen="true" wmode="transparent"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://nick.quaran.to/post/256130023/people-really-like-sarah-palin" class="tumblr_blog"&gt;quaranto&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;People really like Sarah Palin!&lt;/p&gt;&lt;/blockquote&gt;</description><link>http://jamesarosen.com/post/256148467</link><guid>http://jamesarosen.com/post/256148467</guid><pubDate>Tue, 24 Nov 2009 18:24:27 -0500</pubDate></item><item><title>Slaying the Autocomplete Dragon</title><description>&lt;p&gt;Designing an autocomplete framework is hard. &lt;strong&gt;Really hard&lt;/strong&gt;. How do I know? I need one, and I need it to perform several different duties: as a search box, as the “TO:” field for a social network messaging form, and as a tag list. Each use case demands autocompletion, but they behave differently in subtle yet important ways.&lt;/p&gt;

&lt;p&gt;First I tried &lt;a href="http://docs.jquery.com/Plugins/Autocomplete"&gt;jQuery.autocomplete&lt;/a&gt;, but that uses a silly custom response format. It’s written in Javascript, why not use JSON? Additionally, you only get one completion per field. This solves one problem reasonably well.&lt;/p&gt;

&lt;p&gt;James Smith’s &lt;a href="http://loopj.com/2009/04/25/jquery-plugin-tokenizing-autocomplete-text-entry/"&gt;jQuery.tokeninput&lt;/a&gt; uses sensible JSON and supports completing multiple items per field, but falls down on customizability. I want to change the class of the field during searching, not display the dropdown list with “Searching…” It’s not as though there’s &lt;em&gt;no&lt;/em&gt; customizability. Indeed, I can customize all the various classes that get applied on events. But why would I? I can just give the top-level item a different class and use hierarchical CSS selectors to change styling. It also inserts some &lt;p&gt;s where I don’t think they belong. Lastly, it &lt;em&gt;requires&lt;/em&gt; each entry in the list to already have a database ID, since the ID list rather than the textual list is what is submitted in the form. This works fine for some fields, but poorly for tag list inputs. Again, the library solves one problem reasonably well.&lt;/p&gt;

&lt;p&gt;Rafudu’s &lt;a href="http://saynotofastfood.info/tagbox/examples/"&gt;jQuery.tagbox&lt;/a&gt; does nifty things for tag inputs, but it doesn’t have autocompletion. One more library that solves a narrowly-defined problem well.&lt;/p&gt;

&lt;h3&gt;The Dragon&lt;/h3&gt;

&lt;p&gt;So I started out on a new quest. My dragon: a customizable jQuery-based autocompletion framework that is well-suited for a variety of use cases. I like jumping in to TDD coding as much as the next fellow, but I’m not fluent in Javascript yet and I knew this was going to be a complicated problem.&lt;/p&gt;

&lt;h3&gt;The Townsfolk&lt;/h3&gt;

&lt;p&gt;&lt;code&gt;You are in TOWN. There are many TOWNSFOLK wandering about.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I decided to start by talking to the townsfolk.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;talk with townsfolk&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;The TOWNSFOLK tell you many wondrous stories and feed you lots of STEW.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I took their dragon stories and turned them into a a few major questions and a large number of related smaller questions that an adventurer — sorry, an &lt;code&gt;ADVENTURER&lt;/code&gt; — should ask him- or herself. First, the big ones:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How many &lt;em&gt;things&lt;/em&gt; can the user enter into the field? If it’s a search box, only one. If it’s a tag cloud, many. In some ways, the distinction is between &lt;strong&gt;single&lt;/strong&gt; and &lt;strong&gt;multiple&lt;/strong&gt;, though the &lt;strong&gt;single&lt;/strong&gt; case often behaves like the very last item of the &lt;strong&gt;multiple&lt;/strong&gt; case if there is a firm limit. Pressing &lt;abbr title="Tab"&gt;&lt;code&gt;↹&lt;/code&gt;&lt;/abbr&gt; after entering text in a single-item autocomplete box should move focus to the next form object. On a multi-item box, it should start the next item.&lt;/li&gt;
&lt;li&gt;What can users enter for each item? For our search box, &lt;strong&gt;anything goes&lt;/strong&gt;. For the “TO:” field in a social networking site, it’s probably &lt;strong&gt;set-limited&lt;/strong&gt; to the user’s friends. This distinction has surprisingly important behavioral differences. One important distinction is for &lt;strong&gt;anything goes&lt;/strong&gt; fields, the user may very well want to see completions but fill in the rest of the field without help; automatically filling in the first completion would probably cause more pain than pleasure. For a &lt;strong&gt;set-limited&lt;/strong&gt; field, on the other hand, it might very well make sense to automatically move focus to the first completion when results come back.&lt;/li&gt;
&lt;li&gt;What do you use to delimit entries in a &lt;strong&gt;multiple&lt;/strong&gt; list and how do you escape entries that have one or more of the delimiters in their text? (This is an area where &lt;code&gt;jquery.tokeninput&lt;/code&gt; actually works quite well.) If &lt;abbr title="Space"&gt;&lt;code&gt;⎵&lt;/code&gt;&lt;/abbr&gt; is a delimiter, are all the other Unicode whitespace characters (the three-em, the thin, the hair, the narrow no-break, etc.)?&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;And now the smaller ones, which all have the same form:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;What happens when the user hits &lt;abbr title="Return"&gt;&lt;code&gt;↵&lt;/code&gt;&lt;/abbr&gt; right after entering the field? After typing a few characters? After highlighting a completion? After inserting a completion? Do any of these answers change if the field in question is the only (non-hidden) field in the form? If it’s the &lt;em&gt;last&lt;/em&gt; (non-hidden) field in the form?&lt;/li&gt;
&lt;li&gt;Similarly for &lt;abbr title="Enter"&gt;&lt;code&gt;⌤&lt;/code&gt;&lt;/abbr&gt;, &lt;abbr title="Tab"&gt;&lt;code&gt;↹&lt;/code&gt;&lt;/abbr&gt;, &lt;abbr title="Semicolon"&gt;&lt;code&gt;;&lt;/code&gt;&lt;/abbr&gt;, &lt;abbr title="Comma"&gt;&lt;code&gt;,&lt;/code&gt;&lt;/abbr&gt;, and &lt;abbr title="Space"&gt;&lt;code&gt;⎵&lt;/code&gt;&lt;/abbr&gt;.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Fellow Adventurers&lt;/h3&gt;

&lt;p&gt;Talking to all those townsfolk meant eating lots of stew. Satiated and eager to slay my dragon, I decided to leave town.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;You are in TOWN. There are exits to the EAST and the NORTH.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;go EAST&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;You are in the FOREST OF GYTHUB. There are many ADVENTURERS. Most of them are eating APPLES.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;take apple&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;You already have an APPLE. Besides, that's not nice.&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I looked at other projects and asked about the kinds of things a user of the library (who is a programmer, as opposed to the end-user, who probably isn’t) would want to customize. Here’s the list so far:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;url&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;delay&lt;/code&gt; - milliseconds to wait for a subsequent key-press before making an AJAX call, e.g. &lt;code&gt;300&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;minChars&lt;/code&gt; - minimum number of characters before making an AJAX call, e.g. &lt;code&gt;3&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;maxItems&lt;/code&gt; - maximum number of entries; &lt;code&gt;1&lt;/code&gt; for a &lt;strong&gt;single&lt;/strong&gt;-style list, &lt;code&gt;null&lt;/code&gt; for an unlimited list, &lt;code&gt;n&lt;/code&gt;∈ℕ for a &lt;strong&gt;multiple&lt;/strong&gt; but limited list&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;affordDelete&lt;/code&gt; - whether each item in the list comes with a little “x” for deleting; probably &lt;code&gt;true&lt;/code&gt; by default iff &lt;code&gt;maxItems&lt;/code&gt; &gt; 1&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;inReturnedItemsOnly&lt;/code&gt; - &lt;strong&gt;set-limited&lt;/strong&gt; versus &lt;strong&gt;anything goes&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;delimiters&lt;/code&gt; - only if a &lt;strong&gt;multiple&lt;/strong&gt; field, e.g. &lt;code&gt;/;\s+/&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;programmaticDelimiter&lt;/code&gt; - the delimiter that is inserted if the user selects an autocompletion rather than typing the whole entry and a delimiter manually, e.g. &lt;code&gt;';'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;groupStartChar&lt;/code&gt; and &lt;code&gt;groupEndChar&lt;/code&gt; - only if a &lt;strong&gt;multiple&lt;/strong&gt; field, e.g. &lt;code&gt;"&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;contentType&lt;/code&gt; of the AJAX request, e.g. &lt;code&gt;'JSON'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;parseResponse()&lt;/code&gt; - for use if you can’t control the content returned from the server, a function to parse the response body into something of the form &lt;code&gt;[{name: "bar"}, {name: "baz"}]&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;onFocus()&lt;/code&gt;, &lt;code&gt;onStartItem()&lt;/code&gt;, &lt;code&gt;onRequest()&lt;/code&gt;, &lt;code&gt;onResponse()&lt;/code&gt;, &lt;code&gt;onAutocompletionsDisplayed()&lt;/code&gt;, &lt;code&gt;onAutocompletionFocus()&lt;/code&gt;, &lt;code&gt;onAutocompletionBlur()&lt;/code&gt;, &lt;code&gt;onInsertItem()&lt;/code&gt;, &lt;code&gt;onCloseItem()&lt;/code&gt;, &lt;code&gt;onAutocompletionsHidden()&lt;/code&gt;, &lt;code&gt;onDeleteItem&lt;/code&gt;, &lt;code&gt;onBlur()&lt;/code&gt; - hooks, each bound to the autocomplete object so the library user has access to helpers, the relevant form, etc.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;In addition to customizations, there are some core concepts that should be exposed as methods:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;code&gt;isLastItem()&lt;/code&gt; - for autocomplete fields with a non-&lt;code&gt;null&lt;/code&gt; &lt;code&gt;maxItems&lt;/code&gt;, whether the user is currently working on the last allowed item&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;isLastVisibleField()&lt;/code&gt; - whether the autocomplete field is the last (or only) visible field in a form&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;And some helper methods that users of the library can easily chain together to customize behavior:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;code&gt;startNewItem()&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;closeItem()&lt;/code&gt; - insert a delimiter&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;tentativelyCompleteText()&lt;/code&gt; - fill in the rest of the text of the current item, but highlight it as &lt;em&gt;tentative&lt;/em&gt;, leave the cursor in the middle of the item&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;insertHightlightedAutocompletion()&lt;/code&gt; - insert the completion as a full item in the list, leave the cursor at the end of the item&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;propagateEventIfLastField()&lt;/code&gt; and &lt;code&gt;propagateEvent()&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;The Adventure&lt;/h3&gt;

&lt;p&gt;I’d love to have you join this adventure. I’ve &lt;a href="http://github.com/jamesarosen/jQuery.compleatCompleter"&gt;set up camp&lt;/a&gt; in the &lt;code&gt;FOREST OF GYTHUB&lt;/code&gt;. There probably aren’t a lot of &lt;code&gt;GOLD PIECES&lt;/code&gt; to be found with this dragon, but we might earn some experience.&lt;/p&gt;</description><link>http://jamesarosen.com/post/256097455</link><guid>http://jamesarosen.com/post/256097455</guid><pubDate>Tue, 24 Nov 2009 17:33:00 -0500</pubDate><category>javascript</category><category>autocomplete</category><category>ui/ux</category></item><item><title>I was doing some comparison shopping at Apple today. Here’s a shot of Apple’s...</title><description>&lt;p&gt;I was doing some comparison shopping at Apple today. Here’s a shot of Apple’s “Employee Purchase Program” store:
&lt;img src="http://media.tumblr.com/tumblr_kt64oqjY9n1qzcv9a.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;And here’s the same page at Apple’s “Education” store:
&lt;img src="http://media.tumblr.com/tumblr_kt64qbabDl1qzcv9a.png" alt=""/&gt;&lt;/p&gt;

&lt;p&gt;Notice any differences? They’re subtle, to be sure.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The EPP store has a &lt;a href="http://en.wikipedia.org/wiki/Favicon"&gt;Favicon&lt;/a&gt;, while the EDU store does not. Winner: EPP.&lt;/li&gt;
&lt;li&gt;The search box on the EPP store is Apple’s signature rounded corner box. On the EDU store, it’s Firefox’s default rectangle. Winner: EPP.
2b. The search box on the EPP store has both a magnifying glass and a “Search Store” prompt. The search box on the EDU store has neither. There is &lt;em&gt;absolutely no indication&lt;/em&gt; of what the box on the EDU store is for. Winner: EPP by a long shot.&lt;/li&gt;
&lt;li&gt;On the EPP store, the image of the iMac is vertically aligned with the top of the relevant text. On the EDU store, they seem to be approximately middle-aligned. Winner: EPP.&lt;/li&gt;
&lt;li&gt;The headers of the EPP store items (e.g. “21.5-inch: 3.06GHz”) have no space between “inch” and the colon. The headers of the EDU store do. At least all the headers on both pages are consistent. Winner: I say EPP, but it’s not so clear to me.&lt;/li&gt;
&lt;li&gt;The EPP store gives you financing terms below each item. The EDU store does not. To me (a person who would never finance something like this that only goes down in value), this is just noise. Perhaps this is an instance where Apple knows their audiences. I don’t know whether students don’t finance and young professionals do, but it’s possible. Winner: unclear, but I prefer the EDU version.&lt;/li&gt;
&lt;li&gt;The EDU store lists the original price and difference below each item. The EPP store does not. I like this information. Well, the “Students save &lt;strong&gt;&lt;em&gt;” is redundant, so I really just like the “Was _&lt;/em&gt;&lt;/strong&gt;” information. Winner: EDU, but even that could be better.&lt;/li&gt;
&lt;/ol&gt;</description><link>http://jamesarosen.com/post/245150981</link><guid>http://jamesarosen.com/post/245150981</guid><pubDate>Sun, 15 Nov 2009 16:05:35 -0500</pubDate><category>apple</category><category>ui</category><category>ux</category></item><item><title>quaranto:


kevin:


ckck:

Magic Highway USA, Disney’s vision...</title><description>&lt;object width="400" height="336"&gt;&lt;param name="movie" value="http://www.youtube.com/v/F6pUMlPBMQA&amp;rel=0&amp;egm=0&amp;showinfo=0&amp;fs=1"&gt;&lt;/param&gt;&lt;param name="wmode" value="transparent"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/F6pUMlPBMQA&amp;rel=0&amp;egm=0&amp;showinfo=0&amp;fs=1" type="application/x-shockwave-flash" width="400" height="336" allowFullScreen="true" wmode="transparent"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;br/&gt;&lt;br/&gt;&lt;p&gt;&lt;a href="http://nick.quaran.to/post/240911214/kevin-ckck-magic-highway-usa-disneys"&gt;quaranto&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://wtfispantone.com/post/240639209/ckck-magic-highway-usa-disneys-vision-of-the"&gt;kevin&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="http://ckck.tumblr.com/post/240635457/magic-highway-usa-disneys-vision-of-the-future"&gt;ckck&lt;/a&gt;:&lt;/p&gt;

&lt;blockquote&gt;&lt;p&gt;Magic Highway USA, Disney’s vision of the future, circa 1958.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p&gt;Either this, or highways will remain exactly the same… only time will tell!&lt;/p&gt;
&lt;/blockquote&gt;
&lt;/blockquote&gt;</description><link>http://jamesarosen.com/post/241581398</link><guid>http://jamesarosen.com/post/241581398</guid><pubDate>Thu, 12 Nov 2009 11:14:46 -0500</pubDate></item></channel></rss>
