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

<channel>
	<title>Thom Lawrence</title>
	<atom:link href="http://thom.org.uk/feed/" rel="self" type="application/rss+xml" />
	<link>http://thom.org.uk</link>
	<description>Agile, Mobile, Puerile</description>
	<pubDate>Sun, 28 Sep 2008 21:55:02 +0000</pubDate>
	<generator>http://wordpress.org/?v=MU</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<image>
		<url>http://www.gravatar.com/blavatar/928565d1a641bd20b29993f07f15624b?s=96&#038;d=http://s.wordpress.com/i/buttonw-com.png</url>
		<title>Thom Lawrence</title>
		<link>http://thom.org.uk</link>
	</image>
			<item>
		<title>XNA Studio 3.0 under Parallels</title>
		<link>http://thom.org.uk/2008/09/28/xna-studio-30-under-parallels/</link>
		<comments>http://thom.org.uk/2008/09/28/xna-studio-30-under-parallels/#comments</comments>
		<pubDate>Sun, 28 Sep 2008 21:55:01 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Gaming]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[.net]]></category>

		<category><![CDATA[macbook]]></category>

		<category><![CDATA[parallels]]></category>

		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://thomlawrence.wordpress.com/?p=382</guid>
		<description><![CDATA[Still no joy with the new beta. Any VMWare Fusion peeps have any luck?
&#160;&#160;&#160;&#160;&#160;&#160;     ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Still no joy with <a href="http://blogs.msdn.com/xna/archive/2008/05/07/announcing-xna-game-studio-3-0-community-technical-preview-ctp.aspx">the new beta</a>. Any VMWare Fusion peeps have any luck?</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/382/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/382/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/382/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=382&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2008/09/28/xna-studio-30-under-parallels/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Magic: the Gathering with normal playing cards</title>
		<link>http://thom.org.uk/2008/09/23/magic-the-gathering-with-normal-playing-card/</link>
		<comments>http://thom.org.uk/2008/09/23/magic-the-gathering-with-normal-playing-card/#comments</comments>
		<pubDate>Tue, 23 Sep 2008 20:11:22 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Gaming]]></category>

		<category><![CDATA[cards]]></category>

		<category><![CDATA[mtg]]></category>

		<guid isPermaLink="false">http://thomlawrence.wordpress.com/?p=376</guid>
		<description><![CDATA[Rules

Shuffle all 52 cards together and lay the deck face down.
Players draw from this single deck.
When the last card is drawn from the deck, shuffle all graveyards back into the deck.
There is no mana burn.

Other than that, it&#8217;s just the same game.
Cards
All nonland cards have a casting cost derived from their rank, in colourless mana. [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><h3>Rules</h3>
<ol>
<li>Shuffle all 52 cards together and lay the deck face down.</li>
<li>Players draw from this single deck.</li>
<li>When the last card is drawn from the deck, shuffle all graveyards back into the deck.</li>
<li>There is no mana burn.</li>
</ol>
<p>Other than that, it&#8217;s just the same game.</p>
<h3>Cards</h3>
<p>All nonland cards have a casting cost derived from their rank, in colourless mana. Aces therefore cost 1 mana, and face cards cost 10. Where X is used in the card text below, it is equal to the card&#8217;s rank (again aces being 1 and face cards 10).</p>
<dl>
<dt>&spades; Spades</dt>
<dd>Land. &#x27f3;: Add X to your mana pool.</dd>
<dt>&clubs; Clubs</dt>
<dd>Creature. X/X.</dd>
<dt>&diams; Diamonds</dt>
<dd>Instant. Deal X damage to target creature or player.</dd>
<dt>&hearts; Hearts</dt>
<dd>Instant. Choose one &#8212; Target player gains X life; or prevent the next X damage that would be dealt to target creature or player this turn.</dd>
</dl>
<h3>Problems</h3>
<p>Mana flood and mana screw happen fairly often, and obviously there&#8217;s not much variety in the cards. But in desperate times, if you need your fix, it&#8217;ll tide you over.</p>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/376/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/376/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/376/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=376&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2008/09/23/magic-the-gathering-with-normal-playing-card/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Ode to a Karplusan Wolverine</title>
		<link>http://thom.org.uk/2008/07/18/ode-to-a-karplusan-wolverine/</link>
		<comments>http://thom.org.uk/2008/07/18/ode-to-a-karplusan-wolverine/#comments</comments>
		<pubDate>Fri, 18 Jul 2008 23:05:55 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Gaming]]></category>

		<category><![CDATA[Magic: the Gathering]]></category>

		<category><![CDATA[coldsnap]]></category>

		<category><![CDATA[common]]></category>

		<category><![CDATA[mtg]]></category>

		<guid isPermaLink="false">http://thomlawrence.wordpress.com/?p=354</guid>
		<description><![CDATA[
How do I love thee? Let me count the ways.

Thou art a one-drop with first strike.
When blocked, thou hast double strike.
Thou mayst deal thine combat damage as if thou wert not blocked.
There are some who call thee&#8230; &#8216;Tim&#8217;.

And, if God choose, I shall but love thee better after 20 damage.
With apologies to Elizabeth Barrett Browning. [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><img class="alignright" src="http://resources.wizards.com/Magic/Cards/CSP/en-us/Card121179.jpg" alt="" width="200" height="285" /></p>
<p>How do I love <a href="http://ww2.wizards.com/gatherer/CardDetails.aspx?&amp;name=Karplusan%20Wolverine">thee</a>? Let me count the ways.</p>
<ul>
<li>Thou art a one-drop with first strike.</li>
<li>When blocked, thou hast double strike.</li>
<li>Thou mayst deal thine combat damage as if thou wert not blocked.</li>
<li>There are some who call thee&#8230; &#8216;Tim&#8217;.</li>
</ul>
<p>And, if God choose, I shall but love thee better after 20 damage.</p>
<p>With apologies to <a href="http://en.wikipedia.org/wiki/Elizabeth_Barrett_Browning">Elizabeth Barrett Browning</a>. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/354/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/354/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/354/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/354/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/354/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=354&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2008/07/18/ode-to-a-karplusan-wolverine/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>

		<media:content url="http://resources.wizards.com/Magic/Cards/CSP/en-us/Card121179.jpg" medium="image" />
	</item>
		<item>
		<title>TELL WORDPRESS &#8220;IMPORT FROM DASBLOG&#8221;</title>
		<link>http://thom.org.uk/2008/07/11/tell-wordpress-import-from-dasblog/</link>
		<comments>http://thom.org.uk/2008/07/11/tell-wordpress-import-from-dasblog/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 21:06:54 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Blogging]]></category>

		<category><![CDATA[dasblog]]></category>

		<category><![CDATA[emacs]]></category>

		<category><![CDATA[wordpress]]></category>

		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://thomlawrence.wordpress.com/?p=156</guid>
		<description><![CDATA[You have been killed by a grue.
Update: donning my anti-grue kit (XSLT and Emacs), I have managed to resurrect the old posts. Much rejoicing and broken HTML.
       ]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>You have been killed by a grue.</p>
<p><ins>Update: donning my anti-grue kit (XSLT and Emacs), I have managed to resurrect the old posts. Much rejoicing and broken HTML.</ins></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/156/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/156/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/156/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/156/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/156/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=156&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2008/07/11/tell-wordpress-import-from-dasblog/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Can haz pluginz?</title>
		<link>http://thom.org.uk/2008/07/11/can-haz-pluginz/</link>
		<comments>http://thom.org.uk/2008/07/11/can-haz-pluginz/#comments</comments>
		<pubDate>Fri, 11 Jul 2008 12:34:30 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Code]]></category>

		<category><![CDATA[Ruby]]></category>

		<category><![CDATA[acts_as]]></category>

		<category><![CDATA[lolcats]]></category>

		<category><![CDATA[plugins]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://thomlawrence.wordpress.com/?p=5</guid>
		<description><![CDATA[
require 'rubygems'
require 'active_record'

class ActiveRecord::Base
  class &#60;&#60; self
   def method_missing_with_lol(sym)
     if sym.to_s =~ /^can_haz_(\w+)?/
       send "acts_as_#{$1}"
     else
       method_missing_without_lol sym
     end
   end
   alias_method_chain :method_missing, :lol
 end
end

class [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p><code>
<pre>require 'rubygems'
require 'active_record'

class ActiveRecord::Base
  class &lt;&lt; self
   def method_missing_with_lol(sym)
     if sym.to_s =~ /^can_haz_(\w+)?/
       send "acts_as_#{$1}"
     else
       method_missing_without_lol sym
     end
   end
   alias_method_chain :method_missing, :lol
 end
end

class Lulz &lt; ActiveRecord::Base
  can_haz_state_machine?
end</pre>
<p></code></p>
<p>Temporary solution for <a href="http://www.pluginaweek.org/2008/07/06/acts_as_what/">Aaron&#8217;s problem</a>, anyway. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/5/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/5/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/5/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/5/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/5/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=5&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2008/07/11/can-haz-pluginz/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Card of the Day</title>
		<link>http://thom.org.uk/2007/08/16/card-of-the-day/</link>
		<comments>http://thom.org.uk/2007/08/16/card-of-the-day/#comments</comments>
		<pubDate>Wed, 15 Aug 2007 23:01:33 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Gaming]]></category>

		<category><![CDATA[dashboard]]></category>

		<category><![CDATA[dashcode]]></category>

		<category><![CDATA[mtg]]></category>

		<guid isPermaLink="false">http://ccgi.petroquincy.plus.com/2007/08/16/card-of-the-day/</guid>
		<description><![CDATA[If you&#8217;re on a Mac and love Magic: The Gathering, you can use this Dashboard widget to view the card of the day from the Wizards site. Seeing as everyone&#8217;s copy of Dashcode has expired now, I doubt I&#8217;ll spend any more time on it. It&#8217;s basically just an Ajax request from Prototype and a [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>If you&#8217;re on a Mac and love Magic: The Gathering, you can use <a href="http://sites.google.com/a/thom.org.uk/files/Home/CardoftheDay.zip?attredirects=0">this Dashboard widget</a> to view the card of the day from the Wizards site. Seeing as everyone&#8217;s copy of Dashcode has expired now, I doubt I&#8217;ll spend any more time on it. It&#8217;s basically just an Ajax request from Prototype and a regex to find the image.</p>
<p>I sometimes wonder if Dashcode will morph into some hybrid iPhone IDE by the time Leopard comes out, if Apple still haven&#8217;t relented and allowed developers access to the gadget&#8217;s native innards. It was a fairly nice piece of software while it lasted, anyway.</p>
<p><ins>Update: having said I wasn&#8217;t going to spend any more time on it, Wizards have changed their HTML, so I&#8217;ve updated the regex. This should now work again.</ins><br />
<ins>13/09/2008: Wizards have changed the Magic site again, so I&#8217;ve uploaded a new file.</ins></p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/292/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/292/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/292/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/292/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/292/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=292&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2007/08/16/card-of-the-day/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Worst Update Ever</title>
		<link>http://thom.org.uk/2007/07/02/worst-update-ever/</link>
		<comments>http://thom.org.uk/2007/07/02/worst-update-ever/#comments</comments>
		<pubDate>Mon, 02 Jul 2007 20:31:00 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Computing]]></category>

		<category><![CDATA[activesync]]></category>

		<category><![CDATA[mac]]></category>

		<category><![CDATA[parallels]]></category>

		<category><![CDATA[windows]]></category>

		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://ccgi.petroquincy.plus.com/2007/07/02/worst-update-ever/</guid>
		<description><![CDATA[So Parallels 3.0 has continued to frustrate me. I can forgive the XNA thing - seems just as likely to be Microsoft&#8217;s fault. I filed a bug (or is it &#8216;participated&#8217; in a &#8216;connection&#8217;?) on the atrocious Connect site, which you can vote up if you like&#8230; a few people have come here from Google [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>So Parallels 3.0 has continued to frustrate me. I can forgive the XNA thing - seems just as likely to be Microsoft&#8217;s fault. I filed a bug (or is it &#8216;participated&#8217; in a &#8216;connection&#8217;?) on the atrocious Connect site, which you can <a href="https://connect.microsoft.com/feedback/ViewFeedback.aspx?FeedbackID=283960&amp;SiteID=226">vote up if you like</a>&#8230; a few people have come here from Google with seemingly the same problem.</p>
<p>It&#8217;s not even that ActiveSync still doesn&#8217;t work, removing the only other reason I really had to buy the upgrade. It&#8217;s three things, really:</p>
<ol>
<li>My virtual machines occasionally take about a minute to resume.</li>
<li>Tonight, Parallels decided to start corrupting my Windows XP disk image, leaving me with recursive bluescreen fun.</li>
<li>I can&#8217;t even repair it, because I can&#8217;t work out how to make my install disc image bootable.</li>
</ol>
<p>So it&#8217;s been disappointing. Probably nobody&#8217;s fault, but I really feel like going back to 2.5. Or trying VMWare and not having my fans on the whole time even if the VM&#8217;s idle etc etc. Grr.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/291/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/291/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/291/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/291/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/291/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=291&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2007/07/02/worst-update-ever/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Parallels 3.0 &#38; XNA Studio</title>
		<link>http://thom.org.uk/2007/06/14/parallels-30-xna-studio/</link>
		<comments>http://thom.org.uk/2007/06/14/parallels-30-xna-studio/#comments</comments>
		<pubDate>Thu, 14 Jun 2007 20:52:38 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[Computing]]></category>

		<category><![CDATA[directx]]></category>

		<category><![CDATA[mac]]></category>

		<category><![CDATA[parallels]]></category>

		<category><![CDATA[xna]]></category>

		<guid isPermaLink="false">http://ccgi.petroquincy.plus.com/2007/06/14/parallels-30-xna-studio/</guid>
		<description><![CDATA[I enthusiastically upgraded to Parallels 3.0, hoping to enjoy its DirectX support. XNA Studio is one of the reasons this interests me - with my MacBook I&#8217;m not expecting to write or indeed play many 3D games, but you can&#8217;t run XNA projects without acceleration. However:
System.ArgumentException was unhandled
  Message="The device name is not valid. [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>I enthusiastically upgraded to Parallels 3.0, hoping to enjoy its DirectX support. XNA Studio is one of the reasons this interests me - with my MacBook I&#8217;m not expecting to write or indeed play many 3D games, but you can&#8217;t run XNA projects without acceleration. However:</p>
<pre>System.ArgumentException was unhandled
  Message="The device name is not valid. Device names are in the form \\\\.\\\\DEVICE1\r\nParameter name: screenDeviceName"
  Source="Microsoft.Xna.Framework.Game"
  ParamName="screenDeviceName"
  StackTrace:
       at Microsoft.Xna.Framework.WindowsGameWindow.ScreenFromDeviceName(String screenDeviceName)
       at Microsoft.Xna.Framework.WindowsGameForm.ResizeWindow(String screenDeviceName, Int32 clientWidth, Int32 clientHeight, Boolean center)
       at Microsoft.Xna.Framework.WindowsGameForm.EndScreenDeviceChange(String screenDeviceName, Int32 clientWidth, Int32 clientHeight)
       at Microsoft.Xna.Framework.WindowsGameWindow.EndScreenDeviceChange(String screenDeviceName, Int32 clientWidth, Int32 clientHeight)
       at Microsoft.Xna.Framework.GraphicsDeviceManager.ChangeDevice(Boolean forceCreate)
       at Microsoft.Xna.Framework.GraphicsDeviceManager.Microsoft.Xna.Framework.IGraphicsDeviceManager.CreateDevice()
       at Microsoft.Xna.Framework.Game.Run()
       at Spacewar.Program.Main(String[] args) in C:\Documents and Settings\Thom\My Documents\Visual Studio 2005\Projects\Spacewar\Spacewar\Program.cs:line 16</pre>
<p>Google doesn&#8217;t seem to know a lot about this exception, but I&#8217;m hoping someone can help. I&#8217;m downloading the refresh of XNA studio from earlier this month, so that might fix everything. I&#8217;ve already wasted half an hour finding out that you have to actually edit your VM to enable DirectX support - it doesn&#8217;t appear by magic.</p>
<p>The other thing that I couldn&#8217;t get to work in previous versions of Parallels is ActiveSync, so hopefully I&#8217;ll have more luck there. I&#8217;m not even on a trial - I am amazed at how reckless buying a Mac makes you with software purchases&#8230;</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/290/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/290/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/290/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=290&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2007/06/14/parallels-30-xna-studio/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Future Values With Castle&#8217;s DynamicProxy</title>
		<link>http://thom.org.uk/2007/05/29/future-values-with-castles-dynamicproxy/</link>
		<comments>http://thom.org.uk/2007/05/29/future-values-with-castles-dynamicproxy/#comments</comments>
		<pubDate>Tue, 29 May 2007 19:20:53 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[dynamicproxy]]></category>

		<category><![CDATA[futures]]></category>

		<guid isPermaLink="false">http://ccgi.petroquincy.plus.com/2007/05/29/future-values-with-castles-dynamicproxy/</guid>
		<description><![CDATA[.NET has lots of support for asynchronous processing, which ASP.NET packages up very nicely in PageAsyncTasks. And yet I almost always find an excuse not to use them - they&#8217;re hard to test, it&#8217;s not instantly obvious what the logic of the page is when you have delegates and handlers all over the place, and, [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>.NET has lots of support for asynchronous processing, which ASP.NET packages up very nicely in <a href="http://msdn2.microsoft.com/en-us/library/system.web.ui.pageasynctask.aspx"><code>PageAsyncTask</code></a>s. And yet I almost always find an excuse not to use them - they&#8217;re hard to test, it&#8217;s not instantly obvious what the logic of the page is when you have delegates and handlers all over the place, and, like, most of my code is so amazing that all I need second thread to do is watch and applaud.</p>
<p>But I thought I&#8217;d try something slightly more usable. I like the idea of <a href="http://c2.com/cgi/wiki?FutureValue">Future Values</a> - basically they&#8217;re a placeholder for a value that sits there nervously pretending to be the result of an asynchronous call. When you finally get round to using it, and if it&#8217;s ready, the future will give you an answer and relax. If not, it&#8217;ll block the thread and make excuses until it&#8217;s finished. What&#8217;s nice about this is that in many cases, the time between first getting the future and actually using it will be enough for the operation to complete, which means no blocking will happen and you won&#8217;t notice anything. This is the logic behind <code>PageAsyncTask</code>s - there&#8217;s lots for the ASP.NET runtime and you to do between Page_Load and Page_PreRender, so there&#8217;s no point twiddling your thumbs. And if it <em>does</em> need to block, that&#8217;s fine, but you haven&#8217;t had to mess about so much with callbacks and stuff.</p>
<p>I wanted this to be as transparent as possible, and I&#8217;d never played with <a href="http://wiki.castleproject.org/index.php/DynamicProxy">DynamicProxy</a> before, so I thought it would be a good experiment. I basically wanted to come up with a solution to the following type of problem:</p>
<pre><code>public class SlowService
{
	public Result DoSomething()
	{
		Thread.Sleep(5000);
		return new Result("Done!");
	}
}</code></pre>
<p>You know the sort of thing, some web service that goes off to calculate the answer to life, the universe and everything and all you&#8217;ve got is a spinny thing going ape in your browser while you wait. No more! Behold the <code>AsyncProxy</code>ness:</p>
<pre><code>public class AsyncProxy : IInterceptor
{
	private readonly ProxyGenerator _generator = new ProxyGenerator();

	public static T Create(T target)
	{
		ProxyGenerator generator = new ProxyGenerator();
		return (T)generator.CreateProxy(typeof(T), new AsyncProxy(), target);
	}

	public object Intercept(IInvocation invocation, params object[] args)
	{
		InvocationDelegate asyncInvocation = invocation.Proceed;
		Type returnType = invocation.Method.ReturnType;
		if (returnType == typeof(void))
		{
			asyncInvocation.BeginInvoke(args, delegate(IAsyncResult result) { asyncInvocation.EndInvoke(result); }, null);
			return null;
		}
		else
		{
			IAsyncResult result = asyncInvocation.BeginInvoke(args, null, null);
			Future future = new Future(asyncInvocation, result);
			return returnType.IsInterface
				? _generator.CreateProxy(returnType, future, Activator.CreateInstance(returnType, true))
				: _generator.CreateClassProxy(returnType, future);
		}
	}
}

internal delegate object InvocationDelegate(params object[] args);</code></pre>
<p>This allows you to create a proxy for a type, that turns all its methods (or at least the virtual or interface defined ones DynamicProxy lets you monkey with) into asynchronous calls. And instead of returning the result of the call, it gives you back a <code>Future</code> object that&#8217;ll stand in for the result of the call until it&#8217;s finished:</p>
<pre><code>internal class Future : IInterceptor
{
	private readonly InvocationDelegate _asyncInvocation;
	private readonly IAsyncResult _result;
	private object _invocationTarget;

	internal Future(InvocationDelegate asyncInvocation, IAsyncResult result)
	{
		_asyncInvocation = asyncInvocation;
		_result = result;
	}

	public object Intercept(IInvocation invocation, params object[] args)
	{
		if (_invocationTarget == null)
		{
			lock (this)
			{
				if (_invocationTarget == null)
				{
					object target = _asyncInvocation.EndInvoke(_result);
					Thread.MemoryBarrier();
					_invocationTarget = target;
				}
			}
		}
		invocation.InvocationTarget = _invocationTarget;
		return invocation.Proceed(args);
	}
}</code></pre>
<p>Hopefully that double-checked lock is correct. Looks clever though, right? Anyway, all this says is that when someone finally needs to do something with the result of our slow call, we&#8217;ll wait for the asynchronous delegate to finish (blocking if necessary) and then pass the method invocation through to the actual result of that call. Once that&#8217;s done, the <code>Future</code> is just a completely transparent proxy for the returned object. This all allows you to do things like this:</p>
<pre><code>class Program
{
	static void Main(string[] args)
	{
		ISlowService service = AsyncProxy.Create(new SlowService());
		Console.WriteLine("Look, ma!");
		Result r1 = service.DoSomething();
		Result r2 = service.DoSomething();
		Result r3 = service.DoSomething();
		Console.WriteLine("No blocking!");
		Console.WriteLine("Results: {0}, {1} and {2}", r1, r2, r2);
		Console.ReadLine();
	}
}

public interface ISlowService
{
	Result DoSomething();
}

public class SlowService : ISlowService
{
	public Result DoSomething()
	{
		Thread.Sleep(5000);
		return new Result("Done!");
	}
}

public class Result
{
	private string _message;

	protected Result() { }

	public Result(string message)
	{
		_message = message;
	}

	public override string ToString()
	{
		return _message;
	}
}</code></pre>
<p>Which all seems to work. I&#8217;ve not tested or benchmarked anything, so don&#8217;t trust me just yet. I should also point out that in DynamicProxy2, this won&#8217;t work, because it relies on creating a delegate to point at the <code>Proceed</code> method of the interceptor. In the new version, an invocation and its return value are spread across bunch of properties instead of the easy-to-use one liner we currently have. But at the very least, we have here a really simple API to get you thinking about a cool pattern.</p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/289/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/289/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/289/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/289/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/289/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=289&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2007/05/29/future-values-with-castles-dynamicproxy/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
		<item>
		<title>Perfidy: Performance Testing In NUnit</title>
		<link>http://thom.org.uk/2006/09/17/perfidy-performance-testing-in-nunit/</link>
		<comments>http://thom.org.uk/2006/09/17/perfidy-performance-testing-in-nunit/#comments</comments>
		<pubDate>Sun, 17 Sep 2006 01:29:19 +0000</pubDate>
		<dc:creator>Thom</dc:creator>
		
		<category><![CDATA[C#]]></category>

		<category><![CDATA[Code]]></category>

		<category><![CDATA[Programming]]></category>

		<category><![CDATA[.net]]></category>

		<category><![CDATA[nunit]]></category>

		<category><![CDATA[performance]]></category>

		<category><![CDATA[testing]]></category>

		<guid isPermaLink="false">http://ccgi.petroquincy.plus.com/2006/09/17/perfidy-performance-testing-in-nunit/</guid>
		<description><![CDATA[Unsatisfied with calling QueryPerformanceCounter and being done with it, I spent today coming up with a fluent interface for performance testing in NUnit:
using (At.Most(5).Seconds)
{
    // Stuff that should take under 5 seconds
}

using (At.Most(1).Minute.GiveOrTake(10).Seconds)
{
    // Stuff that should take under 70 seconds
}

Using.At.Most(10).Seconds.For(1000).Iterations.Do(delegate()
{
    // Stuff that should take [...]]]></description>
			<content:encoded><![CDATA[<div class='snap_preview'><br /><p>Unsatisfied with calling <code>QueryPerformanceCounter</code> and being done with it, I spent today coming up with a fluent interface for performance testing in NUnit:</p>
<pre><code>using (At.Most(5).Seconds)
{
    // Stuff that should take under 5 seconds
}

using (At.Most(1).Minute.GiveOrTake(10).Seconds)
{
    // Stuff that should take under 70 seconds
}

Using.At.Most(10).Seconds.For(1000).Iterations.Do(delegate()
{
    // Stuff that should take under 10 seconds for 1000 iterations
});

Using.At.Most(5).Seconds.For(20).Threads.Do(delegate()
{
    // Stuff that should take under 5 seconds when run inside
    // 20 parallel threads
});</code></pre>
<p>It&#8217;s basically a wrapper around NUnit&#8217;s <code>Assert.Less()</code> and I call it Perfidy (which I thought was a good word for code that treacherously refuses to pass its tests). You can grab a very rough version here: <a href="http://sites.google.com/a/thom.org.uk/files/Home/Perfidy.zip?attredirects=0">Perfidy.zip</a></p>
<p>I suppose this kind of thing doesn&#8217;t really qualify as unit testing, and it&#8217;s not deterministic. But if you&#8217;re fairly generous with the limits and get your tests up and running early in a project, you at least know vaguely where you&#8217;re going to suffer.</p>
<p>I&#8217;ve not included any tests for the tests. I wasn&#8217;t sure if NUnit gives you a way to say &#8216;give me a green bar if this test fails&#8217;, and to test everything takes a fair coffee break, as there are lots of <code>Thread.Sleep()</code>s around. If anyone spots anything obviously wrong, or knows of another library that does the same sort of thing, I&#8217;d love to hear about it. Especially if it has pretty syntax. <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/thomlawrence.wordpress.com/288/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/thomlawrence.wordpress.com/288/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/thomlawrence.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/thomlawrence.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/thomlawrence.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/thomlawrence.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/thomlawrence.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/thomlawrence.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/thomlawrence.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/thomlawrence.wordpress.com/288/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/thomlawrence.wordpress.com/288/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/thomlawrence.wordpress.com/288/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=thom.org.uk&blog=4154480&post=288&subd=thomlawrence&ref=&feed=1" /></div>]]></content:encoded>
			<wfw:commentRss>http://thom.org.uk/2006/09/17/perfidy-performance-testing-in-nunit/feed/</wfw:commentRss>
	
		<media:content url="" medium="image">
			<media:title type="html">Thom</media:title>
		</media:content>
	</item>
	</channel>
</rss>