<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.2.1" -->
<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/"
	>

<channel>
	<title>Better Living through Software</title>
	<link>http://www.netcrucible.com/blog</link>
	<description>The software industry from a rational perspective</description>
	<pubDate>Mon, 12 May 2008 18:05:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>
	<language>en</language>
			<item>
		<title>Earthquake in Chengdu and Mianyang China</title>
		<link>http://www.netcrucible.com/blog/2008/05/12/earthquake-in-chengdu-and-mianyang-china/</link>
		<comments>http://www.netcrucible.com/blog/2008/05/12/earthquake-in-chengdu-and-mianyang-china/#comments</comments>
		<pubDate>Mon, 12 May 2008 17:52:08 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[China]]></category>

		<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/05/12/earthquake-in-chengdu-and-mianyang-china/</guid>
		<description><![CDATA[I woke up to the sound of CCTV News blaring the tidings that a magnitude 7.8 earthquake just hit the most populated area of China.  Most westerners have heard of major Chinese cities like Shanghai, Beijing, Hong Kong, Guangzhou &#8212; and even Nanjing, Hangzhou, Suzhou, and Shenzhen.  But few know about Chongqing; the biggest city in [...]]]></description>
			<content:encoded><![CDATA[<p>I woke up to the sound of CCTV News blaring the tidings that a magnitude 7.8 earthquake just hit the most populated area of China.  Most westerners have heard of major Chinese cities like Shanghai, Beijing, Hong Kong, Guangzhou &#8212; and even Nanjing, Hangzhou, Suzhou, and Shenzhen.  But few know about Chongqing; the biggest city in China, with more than 30 million people.</p>
<p>The earthquake was centered on <a href="http://earthquake.usgs.gov/eqcenter/shakemap/global/shake/2008ryan/">a line between Chengdu and Mianyang</a> in Sichuan province, just outside Chongqing.  This is an area with relatively modest foreign influence, but massive population.  Because of its central position between north and south, as well as access to cheap hydroelectric power, Microsoft is building a massive data center in Chengdu, a joint venture with HP billed as the &#8220;largest high-availability data center in Asia&#8221;.</p>
<p>Scoble is reporting that several <a href="http://scobleizer.com/2008/05/12/quake-in-china/">people twittered the earthquake</a> as it happened.  This is no surprise, since roughly 1 out of every 5 people in China would be able to feel an earthquake of that magnitude centered in Chengdu.  We are talking about a population the size of the U.S. population who would feel the earthquake, even if you assume that the north and south were completely unaffected.  There would be hundreds or thousands of English-speaking expats in Shanghai who could feel it.</p>
<p>It&#8217;s silly in the extreme to act like twitter is somehow breaking news, though.  Masses of people within China found out about the earthquake as it was happening via messages from friends on QQ (which is massively more popular than twitter), and CCTV carried the news almost instantly.  I suppose it&#8217;s cute that some English-speaking expats using echo-chamber technology were able to *also* report the event on twitter, but even the tweetscan example seems a bit lame to me.  When I search for tweets with the word &#8220;地震&#8221;, tweetscan gives me nothing &#8212; apparently tweetscan doesn&#8217;t care about Chinese.  Perhaps this explains why Scoble and BBC are reporting only English tweets from China.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/05/12/earthquake-in-chengdu-and-mianyang-china/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Building a Startup in a Week</title>
		<link>http://www.netcrucible.com/blog/2008/04/25/building-a-startup-in-a-week/</link>
		<comments>http://www.netcrucible.com/blog/2008/04/25/building-a-startup-in-a-week/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 17:34:38 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[possibilities]]></category>

		<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/04/25/building-a-startup-in-a-week/</guid>
		<description><![CDATA[My co-worker, Kevin, recently filmed the pilot episode of a new reality series on &#8220;A Startup in a Week&#8221;.  A team of startup guys, including Adam Loving, built a Facebook app to raise money for good causes like building a school in Cambodia.
There are 5 episodes, and some fun drama &#8212; debates over how to monetize the app, [...]]]></description>
			<content:encoded><![CDATA[<p>My co-worker, Kevin, recently filmed the pilot episode of a new reality series on &#8220;A Startup in a Week&#8221;.  A team of startup guys, including <a href="http://adamloving.com">Adam Loving</a>, built a Facebook app to raise money for good causes like building a school in Cambodia.</p>
<p>There are 5 episodes, and some fun drama &#8212; debates over how to monetize the app, some politics with the non-profit, and so on.  But the team is pretty productive.  The designer is amazingly fast with Maya, and Adam cranks out code in no time.  There was no staging here; this was all done in an actual week with no collusion beforehand.</p>
<p>I&#8217;ve embedded episode 4 here, which has links back to episodes 1-3.  You should probably <a href="http://adamloving.com/">start at episode 1; over on Adam&#8217;s blog</a>.  Each episode goes pretty quickly.</p>
<p><iframe scrolling="no" width="320" frameBorder="0" src="http://visitmix.com/blogs/kleneway/1049/player/" height="325"></iframe><br />
<a href="http://visitmix.com/blogs/kleneway/A-Startup-A-Week-Ep-1-Day-4/">A Startup A Week - Episode 1 Day 4</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/04/25/building-a-startup-in-a-week/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Processing iTunes Library with LINQ</title>
		<link>http://www.netcrucible.com/blog/2008/04/11/processing-itunes-library-with-linq/</link>
		<comments>http://www.netcrucible.com/blog/2008/04/11/processing-itunes-library-with-linq/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 04:50:12 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/04/11/processing-itunes-library-with-linq/</guid>
		<description><![CDATA[Fresh from the inaugural cabal of &#8216;08, I wanted to do some automated processing tasks on my iTunes library.&#160; I was delighted to see how easy it is to do this using LINQ to XML.
The iTunes library XML file is a rather awkward format.&#160; The semantics are dependant on document node ordering, which is just [...]]]></description>
			<content:encoded><![CDATA[<p>Fresh from the inaugural cabal of &#8216;08, I wanted to do some automated processing tasks on my iTunes library.&#160; I was delighted to see how easy it is to do this using LINQ to XML.</p>
<p>The iTunes library XML file is a rather awkward format.&#160; The semantics are dependant on document node ordering, which is just unwieldy.&#160; You can <a href="http://www.robertprice.co.uk/robblog/archive/2007/4/Python_XML_and_iTunes.shtml">see a sample here</a>.&#160; In order to make the file more easy to query, I transformed it to a format like this:</p>
<pre class="code"><span style="color: blue">&lt;</span><span style="color: #a31515">song</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TrackID</span><span style="color: blue">&gt;</span>1999<span style="color: blue">&lt;/</span><span style="color: #a31515">TrackID</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;</span>Classid<span style="color: blue">&lt;/</span><span style="color: #a31515">Name</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Artist</span><span style="color: blue">&gt;</span>The Ace Of Clubs<span style="color: blue">&lt;/</span><span style="color: #a31515">Artist</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">AlbumArtist</span><span style="color: blue">&gt;</span>The Ace Of Clubs (Luke Vibert)<span style="color: blue">&lt;/</span><span style="color: #a31515">AlbumArtist</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Album</span><span style="color: blue">&gt;</span>Benefist<span style="color: blue">&lt;/</span><span style="color: #a31515">Album</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Genre</span><span style="color: blue">&gt;</span>Acid Disco<span style="color: blue">&lt;/</span><span style="color: #a31515">Genre</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Kind</span><span style="color: blue">&gt;</span>MPEG audio file<span style="color: blue">&lt;/</span><span style="color: #a31515">Kind</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Size</span><span style="color: blue">&gt;</span>9255508<span style="color: blue">&lt;/</span><span style="color: #a31515">Size</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TotalTime</span><span style="color: blue">&gt;</span>385462<span style="color: blue">&lt;/</span><span style="color: #a31515">TotalTime</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TrackNumber</span><span style="color: blue">&gt;</span>4<span style="color: blue">&lt;/</span><span style="color: #a31515">TrackNumber</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Year</span><span style="color: blue">&gt;</span>2007<span style="color: blue">&lt;/</span><span style="color: #a31515">Year</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">DateModified</span><span style="color: blue">&gt;</span>2007-08-31T08:37:18Z<span style="color: blue">&lt;/</span><span style="color: #a31515">DateModified</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">DateAdded</span><span style="color: blue">&gt;</span>2008-03-09T18:37:50Z<span style="color: blue">&lt;/</span><span style="color: #a31515">DateAdded</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">BitRate</span><span style="color: blue">&gt;</span>192<span style="color: blue">&lt;/</span><span style="color: #a31515">BitRate</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">SampleRate</span><span style="color: blue">&gt;</span>44100<span style="color: blue">&lt;/</span><span style="color: #a31515">SampleRate</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">SortAlbumArtist</span><span style="color: blue">&gt;</span>Ace Of Clubs (Luke Vibert)<span style="color: blue">&lt;/</span><span style="color: #a31515">SortAlbumArtist</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">SortArtist</span><span style="color: blue">&gt;</span>Ace Of Clubs<span style="color: blue">&lt;/</span><span style="color: #a31515">SortArtist</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">PersistentID</span><span style="color: blue">&gt;</span>76F0C7752DA0CE57<span style="color: blue">&lt;/</span><span style="color: #a31515">PersistentID</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">TrackType</span><span style="color: blue">&gt;</span>File<span style="color: blue">&lt;/</span><span style="color: #a31515">TrackType</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">Location</span><span style="color: blue">&gt;
    </span>file://localhost/C:/data/music/Copied/copied%2009-04-07/luke%20viber
    t%20as%20ace%20of%20clubs%20-%20benefist/The%20Ace%20Of%20Clubs%20-%2004%20-%20C
    lassid.mp3
  <span style="color: blue">&lt;/</span><span style="color: #a31515">Location</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">FileFolderCount</span><span style="color: blue">&gt;</span>-1<span style="color: blue">&lt;/</span><span style="color: #a31515">FileFolderCount</span><span style="color: blue">&gt;
  &lt;</span><span style="color: #a31515">LibraryFolderCount</span><span style="color: blue">&gt;</span>-1<span style="color: blue">&lt;/</span><span style="color: #a31515">LibraryFolderCount</span><span style="color: blue">&gt;
&lt;/</span><span style="color: #a31515">song</span><span style="color: blue">&gt;</span></pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>using the following LINQ code:</p>
<pre class="code"><span style="color: blue">var </span>rawsongs = <span style="color: blue">from </span>song <span style="color: blue">in </span>loaded.Descendants(<span style="color: #a31515">&quot;plist&quot;</span>).Descendants(<span style="color: #a31515">&quot;dict&quot;</span>).Descendants(<span style="color: #a31515">&quot;dict&quot;</span>).Descendants(<span style="color: #a31515">&quot;dict&quot;</span>)
        <span style="color: blue">select new </span><span style="color: #2b91af">XElement</span>(<span style="color: #a31515">&quot;song&quot;</span>,
            <span style="color: blue">from </span>key <span style="color: blue">in </span>song.Descendants(<span style="color: #a31515">&quot;key&quot;</span>)
            <span style="color: blue">select new </span><span style="color: #2b91af">XElement</span>(
                ((<span style="color: blue">string</span>)key).Replace(<span style="color: #a31515">&quot; &quot;</span>,<span style="color: #a31515">&quot;&quot;</span>),
                (<span style="color: blue">string</span>)(<span style="color: #2b91af">XElement</span>)key.NextNode)
                );

<span style="color: blue">var </span>songs = <span style="color: blue">from </span>song <span style="color: blue">in </span>rawsongs <span style="color: blue">where </span>song.Element(<span style="color: #a31515">&quot;Location&quot;</span>) != <span style="color: blue">null select </span>song;</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Note that the code doesn&#8217;t actually read the file until I query; it transforms in a streaming manner.&#160; Once I created the streaming filter, I could run queries like the following.</p>
<p>Show all protected (DRMd) songs:</p>
<pre class="code"><span style="color: blue">from </span>song <span style="color: blue">in </span>songs <span style="color: blue">where </span>song.Element(<span style="color: #a31515">&quot;Protected&quot;</span>) != <span style="color: blue">null select </span>song</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Count the number of each type of song:</p>
<pre class="code"><span style="color: blue">from </span>song <span style="color: blue">in </span>songs
<span style="color: blue">group </span>song <span style="color: blue">by </span>(<span style="color: blue">string</span>)song.Element(<span style="color: #a31515">&quot;Kind&quot;</span>)
  <span style="color: blue">into </span>MyGroup
  <span style="color: blue">select new </span>{ Key = MyGroup.Key, Count = MyGroup.Count() }</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>Count songs by rating:</p>
<pre class="code"><span style="color: blue">from </span>song <span style="color: blue">in </span>songs
<span style="color: blue">group </span>song <span style="color: blue">by </span>(<span style="color: blue">string</span>)song.Element(<span style="color: #a31515">&quot;Rating&quot;</span>)
  <span style="color: blue">into </span>MyGroup
  <span style="color: blue">select new </span>{ Key = MyGroup.Key, Count = MyGroup.Count() }</pre>
<p>From here it is trivial to do things like:</p>
<ul>
<li>Eliminate duplicate files</li>
<li>Mirror ratings from the library to the file metadata</li>
<li>Create playlists with protected files to &quot;archive&quot; them</li>
<li>Find files which aren&#8217;t matched across playlist and hard drive</li>
</ul>
<p>From an awkward file format to queries that are as easy as cake.&#160; LINQ to XML is pretty sweet!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/04/11/processing-itunes-library-with-linq/feed/</wfw:commentRss>
		</item>
		<item>
		<title>More on &#34;Cultural Genocide&#34; in Tibet</title>
		<link>http://www.netcrucible.com/blog/2008/04/03/more-on-cultural-genocide-in-tibet/</link>
		<comments>http://www.netcrucible.com/blog/2008/04/03/more-on-cultural-genocide-in-tibet/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 03:21:33 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[China]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/04/03/more-on-cultural-genocide-in-tibet/</guid>
		<description><![CDATA[A number of people have asked me for more details about the situation in Tibet.&#160; I&#8217;ve realized that I have a tendency to excoriate the hypocrisy in the press without necessarily offering much additional in the way of compensatory education.&#160; So I&#8217;d like to remedy things by explaining the facts in more detail.
First, read this [...]]]></description>
			<content:encoded><![CDATA[<p>A number of people have asked me for more details about the situation in Tibet.&#160; I&#8217;ve realized that I have a tendency to excoriate the hypocrisy in the press without necessarily offering much additional in the way of compensatory education.&#160; So I&#8217;d like to remedy things by explaining the facts in more detail.</p>
<p>First, read this excellent paper from UCLA: &quot;<a href="http://www.international.ucla.edu/article.asp?parentid=2732">How Repressive is the Chinese Government in Tibet?</a>&quot;.&#160; I find the analysis to still be relatively biased toward a western viewpoint, but far more factual than the typical newspaper report.&#160; You should definitely read it, but I&#8217;ll highlight some of the key facts:</p>
<ol>
<li>Population of ethnic Tibetans has grown dramatically during the period of time when they were supposedly being swamped by Han Chinese.</li>
<li>Chinese government allows Tibetans to have 4+ children, while Han Chinese are permitted only 1 child.</li>
<li>Han population live almost entirely in the cities, working reconstruction contracts, and tend to get the hell out of town as soon as they can.</li>
<li>While Han Chinese culture may be influencing Tibetan youngsters to abandon their traditions (which are not that old or traditional, BTW); western culture is influencing them more.</li>
</ol>
<p>The paper concludes that Tibetans may be suffering from &quot;social and economic marginalization&quot;, but there is no concerted effort to commit cultural or ethnic genocide, and in fact the Chinese government is engaged in what amounts to an affirmative action program to attempt to offset some of this marginalization.</p>
<p>I largely agree with this conclusion.&#160; When you have a nation with 1 billion Han Chinese and 6 million Tibetans, it&#8217;s going to be very difficult for Tibetans to gain an economic or cultural edge.&#160; Han Chinese culture is chauvinistic.&#160; Nothing malicious about it; that&#8217;s just the way it is.</p>
<p>Furthermore, the efforts of the Chinese government to lift Tibetans seem to me to be more honest and consistent than the efforts of U.S. in affirmative action.&#160; A far larger percentage of black and latino men in America are in prison today than are Tibetan men in prison in China.&#160; The rabble-rousers would like you to believe that Tibetans in China are treated like Rodney King, but the media were only able to capture footage of Tibetans massacring innocent Chinese women and children.</p>
<p>The &quot;religious freedom&quot; arguments are also hollow.&#160; One thing people don&#8217;t realize is that there is no right of free assembly in China, and religions are strictly regulated by the government.&#160; Trust me; these restrictions are strongly supported by the Han Chinese, and they would vote the restrictions back in if they were relaxed.&#160; That&#8217;s just the way it is.</p>
<p>Take the Christian Church in China, for example.&#160; The government stuffed the church with Cardinals selected by the communist party.&#160; The <a href="http://www.washingtonpost.com/wp-dyn/content/article/2006/05/04/AR2006050400311.html">pope excommunicated the Cardinals</a>.&#160; The Cardinals happily continue to serve as heads of the church.&#160; This is how religions work in China.&#160; But this is normal.&#160; The Tibetan monks have more autonomy than any other religious group in China.</p>
<p>It&#8217;s interesting, isn&#8217;t it?&#160; George Bush ignores the situation of black and latino people in America, while claiming that the less-severe marginalization of Tibetans is a &quot;human rights&quot; issue.&#160; He doesn&#8217;t say a word about the Christian church in China being controlled by the government, but demands that the religious dictator head of a buddhist death cult be given sovereignty over the central government.&#160; And he argues that the Tibetans are being too heavily influenced by Chinese culture, while the Tibetan exile government has become essentially a puppet and mouthpiece of the western &quot;cult of liberty&quot; and a pawn for the neocons C.I.A.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/04/03/more-on-cultural-genocide-in-tibet/feed/</wfw:commentRss>
		</item>
		<item>
		<title>China, Wikipedia, and Apple Pie</title>
		<link>http://www.netcrucible.com/blog/2008/04/03/china-wikipedia-and-apple-pie/</link>
		<comments>http://www.netcrucible.com/blog/2008/04/03/china-wikipedia-and-apple-pie/#comments</comments>
		<pubDate>Fri, 04 Apr 2008 02:17:47 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[China]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/04/03/china-wikipedia-and-apple-pie/</guid>
		<description><![CDATA[I don&#8217;t know how many times I&#8217;ve seen some clever westerner use Wikipedia as an example of how the poor Chinese people are denied happiness by a censorious government.  CNET is currently propagating the meme, claiming that &#8220;Wikipedia missing China&#8217;s voice&#8220;.
That&#8217;s like looking at the server logs for the Milwaukee Herald and concluding that &#8220;Chinese [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know how many times I&#8217;ve seen some clever westerner use Wikipedia as an example of how the poor Chinese people are denied happiness by a censorious government.  CNET is currently propagating the meme, claiming that &#8220;<a href="http://www.cnet.com/8301-13908_1-9905964-59.html?tag=bl">Wikipedia missing China&#8217;s voice</a>&#8220;.</p>
<p>That&#8217;s like looking at the server logs for the Milwaukee Herald and concluding that &#8220;Chinese don&#8217;t have newspapers, since not many people from China read this paper&#8221;.  The fact is, millions of people in China <em>do</em> create, update, and read articles in the Chinese equivalent of Wikipedia: <a href="http://baike.baidu.com/">Baidu Baike</a>.  It seems rather arrogant and chauvinistic for western journalists to assume that Chinese people would prefer to contribute to an English-language encyclopedia hosted in California.  Baike is Chinese-language; and most Chinese people are very chauvinistic about their <em>own</em> language.</p>
<p>It reminds me of the people who did searches for &#8220;tiananmen&#8221; on Chinese search engines and were surprised to find that the pictures didn&#8217;t show army tanks as they do on U.S. search engines.  (Our own dear Scoble even made this error of extrapolation).  What they failed to realize was that Chinese people call it &#8220;天安门&#8221;, and the only people who would be writing about &#8220;tiananmen&#8221; are kids from Canada and San Francisco.  When you search for &#8220;天安门&#8221; on the search engines in China *or* U.S., you see something very different from what&#8217;s been astroturfed by the preachy press.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/04/03/china-wikipedia-and-apple-pie/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Witch Hunt in Detroit</title>
		<link>http://www.netcrucible.com/blog/2008/03/24/witch-hunt-in-detroit/</link>
		<comments>http://www.netcrucible.com/blog/2008/03/24/witch-hunt-in-detroit/#comments</comments>
		<pubDate>Tue, 25 Mar 2008 02:30:47 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[signifyin]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/03/24/witch-hunt-in-detroit/</guid>
		<description><![CDATA[The politicians in Detroit are now charging Mayor Kwame Kilpatrick with multiple felonies, for lying in a civil trial about an affair he had.  Seriously?  Doesn&#8217;t the political establishment in the nation&#8217;s worst economy have anything better to do?  Kwame may be a rogue and liar, but he&#8217;s practically a saint in comparison to Coleman [...]]]></description>
			<content:encoded><![CDATA[<p>The politicians in Detroit are now <a href="http://www.cnn.com/2008/POLITICS/03/24/kilpatrick.investigation/index.html">charging Mayor Kwame Kilpatrick with multiple felonies</a>, for lying in a civil trial about an affair he had.  Seriously?  Doesn&#8217;t the political establishment in the nation&#8217;s worst economy have anything better to do?  Kwame may be a rogue and liar, but he&#8217;s practically a saint in comparison to Coleman Young.</p>
<p>These are strange times indeed.  New York&#8217;s governor is black, blind, a drug user <em>and</em> an adulterer &#8212; a step up from a guy who paid (way too much) for sex.  But being black and lying about your personal life in a civil trial disqualifies you from being even mayor of Detroit.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/03/24/witch-hunt-in-detroit/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Chinese Censors</title>
		<link>http://www.netcrucible.com/blog/2008/03/16/chinese-censors/</link>
		<comments>http://www.netcrucible.com/blog/2008/03/16/chinese-censors/#comments</comments>
		<pubDate>Mon, 17 Mar 2008 03:10:02 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[China]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/03/16/chinese-censors/</guid>
		<description><![CDATA[This weekend, I awakened to coverage on CNN of &#8220;violence in Tibet&#8221;.  The reporters breathlessly informed me that China has a history of censorship, that CNN was intrepidly on the case, and that citizens inside China were &#8220;probably&#8221; being prevented from seeing the footage.  The reporter gravely remarked, &#8220;but a picture is worth a thousand [...]]]></description>
			<content:encoded><![CDATA[<p>This weekend, I awakened to coverage on CNN of &#8220;violence in Tibet&#8221;.  The reporters breathlessly informed me that China has a history of censorship, that CNN was intrepidly on the case, and that citizens inside China were &#8220;probably&#8221; being prevented from seeing the footage.  The reporter gravely remarked, &#8220;but a picture is worth a thousand words&#8221;.</p>
<p>Indeed it is.  The footage they are running is clearly stamped CCTV4, and could easily be seen by tuning in to Chinese state-run media.  Furthermore, the pictures show a bunch of &#8220;peaceful&#8221; monks torching ethnic Chinese shopkeepers&#8217; buildings and perpetrating violence.  While CNN, MSNBC, and all the other Western media recklessly implied that Chinese thugs were committing genocide on poor, peaceful monks, they were unable to produce a single photograph or film supporting such a baseless claim.</p>
<p>So why were they unable to show any film of Chinese violence against the &#8220;peaceful&#8221; monks?  Tibet is brimming with Canadians and San Franciscans; no doubt they would have captured any such violence.</p>
<p>The lack of actual evidence doesn&#8217;t stop the western media from making allegations, though.  Today they are running a story about China blocking YouTube &#8212; the clear accusation being that there is something incriminating on YouTube, which China doesn&#8217;t want citizens to see.  What a load of crap.  If there is incriminating footage on YouTube, why are the western media not showing it?  It&#8217;s true that there are hundreds of anti-China propaganda pieces created by people in western countries, but not a single piece of actual footage from Tibet that could be remotely construed a &#8220;smoking gun&#8221; with respects to the current violence being perpetrated by the monks.</p>
<p>So far, the IOC has stated that it doesn&#8217;t intend to withdraw it&#8217;s endorsement of China for the 2008 Olympics.  Gee, how gracious!  I hope that the next time the muslims in Malaysia riot and slaughter Chinese shopkeepers (a regular occurrence), the IOC is also so gracious!  Next time Chinese shopkeepers are slaughtered in Xinjian province, or some remote part of Indonesia or Philippines, will we have enough compassion in our hearts to still let them host the Olympics?  Clearly every instance of monks murdering shopkeepers is reason for DEEP distrust of the central Chinese government!</p>
<p>It&#8217;s crazy, really.  None of the western media are asking why it&#8217;s OK for &#8220;peaceful&#8221; monks to murder innocent Chinese shopkeepers.  The Dalai Lama has spoken out and has essentially said that &#8220;it&#8217;s OK to murder Chinese shopkeepers because they are making all the money and controlling the local economy&#8221;.  He calls it &#8220;cultural genocide&#8221;.  I guess the <strong><u>actual</u></strong> murder of shopkeepers is morally equivalent to theoretical &#8221;cultural&#8221; genocide.  Why does the West keep giving this guy a pass?  He ran one of the world&#8217;s last remaining religious dictatorships, practiced slavery, and now refuses to denounce outright murder by his army of terrorist thugs.  And we allow addle-brained morons like Richard Gere to funnel him money and attempt to reinstall him as supreme dictator?</p>
<p>Now, I have no major beef with the practitioners of this modern mishmash of religion.  But for heaven&#8217;s sake keep it in the temple.  When monks start murdering civilians, preaching civil war and revolution, and attempting to install religious dictatorships, they shouldn&#8217;t be surprised when the rest of the world starts treating them as troublemakers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/03/16/chinese-censors/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Repaved My Laptop</title>
		<link>http://www.netcrucible.com/blog/2008/01/25/repaved-my-laptop/</link>
		<comments>http://www.netcrucible.com/blog/2008/01/25/repaved-my-laptop/#comments</comments>
		<pubDate>Sat, 26 Jan 2008 05:10:48 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2008/01/25/repaved-my-laptop/</guid>
		<description><![CDATA[12 hours later, the repaving process is mostly complete.&#160; My Tecra M7 with Vista is running the best it has in a long time; I&#8217;m glad I did it.&#160; It&#8217;s been nearly 2 years since I paved; luckily I kept all my data on a separate drive, so I could fully format the system drive.
Here [...]]]></description>
			<content:encoded><![CDATA[<p>12 hours later, the repaving process is mostly complete.&#160; My Tecra M7 with Vista is running the best it has in a long time; I&#8217;m glad I did it.&#160; It&#8217;s been nearly 2 years since I paved; luckily I kept all my data on a separate drive, so I could fully format the system drive.</p>
<p>Here is the list of the software I installed, in rough order.&#160; Probably missing some things.</p>
<ol>
<li>Windows Vista Enterprise</li>
<li>Toshiba Drivers</li>
<li>Microsoft Office 2007</li>
<li>Antivirus</li>
<li>VPN</li>
<li>Visual Studio 2008</li>
<li>Internet Explorer 8</li>
<li>Safari Beta 3</li>
<li>Opera 9.5 beta</li>
<li>Firefox 3 beta 2</li>
<li>IronPython</li>
<li>F#</li>
<li>Office Communicator</li>
<li>ISA Firewall Client</li>
<li>WinZip</li>
<li>Flash 9, Acrobat 8</li>
<li>Silverlight 2.0</li>
<li>Expression Blend 2 Preview</li>
<li>MagicFolder</li>
<li>FileZilla</li>
<li>Windows Live Messenger</li>
<li>Windows Live Writer</li>
<li>Virtual PC 2007</li>
<li>Getting Things Done</li>
<li>Adobe Premiere</li>
<li>Adobe Photoshop</li>
<li>iTunes</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2008/01/25/repaved-my-laptop/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Playing With F#</title>
		<link>http://www.netcrucible.com/blog/2007/12/30/playing-with-f/</link>
		<comments>http://www.netcrucible.com/blog/2007/12/30/playing-with-f/#comments</comments>
		<pubDate>Sun, 30 Dec 2007 18:56:13 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2007/12/30/playing-with-f/</guid>
		<description><![CDATA[So I decided to use F# (basically OCaml) instead of scheme for the pure functional version of my puzzle solver.&#160; I wish I had started with F# in the first place.&#160; What a gorgeous language!&#160; Implementing in F# showed me what I was doing wrong in the C# version, and now I can implement the [...]]]></description>
			<content:encoded><![CDATA[<p>So I decided to use F# (basically OCaml) instead of scheme for the pure functional version of <a href="http://www.netcrucible.com/blog/2007/12/29/two-tricky-routines-using-c-30/">my puzzle solver</a>.&nbsp; I wish I had started with F# in the first place.&nbsp; What a gorgeous language!&nbsp; Implementing in F# showed me what I was doing wrong in the C# version, and now I can implement the C# version without the yield keyword.</p>
<p>Here is the complete rotate routine in F#.</p>
<pre class="code"><span style="color: rgb(0,0,255)">let</span> cards = [ <span style="color: rgb(163,21,21)">&#8220;K&#8221;</span>; <span style="color: rgb(163,21,21)">&#8220;Q&#8221;</span>; <span style="color: rgb(163,21,21)">&#8220;J&#8221;</span>]
<span style="color: rgb(0,0,255)">let</span> sides = [0; 1]

<span style="color: rgb(0,0,255)">let</span> <span style="color: rgb(0,0,255)">rec</span> rotate outer inner result =
  <span style="color: rgb(0,0,255)">match</span> outer <span style="color: rgb(0,0,255)">with
</span>  | o::tail <span style="color: rgb(0,0,255)">-&gt;
</span>      <span style="color: rgb(0,0,255)">if</span> tail = [] <span style="color: rgb(0,0,255)">then
</span>        [<span style="color: rgb(0,0,255)">for</span> i <span style="color: rgb(0,0,255)">in</span> inner <span style="color: rgb(0,0,255)">-&gt;
</span>          (o, i)::result
        ]
      <span style="color: rgb(0,0,255)">else
</span>          [<span style="color: rgb(0,0,255)">for</span> i <span style="color: rgb(0,0,255)">in</span> inner
             <span style="color: rgb(0,0,255)">for</span> l <span style="color: rgb(0,0,255)">in</span> rotate tail inner ((o,i)::result) <span style="color: rgb(0,0,255)">-&gt;</span> l]
  | [] <span style="color: rgb(0,0,255)">-&gt;</span> []

<span style="color: rgb(0,0,255)">do</span> print_any (rotate cards sides [])
</pre>
<p><a href="http://11011.net/software/vspaste"></a></p>
<p>I was really surprised with how productive F# is.&nbsp; I thought I would get annoyed at its strong typing versus scheme, but it made dealing with nested lists a lot easier.&nbsp; And with the VS2008 integration, the editor shows you inferred types almost real-time, simply by hovering.&nbsp; Once I figured that out, I no longer needed fsi interpreter window open.</p>
<p>Amazingly, F# has yield functionality as well, but I stayed far away from it.&nbsp; Even funnier, F# has a &#8220;mutable&#8221; keyword, since nothing is mutable by default.&nbsp; There is nothing better than programming when everything is immutable.</p>
<p>Now, the whole reason I wanted to compare C# 3.0 functional versus scheme was to get a sense for how well the compiler can optimize the recursions.&nbsp; I think F# works as well as scheme for this purpose.&nbsp; Check out the following code sample:</p>
<pre class="code"><span style="color: rgb(0,0,255)">let</span> <span style="color: rgb(0,0,255)">rec</span> range a b =
  <span style="color: rgb(0,0,255)">if</span> a &gt; b <span style="color: rgb(0,0,255)">then</span> []
  <span style="color: rgb(0,0,255)">else</span> a :: range (a + 1) b

<span style="color: rgb(0,0,255)">let</span> <span style="color: rgb(0,0,255)">rec</span> sum list =
    <span style="color: rgb(0,0,255)">match</span> list <span style="color: rgb(0,0,255)">with
</span>    | h::tail <span style="color: rgb(0,0,255)">-&gt;</span> (sum tail) + h
    | [] <span style="color: rgb(0,0,255)">-&gt;</span> 0

<span style="color: rgb(0,0,255)">do</span> print_any (sum (range 0 1000))
</pre>
<p>Even if you&#8217;re not familiar with Caml/F#, you can tell what this does.&nbsp; The range function returns a list of numbers inclusive from a to b, and the sum function adds a list of numbers together.&nbsp; Note that both functions are implemented recursively!&nbsp; So when we add up the numbers 1 to 1000, both functions trigger recursion 1000 levels deep.&nbsp; </p>
<p>Code like this would crash in C++ or C# because you can&#8217;t recurse that deep &#8212; especially if you&#8217;re passing everything immutably by value.&nbsp; But the sum returns instantly in F#, because the compiler doesn&#8217;t actually push the call stack 1000 times &#8212; it doesn&#8217;t implement things the way an imperative language would.</p>
<p>I was speculating that C# 3.0 might put C# recursion performance closer to par with scheme and F#, by heavy use of iterators and compiler advancements.&nbsp; So I found a <a href="http://blogs.msdn.com/wesdyer/archive/2007/03/23/all-about-iterators.aspx">great description of how iterators work</a> over on Wes&#8217;s blog.&nbsp; He includes some perf charts and hints at a potential new &#8220;yield foreach&#8221; syntax that would have helped me out.&nbsp; It looks like iterators perform well.</p>
<p>C# version 3.0 is a huge advance, but still not as nice as F# for my preferred style.&nbsp; While the iterators perform and chain amazingly well, I can still get into trouble by recursing too deep.&nbsp; And C# (like Python) discourages you from passing around lots of big lists by value.&nbsp; List processing in C# has gotten a lot better, but still not as nice as F#.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2007/12/30/playing-with-f/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rabbit &#124;&#62; Moon (The Serious Moonlight)</title>
		<link>http://www.netcrucible.com/blog/2007/12/29/rabbit-moon/</link>
		<comments>http://www.netcrucible.com/blog/2007/12/29/rabbit-moon/#comments</comments>
		<pubDate>Sun, 30 Dec 2007 05:59:07 +0000</pubDate>
		<dc:creator>allenjs</dc:creator>
		
		<category><![CDATA[Life at Microsoft]]></category>

		<guid isPermaLink="false">http://www.netcrucible.com/blog/2007/12/29/rabbit-moon/</guid>
		<description><![CDATA[Listening to Rabbit in the Moon&#8217;s newest CD for the first time as I convert my puzzle solver to F#.  I mentioned RITM before on this blog &#8212; they blow Underworld away.  Like a combination of MBM and Underworld, but pure and powerful like F#.  Takes me back to chocolate at the union and Tandyn [...]]]></description>
			<content:encoded><![CDATA[<p>Listening to Rabbit in the Moon&#8217;s newest CD for the first time as I convert <a href="http://www.netcrucible.com/blog/2007/12/29/two-tricky-routines-using-c-30/"><font color="#800080">my puzzle solver</font></a> to F#.  I <a href="http://www.netcrucible.com/blog/2007/10/24/rabbit-in-the-moon/"><font color="#800080">mentioned RITM before on this blog</font></a> &#8212; they blow Underworld away.  Like a combination of <a href="http://brainwashed.com/mbm/"><font color="#800080">MBM</font></a> and <a href="http://www.myspace.com/underworld"><font color="#800080">Underworld</font></a>, but pure and powerful like F#.  Takes me back to chocolate at the union and Tandyn and Manish.</p>
<p>I fall in love with RITM&#8217;s latest like I fall in love with F#.  Who can love &#8220;<a href="http://www.youtube.com/watch?v=Ut1vAOHSNCw"><font color="#800080">Two Months Off</font></a>&#8221; the same as before when you have &#8220;<a href="http://pawlo.imeem.com/video/BBp6EZ7T/rabbit_in_the_moon_mind_fuct_music_video/"><font color="#800080">Mind Fuct</font></a>&#8221; to occupy its place (or is it &#8220;<a href="http://www.youtube.com/watch?v=JSPQcoEPAk8"><font color="#800080">Outer Body Experience</font></a>&#8221; you love more)?  The <a href="http://www.youtube.com/watch?v=KCy928QJCDE">Gorillaz song</a> is a weak-ass rip-off of <a href="http://djcecil.imeem.com/music/YuH4jNMt/ritmtimebomb/">Timebomb</a>.  Who can love C# 3.0 when everything in F# is immutable?</p>
<p>People like Wes Dyer and Eric Lippert know the feeling, when you instantly love the implementation of sum():</p>
<pre class="code"><span style="color: #0000ff">let</span> <span style="color: #0000ff">rec</span> sum list =
    <span style="color: #0000ff">match</span> list <span style="color: #0000ff">with
</span>    | h::tail <span style="color: #0000ff">-&gt;</span> (sum tail) + h
    | [] <span style="color: #0000ff">-&gt;</span> 0</pre>
<p>F# is <a href="http://tomasp.net/articles/fsharp-ii-functional.aspx">poetics</a>, RITM is <a href="http://www.youtube.com/watch?v=nYNZdmm-Viw">poetics</a>, Aristotle is <a href="http://classics.mit.edu/Aristotle/poetics.html">poetics</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.netcrucible.com/blog/2007/12/29/rabbit-moon/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
