<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/atom10full.xsl" type="text/xsl" media="screen"?><?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en" xml:base="http://aarone.org/wp-atom.php">
	<title type="text">aaron evans</title>
	<subtitle type="text">Posts about topics including but not limited to Aaron Evans , software, Apple, the economy, and politics</subtitle>

	<updated>2008-08-24T13:45:51Z</updated>
	<generator uri="http://wordpress.org/" version="2.6.1">WordPress</generator>

	<link rel="alternate" type="text/html" href="http://aarone.org" />
	<id>http://aarone.org/feed/atom/</id>
	

			<link rel="self" href="http://feeds.feedburner.com/aarone" type="application/atom+xml" /><entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[An Idea for Purveyors Of Eyeglasses]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/367258002/" />
		<id>http://aarone.org/2008/08/17/an-idea-for-purveyors-of-eyeglasses/</id>
		<updated>2008-08-18T00:00:36Z</updated>
		<published>2008-08-17T01:03:36Z</published>
		<category scheme="http://aarone.org" term="Me" />		<summary type="html"><![CDATA[Yesterday I found myself frustrated by my physical inability to select new glasses. The problem is that my prescription is rather strong (-5.75 diopters in each eye) and when I try on a a pair of frames with fake lenses I am unable to see what I look like in a mirror. In order to [...]]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/08/16/an-idea-for-purveyors-of-eyeglasses/"><![CDATA[<p>Yesterday I found myself frustrated by my physical inability to select new glasses. The problem is that my prescription is rather strong (-5.75 diopters in each eye) and when I try on a a pair of frames with fake lenses I am unable to see what I look like in a mirror. In order to see anything I had to move to within a few inches of a mirror which distorted my perspective of how the frames looked on my face. I did this over and over again with dozens of frames.  I eventually submitted and selected a frame.</p>

<p>Did I end up putting way too much faith in the salesperson&#8217;s opinion of how the frames looked?  Should I have brought along a helper to select my frames? Should I have just worn contacts and avoided this problem? Did I buy lady&#8217;s frames?</p>

<p><img src="/images/glasses.jpg" alt="george wearing lady's frames" title="Glasses" /></p>

<p>I think there&#8217;s a simple way to modify this process and I&#8217;m hoping some eyeglasses store has done or will do the following:</p>

<ol>
<li>buy a Mac with an iSight camera</li>
<li>start PhotoBooth</li>
<li>let customers take potential glasses to the Mac and collect photos of themselves trying on frames</li>
<li>review photos while wearing your old glasses</li>
</ol>

<p>I think this process would be beneficial even if your vision is good enough to see yourself in the mirror.  It&#8217;s nice to be able to quickly compare different frames in succession without having a pile of frames in front of you and swapping back and forth between frames.</p>

<p>There is also an opportunity to build a piece of software that would be a bit more specific than PhotoBooth and allow notes to be associated with photos (such as the model of the frame) and to organize photos by customer. I&#8217;ll put this idea on my list of software that seems interesting but will never be built.</p>

<p>Next time I buy glasses I think I&#8217;ll take along my laptop.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/08/16/an-idea-for-purveyors-of-eyeglasses/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/08/16/an-idea-for-purveyors-of-eyeglasses/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/08/16/an-idea-for-purveyors-of-eyeglasses/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[Innovation Through Simplification]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/337603044/" />
		<id>http://aarone.org/2008/07/16/innovation-through-simplification/</id>
		<updated>2008-07-17T21:36:17Z</updated>
		<published>2008-07-16T17:33:08Z</published>
		<category scheme="http://aarone.org" term="Development" />		<summary type="html"><![CDATA[I met Tim Bray today!  He&#8217;s a really nice guy and offered lots of great insight about a variety of topics.

One interesting thing that he mentioned was how innovative technologies can be derived by simplifying existing technologies.  This was the case in the derivation of XML from SGML. SGML predates the rise of [...]]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/07/16/innovation-through-simplification/"><![CDATA[<p>I met <a href="http://en.wikipedia.org/wiki/Tim_Bray">Tim Bray</a> today!  He&#8217;s a really nice guy and offered lots of great insight about a variety of topics.</p>

<p>One interesting thing that he mentioned was how innovative technologies can be derived by simplifying existing technologies.  This was the case in the derivation of XML from SGML. SGML predates the rise of the Internet but SGML was not widely adopted as a general markup language for the Internet due to its complexity. XML was created as a simple profile of SGML and its simplicity caused it to become so prolific.</p>

<p>This immediately reminded me of an <a href="http://acmqueue.com/modules.php?name=Content&amp;pa=showpage&amp;pid=337">ACM article I read</a> by former Googler <a href="http://adambosworth.net/">Adam Bosworth</a>.  He mentioned the problems of scaling traditional databases:</p>

<blockquote>
  <ol>
  <li><em>Have databases enabled people to harness Moore’s law in parallel?</em> This would mean that databases could scale more or less linearly to handle both the volume of the requests coming in and even the complexity. The answer is no. Things like ORDER BY, joins, subqueries, and many others make it almost impossible to push the query logic down to an arbitrary number of leaf nodes and simply sort/merge/aggregate the results. The easier way to limit queries to avoid this would be to limit all predicates to ones that can be computed against a single row at a time, at least where efficiency and scale are paramount. </li>
  </ol>
</blockquote>

<p>As I consider all of the available alternatives to relational databases (<a href="http://incubator.apache.org/couchdb/">CouchDB</a>, <a href="http://www.amazon.com/SimpleDB-AWS-Service-Pricing/b?ie=UTF8&amp;node=342335011">SimpleDB</a>, <a href="http://code.google.com/appengine/docs/datastore/">BigTable/AppEngine</a>, <a href="http://hadoop.apache.org/hbase/">HBase</a>, <a href="http://code.google.com/p/the-cassandra-project/">Cassandra</a>) I&#8217;m struck by how we could benefit from a simplified SQL dialect that would be more suitable for scaling across multiple machines (ie &#8216;horizontal scaling&#8217;).  I&#8217;m hoping a standards body takes this on in the near future but I fear that the problem will get worse before that happens.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/07/16/innovation-through-simplification/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/07/16/innovation-through-simplification/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/07/16/innovation-through-simplification/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[Too Big To Fail]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/336132867/" />
		<id>http://aarone.org/2008/07/14/too-big-to-fail/</id>
		<updated>2008-07-15T14:29:19Z</updated>
		<published>2008-07-14T07:32:04Z</published>
		<category scheme="http://aarone.org" term="Economy" />		<summary type="html"><![CDATA[So much of what I read about the &#8220;housing crisis&#8221; indicates that the problem is rooted in the &#8220;marketization&#8221; of the mortgage industry.  Mortgages were turned securities that were then traded in a market where the underlying risk of the securities was hidden.  In this explanation, the problem is that the free market [...]]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/07/13/too-big-to-fail/"><![CDATA[<p>So much of what I read about the &#8220;housing crisis&#8221; indicates that the problem is rooted in the &#8220;marketization&#8221; of the mortgage industry.  Mortgages were turned securities that were then traded in a market where the underlying risk of the securities was hidden.  In this explanation, the problem is that the free market ran amok: aggressive sales people sold poor saps mortgages they couldn&#8217;t afford and the market hid the underlying risk of those mortgages until defaults began.</p>

<p>This is all true but hides the role of the federal government in creating this problem. The federal government has kept interest rates artificially low since 2001 and this factor played a large role in inflating the real estate bubble.  The free market is not solely to blame: it was propped up by the Federal Reserve. It appears that the Fed has played a large role in creating this mess and they are now struggling to clean it up.  I have doubts that they&#8217;ll be successful.</p>

<p>The Fed intervened during the <a href="http://www.vanityfair.com/politics/features/2008/08/bear_stearns200808">collapse of Bear Stearns</a>.  It&#8217;s not clear what caused the run on Bear Stearns but when it happened, the Fed stepped in to rescue the company (at a great loss to Stearns shareholders).  The concern was that if Bear Stearns would fall, others would follow. I generally agreed with this action as many economist&#8217;s statements indicated that panic was spreading and could bring down more securities firms.</p>

<p>Now, we come to the collapse of Fannie Mae and Freddie Mac; a case where the government&#8217;s role in the &#8216;industry&#8217; has been disastrous. The government may have temporarily saved the two companies, but it&#8217;s clear that the current system of government subsidized mortgage companies should not continue to exist the way it does now.</p>

<p>Today, I heard <a href="http://www.bloomberg.com/apps/news?pid=20601087&amp;sid=a7hS5BuYqeR8&amp;refer=home">Jim Rodgers reaction to the Fed intervention</a>:</p>

<blockquote>
  <p>I don&#8217;t know where these guys get the audacity to take our money, taxpayer money, and buy stock in Fannie Mae,&#8221; Rogers, 65, said in an interview from Singapore. &#8220;So we&#8217;re going to bail out everybody else in the world. And it ruins the Federal Reserve&#8217;s balance sheet and it makes the dollar more vulnerable and it increases inflation.</p>
</blockquote>

<p>I agree.  The Fed&#8217;s interventionist ways cannot continue; something&#8217;s got to give.  Who&#8217;s next? <a href="http://www.bloomberg.com/apps/news?pid=20601087&amp;sid=aSx0z01vzYQY&amp;refer=home">Washington Mutual</a>, <a href="http://www.bloomberg.com/apps/news?pid=20601103&amp;sid=adyf_bZtTAbs&amp;refer=us">Lehman</a>, or <a href="http://www.bloomberg.com/apps/news?pid=20601109&amp;sid=a1liVM3tG3aI&amp;refer=home">Citigroup</a>, or something else?</p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/07/13/too-big-to-fail/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/07/13/too-big-to-fail/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/07/13/too-big-to-fail/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[Java Literally Sucks]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/283493177/" />
		<id>http://aarone.org/2008/05/04/java-literally-sucks/</id>
		<updated>2008-05-04T20:49:58Z</updated>
		<published>2008-05-04T20:48:15Z</published>
		<category scheme="http://aarone.org" term="Misc" />		<summary type="html"><![CDATA[I use Java at my day job and I find it frustratingly verbose and confining.  One thing that particularly bothers me is that I can&#8217;t easily represent literals.

Java adopted C&#8217;s convention for arrays:


    int[] x = {1,2,3}


which work fine if I want to use arrays; but I rarely use arrays because [...]]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/05/04/java-literally-sucks/"><![CDATA[<p>I use Java at my day job and I find it frustratingly verbose and confining.  One thing that particularly bothers me is that I can&#8217;t easily represent literals.</p>

<p>Java adopted C&#8217;s convention for arrays:</p>

<pre>
    int[] x = {1,2,3}
</pre>

<p>which work fine if I want to use arrays; but I rarely use arrays because I like OOP and I usually want to do things with my data structures like call methods on them.  So, I typically use a list which I could declare like this:</p>

<pre>
    List l = new ArrayList();
    l.add(1);
    l.add(2);
    l.add(3);
</pre>

<p>&#8230; but I don&#8217;t do that because I don&#8217;t like warning about not using generics properly so I usually declare the list in this even more verbose way:</p>

<pre>
    List&lt;Integer> l = new ArrayList&lt;Integer>();
    l.add(1);
    l.add(2);
    l.add(3);
</pre>

<p>The problem with both of these alternatives is that you really can&#8217;t &#8220;see&#8221; a list. You just see an allocation of a list container followed by three method calls. This really obscures the data structure in unnecessary logic.</p>

<p>Sometimes, in an effort to make my data structures less obscure, i create a list like this:</p>

<pre>
    List&lt;Integer> l = Arrays.asList(new Integer[]{1,2,3});
</pre>

<p>Of course, this isn&#8217;t really a good idea because that list is immutable but it looks like it&#8217;s mutable which is kind of scary and weird to anyone who might expect this list to support operations like &#8216;add&#8217; or &#8216;remove&#8217; defined in the List interface.</p>

<p>To get around that problem, I&#8217;ve seen code that looks like this:</p>

<pre>
    List&lt;Integer> l = new ArrayList&lt;Integer>(Arrays.asList(new Integer[]{1,2,3}));
</pre>

<p>which is, well, ridiculously awful.</p>

<p>This problem only gets worse when I want to do something outrageous like define a map for which I have no primitive like an array to help me out.  This leads to a long series of <code>put()</code> invocations which makes me a little nauseated.</p>

<p>The fundamental problem is that Java has no literal representation for basic data structures. I&#8217;d argue that this deficiency led to the proliferation of XML in Java projects for defining data.  I can&#8217;t think of another language whose users get so much pleasure out of something like Spring.  Ruby users wouldn&#8217;t understand why you&#8217;d want to model parts of your application in a markup language: why not just use Ruby?</p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/05/04/java-literally-sucks/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/05/04/java-literally-sucks/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/05/04/java-literally-sucks/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[Oskar and Mavis Play Tetherball]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/324872518/" />
		<id>http://aarone.org/2008/04/14/oskar-and-mavis-play-tetherball/</id>
		<updated>2008-07-02T12:56:02Z</updated>
		<published>2008-04-14T05:56:47Z</published>
		<category scheme="http://aarone.org" term="Misc" />		<summary type="html"><![CDATA[
]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/04/13/oskar-and-mavis-play-tetherball/"><![CDATA[<p><object width="425" height="318"><param name="movie" value="http://cdn.smugmug.com/ria/ShizVidz-2008050901.swf" /><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="flashVars" value="s=ZT0xJmk9MzI0MTEwMzA1Jms9ZWZnZWMmYT00OTcyNTYzX0I5alhBJnU9YWFyb25lZm9ydW0=" /><embed src="http://cdn.smugmug.com/ria/ShizVidz-2008050901.swf" flashVars="s=ZT0xJmk9MzI0MTEwMzA1Jms9ZWZnZWMmYT00OTcyNTYzX0I5alhBJnU9YWFyb25lZm9ydW0=" width="425" height="318" type="application/x-shockwave-flash" allowFullScreen="true" allowScriptAccess="always"></embed></object></p>
]]></content>
<link href="http://aarone.org/movies/oskar-and-mavis/oskar-and-mavis.mov" rel="enclosure" length="89" type="video/quicktime" />
<link href="http://aarone.org/movies/oskar-and-mavis/oskar%20and%20mavis.mov" rel="enclosure" length="93" type="video/quicktime" />
		<link rel="replies" type="text/html" href="http://aarone.org/2008/04/13/oskar-and-mavis-play-tetherball/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/04/13/oskar-and-mavis-play-tetherball/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/04/13/oskar-and-mavis-play-tetherball/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[SmugMugExport 1.0.6]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/264778145/" />
		<id>http://aarone.org/2008/04/05/smugmugexport-106/</id>
		<updated>2008-04-05T23:03:14Z</updated>
		<published>2008-04-05T23:02:29Z</published>
		<category scheme="http://aarone.org" term="Projects" />		<summary type="html"><![CDATA[I just released SmugMugExport 1.0.6 which provides support for new SmugMug security features and also allows you to edit albums.  Check it out!
]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/04/05/smugmugexport-106/"><![CDATA[<p>I just released <a href="http://aarone.org/smugmugexport">SmugMugExport 1.0.6</a> which provides support for new SmugMug <a href="http://www.dgrin.com/showthread.php?t=83919">security features</a> and also allows you to edit albums.  <a href="http://aarone.org/smugmugexport">Check it out!</a></p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/04/05/smugmugexport-106/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/04/05/smugmugexport-106/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/04/05/smugmugexport-106/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[SmugMugExport 1.0.5 Released]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/244532835/" />
		<id>http://aarone.org/2008/03/02/smugmugexport-105-released/</id>
		<updated>2008-03-02T23:37:47Z</updated>
		<published>2008-03-02T19:37:27Z</published>
		<category scheme="http://aarone.org" term="Projects" /><category scheme="http://aarone.org" term="" />		<summary type="html"><![CDATA[I just released SmugMugExport 1.0.5.  The big new feature is Growl support.  The release also fixes some bugs.
]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/03/02/smugmugexport-105-released/"><![CDATA[<p>I just released <a href="http://aarone.org/smugmugexport">SmugMugExport 1.0.5</a>.  The big new feature is Growl support.  The release also fixes some bugs.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/03/02/smugmugexport-105-released/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/03/02/smugmugexport-105-released/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/03/02/smugmugexport-105-released/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[More Hillaryous Videos]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/256128929/" />
		<id>http://aarone.org/2008/02/21/more-hillaryous-videos/</id>
		<updated>2008-03-22T17:24:57Z</updated>
		<published>2008-02-21T03:12:53Z</published>
		<category scheme="http://aarone.org" term="Misc" /><category scheme="http://aarone.org" term="" />		<summary type="html"><![CDATA[I take back all those things I said about Hillary being out of touch.



found at Fake Steve
]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/02/20/more-hillaryous-videos/"><![CDATA[<p>I take back all those things I said about Hillary being out of touch.</p>

<p><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/5FvyGydc8no&amp;rel=1&amp;border=0"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/5FvyGydc8no&amp;rel=1&amp;border=0" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355" /></object></p>

<p>found at <a href="http://fakesteve.blogspot.com/2008/02/hillary-rocks.html">Fake Steve</a></p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/02/20/more-hillaryous-videos/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/02/20/more-hillaryous-videos/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/02/20/more-hillaryous-videos/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[Hillaryous]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/220568162/" />
		<id>http://aarone.org/2008/01/21/hillaryous/</id>
		<updated>2008-01-21T21:08:22Z</updated>
		<published>2008-01-21T16:52:58Z</published>
		<category scheme="http://aarone.org" term="Politics" /><category scheme="http://aarone.org" term="" />		<summary type="html"><![CDATA[

Found that at Maud Newton&#8217;s blog.
]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/01/21/hillaryous/"><![CDATA[<p><embed src="http://services.brightcove.com/services/viewer/federated_f8/271557392" bgcolor="#FFFFFF" flashVars="videoId=1377935786&amp;playerId=271557392&amp;viewerSecureGatewayURL=https://services.brightcove.com/services/amfgateway&amp;servicesURL=http://services.brightcove.com/services&amp;cdnURL=http://admin.brightcove.com&amp;domain=embed&amp;autoStart=false&amp;" base="http://admin.brightcove.com" name="flashObj" width="486" height="412" seamlesstabbing="false" type="application/x-shockwave-flash" swLiveConnect="true" pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash"></embed></p>

<p>Found that at <a href="http://maudnewton.com/blog/?p=8305">Maud Newton&#8217;s blog</a>.</p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/01/21/hillaryous/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/01/21/hillaryous/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/01/21/hillaryous/</feedburner:origLink></entry>
		<entry>
		<author>
			<name>Aaron</name>
					</author>
		<title type="html"><![CDATA[PyXML on Leopard]]></title>
		<link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/aarone/~3/218900873/" />
		<id>http://aarone.org/2008/01/18/pyxml-on-leopard/</id>
		<updated>2008-01-18T14:30:08Z</updated>
		<published>2008-01-17T22:24:46Z</published>
		<category scheme="http://aarone.org" term="Development" /><category scheme="http://aarone.org" term="" />		<summary type="html"><![CDATA[I attempted to install PyXML on Mac OS X 10.5 today and ran into a problem: I was unable to load any of the PyXML modules:



>>> from xml import xpath
Traceback (most recent call last):
  File "", line 1, in 
ImportError: cannot import name xpath`




So, the problem originates from this nasty hack that allows PyXML [...]]]></summary>
		<content type="html" xml:base="http://aarone.org/2008/01/17/pyxml-on-leopard/"><![CDATA[<p>I attempted to install <a href="http://pyxml.sourceforge.net/">PyXML</a> on Mac OS X 10.5 today and ran into a problem: I was unable to load any of the PyXML modules:</p>

<pre>
<code>
>>> from xml import xpath
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: cannot import name xpath`
</module></stdin></code></pre>

<p></p>

<p>So, the problem originates from this <a href="http://www.amk.ca/diary/2003/03/pythons__xmlplus_hack.html">nasty hack</a> that allows PyXML to contribute modules to Python&#8217;s standard xml namespace.</p>

<p>On Leopard, simply installing PyXML will not make the PyXML modules magically appear in the xml namespace as on other platforms. If you take a look at:</p>

<p><code>/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/xml/__init__.py</code></p>

<p>you&#8217;ll see why:</p>

<pre>
<code>
# only prefer _xmlplus if the environment variable PY_USE_XMLPLUS is defined
if os.environ.has_key('PY_USE_XMLPLUS'):`
</code>
</pre>

<p>So, the solution is to set that environment variable and your PyXML packages will all magically appear. I think this is new to 10.5 because I didn&#8217;t find any <a href="http://www.google.com/search?rls=en-us&amp;q=PY_USE_XMLPLUS&amp;ie=UTF-8&amp;oe=UTF-8">links from Google</a> about it (just the Darwin source code for <code>__init__.py</code>).</p>
]]></content>
		<link rel="replies" type="text/html" href="http://aarone.org/2008/01/17/pyxml-on-leopard/#comments" thr:count="0" />
		<link rel="replies" type="application/atom+xml" href="http://aarone.org/2008/01/17/pyxml-on-leopard/feed/atom/" thr:count="0" />
		<thr:total>0</thr:total>
	<feedburner:origLink>http://aarone.org/2008/01/17/pyxml-on-leopard/</feedburner:origLink></entry>
	</feed><!-- Dynamic Page Served (once) in 0.420 seconds --><!-- Cached page served by WP-Cache -->
