<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>A Quantum Immortal</title>
	
	<link>http://ripper234.com</link>
	<description>Stuff Ron Gross Finds Interesting</description>
	<lastBuildDate>Wed, 13 Jan 2010 00:56:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/AQuantumImmortal" /><feedburner:info uri="aquantumimmortal" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Cancelor – a java task cancelation service</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/HIUKfC4evWw/</link>
		<comments>http://ripper234.com/p/cancelor-a-java-task-cancelation-servic/#comments</comments>
		<pubDate>Wed, 13 Jan 2010 00:48:55 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[cancelation]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Threading]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1217</guid>
		<description><![CDATA[Lately I need to support task cancellation in a Java process I&#8217;m working on. The straightforward options I know to implement this are:

Thread.interrupt() &#8211; the caller interrupts the worker thread (either directly or using Future.cancel()). Some say this is an erroneous approach, but I still haven&#8217;t figured out why. However, it is buggy on some recent versions [...]


Related posts:<ol><li><a href='http://ripper234.com/p/java-is-less-magical-than-c/' rel='bookmark' title='Permanent Link: Java is less magical than C#'>Java is less magical than C#</a></li>
<li><a href='http://ripper234.com/p/msbuild-fxcopsolution-task/' rel='bookmark' title='Permanent Link: MSBuild FxCopSolution Task'>MSBuild FxCopSolution Task</a></li>
<li><a href='http://ripper234.com/p/dont-switch-your-lock-object-mid-lock/' rel='bookmark' title='Permanent Link: Don&#8217;t switch your lock object mid-lock'>Don&#8217;t switch your lock object mid-lock</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Lately I need to support task cancellation in a Java process I&#8217;m working on. The straightforward options I know to implement this are:</p>
<ol>
<li><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Thread.html#interrupt()">Thread.interrupt()</a> &#8211; the caller interrupts the worker thread (either directly or using <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/Future.html#cancel(boolean)">Future.cancel()</a>). <a href="http://blog.ktorium.com/">Some</a> say this is an erroneous approach, but I still <a href="http://stackoverflow.com/questions/2020992/is-thread-interrupt-evil">haven&#8217;t figured out why</a>. However, it is <a href="http://stackoverflow.com/questions/2012259/thread-isinterrupted-doesnt-work-thread-interrupted-does">buggy</a> on some recent versions on the JDK, and it is a bit fragile (what if the worker threads create worker threads that also need to be canceled?).</li>
<li>Passing some object (AtomicBoolean?) down to every object you would like to support cancellation. These objects will check the value of this boolean, and should stop if it is false. They can pass the boolean to other objects / tasks. While this works, this boolean cannot be injected, and so must be manually passed along the call stack.</li>
</ol>
<p>If you want the advantages of the second method, but don&#8217;t want to break IOC, here&#8217;s how:</p>
<p>First, the usage:</p>
<p>The listener object adds a dependency on ICancelor</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Foo <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">public</span> Foo<span style="color: #009900;">&#40;</span>ICancelor cancelor<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">this</span>.<span style="color: #006633;">cancelor</span> <span style="color: #339933;">=</span> cancelor<span style="color: #339933;">;</span>
    ...
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>It then checks the cancellation state every now and then:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">if</span> <span style="color: #009900;">&#40;</span>cancelor.<span style="color: #006633;">wasTaskCanceled</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;TakeOverTheWorld&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
   <span style="color: #000000; font-weight: bold;">return</span><span style="color: #339933;">;</span></pre></div></div>

<p>The top-level thread that wishes to cancel a task simply calls</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">cancelor.<span style="color: #006633;">cancelTask</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;TakeOverTheWorld&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>And whenever a task is started, you should call</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">cancelor.<span style="color: #006633;">resetTask</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;TakeOverTheWorld&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>I&#8217;ll admit using strings for task names is a bit ugly, but this is not a terrible price to pay, assuming you have a few core tasks you intend to support. All that remains is the cancellation service itself:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #008000; font-style: italic; font-weight: bold;">/**
 * A cancellation service.
 */</span>
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">interface</span> ICancelor <span style="color: #009900;">&#123;</span>
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Resets a task to &quot;Not canceled&quot; state
     */</span>
    <span style="color: #000066; font-weight: bold;">void</span> resetTask<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Returns true iff the a cancelTask was called, and no resetTask was called afterwards.
     */</span>
    <span style="color: #000066; font-weight: bold;">boolean</span> wasTaskCanceled<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #008000; font-style: italic; font-weight: bold;">/**
     * Cancel a task
     */</span>
    <span style="color: #000066; font-weight: bold;">void</span> cancelTask<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Cancelor <span style="color: #000000; font-weight: bold;">implements</span> ICancelor <span style="color: #009900;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">private</span> <span style="color: #000000; font-weight: bold;">final</span> ConcurrentHashMap tasks <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> ConcurrentHashMap<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> resetTask<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> name<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        tasks.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span>name, <span style="color: #000066; font-weight: bold;">true</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">boolean</span> wasTaskCanceled<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> name<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        <span style="color: #003399;">Boolean</span> value <span style="color: #339933;">=</span> tasks.<span style="color: #006633;">get</span><span style="color: #009900;">&#40;</span>name<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
        <span style="color: #000000; font-weight: bold;">return</span> value <span style="color: #339933;">!=</span> <span style="color: #000066; font-weight: bold;">null</span> <span style="color: #339933;">&amp;</span> value<span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #000000; font-weight: bold;">public</span> <span style="color: #000066; font-weight: bold;">void</span> cancelTask<span style="color: #009900;">&#40;</span><span style="color: #003399;">String</span> name<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        tasks.<span style="color: #006633;">put</span><span style="color: #009900;">&#40;</span>name, <span style="color: #000066; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Because we rely on task names, there is an assumption here that all classes that play in the cancellation game belong to the same task semantically. If a class is a common class that doesn&#8217;t belong to a single task or flow, this approach does not work &#8211; in fact, I cannot think of an approach that will work in this case with dependency injection. The common class has to accept the cancellation signal somehow, it must either get an boolean explicit and not from the IOC container, or must check its interrupted state (or some other thread-local state) itself. Any smart ideas on how to solve this problem?</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/java-is-less-magical-than-c/' rel='bookmark' title='Permanent Link: Java is less magical than C#'>Java is less magical than C#</a></li>
<li><a href='http://ripper234.com/p/msbuild-fxcopsolution-task/' rel='bookmark' title='Permanent Link: MSBuild FxCopSolution Task'>MSBuild FxCopSolution Task</a></li>
<li><a href='http://ripper234.com/p/dont-switch-your-lock-object-mid-lock/' rel='bookmark' title='Permanent Link: Don&#8217;t switch your lock object mid-lock'>Don&#8217;t switch your lock object mid-lock</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/HIUKfC4evWw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/cancelor-a-java-task-cancelation-servic/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/cancelor-a-java-task-cancelation-servic/</feedburner:origLink></item>
		<item>
		<title>ALT.NET Israel Tools #1</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/t8GsI3dzfnY/</link>
		<comments>http://ripper234.com/p/alt-net-israel-tools-1/#comments</comments>
		<pubDate>Sat, 09 Jan 2010 17:00:38 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[alt.net]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1215</guid>
		<description><![CDATA[Come hear about .Net tools in a &#8220;no bullshit&#8221; evening (more details here).


Related posts:A few blogging tools
Something I Wrote Once



Related posts:<ol><li><a href='http://ripper234.com/p/a-few-blogging-tools/' rel='bookmark' title='Permanent Link: A few blogging tools'>A few blogging tools</a></li>
<li><a href='http://ripper234.com/p/something-i-wrote-once/' rel='bookmark' title='Permanent Link: Something I Wrote Once'>Something I Wrote Once</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Come hear about .Net tools in a &#8220;no bullshit&#8221; evening (<a href="http://www.facebook.com/event.php?eid=247710842255">more details here</a>).</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/a-few-blogging-tools/' rel='bookmark' title='Permanent Link: A few blogging tools'>A few blogging tools</a></li>
<li><a href='http://ripper234.com/p/something-i-wrote-once/' rel='bookmark' title='Permanent Link: Something I Wrote Once'>Something I Wrote Once</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/t8GsI3dzfnY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/alt-net-israel-tools-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/alt-net-israel-tools-1/</feedburner:origLink></item>
		<item>
		<title>Playing around with PLINQ and IO-bound tasks</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/sv8TrE15teQ/</link>
		<comments>http://ripper234.com/p/playing-around-with-plinq-and-io-bound-tasks/#comments</comments>
		<pubDate>Sun, 29 Nov 2009 22:04:07 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[LINQ]]></category>
		<category><![CDATA[PLINQ]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Threading]]></category>
		<category><![CDATA[TPL]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1192</guid>
		<description><![CDATA[

   function hide(id){
      document.getElementById(id).style.display = 'none';
   }    
   function show(id){
      document.getElementById(id).style.display = '';
   }
   function spoilerhide(){
      for (i=0;i


Related posts:<ol><li><a href='http://ripper234.com/p/playing-with-a-few-readerwriterlocks-in-net/' rel='bookmark' title='Permanent Link: Playing with a few ReaderWriterLocks in .Net'>Playing with a few ReaderWriterLocks in .Net</a></li>
<li><a href='http://ripper234.com/p/ant-intellij-tasks/' rel='bookmark' title='Permanent Link: Ant-IntelliJ-Tasks'>Ant-IntelliJ-Tasks</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>
<script>
   function hide(id){
      document.getElementById(id).style.display = 'none';
   }    
   function show(id){
      document.getElementById(id).style.display = '';
   }
   function spoilerhide(){
      for (i=0;i<document.getElementsByTagName('div').length;i++) {
         if (document.getElementsByTagName('div')[i].class == 'spoiler') {
            document.getElementsByTagName('div')[i].style.color = '#0000FF';
         }
      }
   }
   function spoilershow(){
      for (i=0;i<document.getElementsByTagName('div').length;i++) {
         if (document.getElementsByTagName('div')[i].class == 'spoiler') {
            document.getElementsByTagName('div')[i].style.color = '#FF0000';
         }
      }
   }
</script>
<br />
I recently <a href="http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx">downloaded</a> Visual Studio 2010 beta, and took the chance to play with <a href="http://en.wikipedia.org/wiki/Parallel_Extensions">PLINQ</a>. PLINQ, for those of you in the dark ages of .Net Framework 2.0, is parallel LINQ &#8211; an extension to the famous query language that makes it easy to write parallel code (essential to programming in the 21th century, <a href="http://en.wikipedia.org/wiki/Moore's_law#Transistor_count_versus_computing_performance">in the age of the many-core</a>).</p>
<p>A code sample, as usual, is the best demonstration:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">int</span> CountPrimes<span style="color: #000000;">&#40;</span>IEnumerable<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">int</span><span style="color: #008000;">&gt;</span> input<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">return</span> input.<span style="color: #0000FF;">AsParallel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Where</span><span style="color: #000000;">&#40;</span>IsPrime<span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Count</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">bool</span> IsPrime<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> n<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">for</span> <span style="color: #000000;">&#40;</span><span style="color: #FF0000;">int</span> i <span style="color: #008000;">=</span> <span style="color: #FF0000;">2</span><span style="color: #008000;">;</span> i<span style="color: #008000;">*</span>i <span style="color: #008000;">&lt;</span> n<span style="color: #008000;">;</span> <span style="color: #008000;">++</span>i<span style="color: #000000;">&#41;</span>
        <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>n <span style="color: #008000;">%</span> i <span style="color: #008000;">==</span> <span style="color: #FF0000;">0</span><span style="color: #000000;">&#41;</span>
            <span style="color: #0600FF;">return</span> false<span style="color: #008000;">;</span>
    <span style="color: #0600FF;">return</span> true<span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>This code sample, regardless of using an inefficient primality test, is fully parallel. PLINQ will utilize all your cores when running the above code, and I didn&#8217;t have to use any locks, queues, threadpools or any of the more complex tools of the trade. Just tell PLINQ &#8220;AsParallel()&#8221;, and it works.</p>
<p>I hit some gotcha when I tried to compare the parallel performance with the sequential one. Do you spot the problem in the following code?</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #0600FF;">void</span> CountPrimesTest<span style="color: #000000;">&#40;</span>IEnumerable<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">int</span><span style="color: #008000;">&gt;</span> input<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">// parallel benchmark </span>
    var timer <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Stopwatch<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    timer.<span style="color: #0000FF;">Start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    CountPrimes<span style="color: #000000;">&#40;</span>input.<span style="color: #0000FF;">AsParallel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    timer.<span style="color: #0000FF;">Stop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Counted primes in parallel took &quot;</span> <span style="color: #008000;">+</span> timer.<span style="color: #0000FF;">Elapsed</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// sequential benchmark</span>
    timer <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Stopwatch<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    timer.<span style="color: #0000FF;">Start</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    CountPrimes<span style="color: #000000;">&#40;</span>input<span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    timer.<span style="color: #0000FF;">Stop</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    Console.<span style="color: #0000FF;">WriteLine</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;Counted primes sequentially took &quot;</span> <span style="color: #008000;">+</span> timer.<span style="color: #0000FF;">Elapsed</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<div id="div1">
<input type="button" onClick="hide('div1'); show('div2'); spoilershow();" value="Ooh, tell me please!">
</div>
<div id="div2" style="display:none;">
<input type="button" onClick="show('div1'); hide('div2'); spoilerhide();" value="I'm sorry I looked"><br/><br />
    As <a href="http://stackoverflow.com/questions/1812615/how-exactly-does-asparallel-work">StackOverflow told me</a>, PLINQ cares about the static type of the sequence, not the dynamic type. When input is cast to IEnumerable&lt;T&gt;, it loses the original intent, and is not parallelized by LINQ.
</div>
<p><br/></p>
<p>This is all fine and dandy when the task at hand is CPU bound, but works pretty miserabbly when your task is IO bound, like downloading a bunch of web pages. Next, I simulated some IO-bound tasks (I used Sleep() to emulate IO &#8211; basically not using a lot of CPU for every task):</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #000000;">&#91;</span>ThreadStatic<span style="color: #000000;">&#93;</span>
<span style="color: #0600FF;">private</span> <span style="color: #0600FF;">static</span> Random _random<span style="color: #008000;">;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> List<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">string</span><span style="color: #008000;">&gt;</span> FindInterestingDomains<span style="color: #000000;">&#40;</span>IEnumerable<span style="color: #008000;">&lt;</span><span style="color: #FF0000;">string</span><span style="color: #008000;">&gt;</span> urls<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #008080; font-style: italic;">// select all the domains of the interesting URLs</span>
    <span style="color: #0600FF;">return</span> urls.<span style="color: #0000FF;">AsParallel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Where</span><span style="color: #000000;">&#40;</span>SexFilter<span style="color: #000000;">&#41;</span>.
                <span style="color: #0000FF;">Select</span><span style="color: #000000;">&#40;</span>url <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">new</span> Uri<span style="color: #000000;">&#40;</span>url<span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Host</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">ToList</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #0600FF;">public</span> <span style="color: #0600FF;">static</span> <span style="color: #FF0000;">bool</span> SexFilter<span style="color: #000000;">&#40;</span><span style="color: #FF0000;">string</span> url<span style="color: #000000;">&#41;</span>
<span style="color: #000000;">&#123;</span>
    <span style="color: #0600FF;">if</span> <span style="color: #000000;">&#40;</span>_random <span style="color: #008000;">==</span> <span style="color: #0600FF;">null</span><span style="color: #000000;">&#41;</span>
        _random <span style="color: #008000;">=</span> <span style="color: #008000;">new</span> Random<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
&nbsp;
    <span style="color: #008080; font-style: italic;">// simulate a download</span>
    Thread.<span style="color: #0000FF;">Sleep</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">1000</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
    var html <span style="color: #008000;">=</span> <span style="color: #666666;">&quot;&lt;html&gt;&quot;</span> <span style="color: #008000;">+</span> _random.<span style="color: #0000FF;">Next</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span> <span style="color: #008000;">+</span> <span style="color: #666666;">&quot;&lt;/html&gt;&quot;</span><span style="color: #008000;">;</span>
    <span style="color: #0600FF;">return</span> html.<span style="color: #0000FF;">Contains</span><span style="color: #000000;">&#40;</span><span style="color: #666666;">&quot;69&quot;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>Testing this with a list of 10 URLs took 5 seconds, meaning LINQ again spun only two cores, which is the number of cores on my machine. This really sucks for IO bound tasks, because most of the time the threads are idle, waiting on IO. Let&#8217;s see if we can speed this up:</p>

<div class="wp_syntax"><div class="code"><pre class="csharp" style="font-family:monospace;"><span style="color: #008080; font-style: italic;">// Use WithDegreeOfParallelism to specify the number of threads to run</span>
<span style="color: #0600FF;">return</span> urls.<span style="color: #0000FF;">AsParallel</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">WithDegreeOfParallelism</span><span style="color: #000000;">&#40;</span><span style="color: #FF0000;">10</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Where</span><span style="color: #000000;">&#40;</span>SexFilter<span style="color: #000000;">&#41;</span>.
              <span style="color: #0000FF;">Select</span><span style="color: #000000;">&#40;</span>url <span style="color: #008000;">=&gt;</span> <span style="color: #008000;">new</span> Uri<span style="color: #000000;">&#40;</span>url<span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">Host</span><span style="color: #000000;">&#41;</span>.<span style="color: #0000FF;">ToList</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span><span style="color: #008000;">;</span></pre></div></div>

<p>This appeared not to work at first, because WithDegreeOfParallelism is just a recommendation or upper bound. You can ask PLINQ nicely to run with ten threads, but it will only allocate two if it so chooses. This is yet another example of C# being <a href="http://ripper234.com/p/java-is-less-magical-than-c/">more magical than Java</a> &#8211; compared to Java&#8217;s rich <a href="http://java.sun.com/j2se/1.5.0/docs/api/java/util/concurrent/ExecutorService.html">ExecutorService</a>, PLINQ offers less fine grained control.</p>
<p>However, further testing revealed the damage is not so horrible. This is what happened when I put the above code in a while(true):</p>
<pre>
Tested 10 URLs in 00:00:05.0576333
Tested 10 URLs in 00:00:03.0018617
Tested 10 URLs in 00:00:03.0013939
Tested 10 URLs in 00:00:03.0013175
Tested 10 URLs in 00:00:04.0018983
Tested 10 URLs in 00:00:03.0024044
Tested 10 URLs in 00:00:01.0004407
Tested 10 URLs in 00:00:01.0007645
Tested 10 URLs in 00:00:01.0007280
Tested 10 URLs in 00:00:01.0003358
Tested 10 URLs in 00:00:01.0003347
Tested 10 URLs in 00:00:01.0002470
</pre>
<p>After some trial and error, PLINQ found that the optimal number of threads needed to run this task under its concurrency guidelines is ten. I imagine that if at some point in the future the optimal number of threads change, it will adapt.</p>
<p>P.S.<br />
If you found this interesting, wait till you read about <a href="http://research.microsoft.com/en-us/projects/DryadLINQ/">DryadLINQ</a> &#8211; it&#8217;s LINQ taken to the extreme, run over a cluster of computers.</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/playing-with-a-few-readerwriterlocks-in-net/' rel='bookmark' title='Permanent Link: Playing with a few ReaderWriterLocks in .Net'>Playing with a few ReaderWriterLocks in .Net</a></li>
<li><a href='http://ripper234.com/p/ant-intellij-tasks/' rel='bookmark' title='Permanent Link: Ant-IntelliJ-Tasks'>Ant-IntelliJ-Tasks</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/sv8TrE15teQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/playing-around-with-plinq-and-io-bound-tasks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/playing-around-with-plinq-and-io-bound-tasks/</feedburner:origLink></item>
		<item>
		<title>Ant-IntelliJ-Tasks</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/si3NAFZnAY0/</link>
		<comments>http://ripper234.com/p/ant-intellij-tasks/#comments</comments>
		<pubDate>Thu, 22 Oct 2009 05:59:38 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[ant-intellij-tasks]]></category>
		<category><![CDATA[build]]></category>
		<category><![CDATA[Continuous Integration]]></category>
		<category><![CDATA[IntelliJ]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[Tomer Gabel]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1188</guid>
		<description><![CDATA[I&#8217;ve posted a lot lately,  but I think this post is well deserved. Tomer has recently finished an open source project he&#8217;s been working on for quite some time &#8211; ant-intellij-tasks. It is an ant task that takes an intellij-format project structures, builds and tests it. We have been using it for the past two months [...]


Related posts:<ol><li><a href='http://ripper234.com/p/knuth-and-the-city-teamcity/' rel='bookmark' title='Permanent Link: Knuth and The City (TeamCity!)'>Knuth and The City (TeamCity!)</a></li>
<li><a href='http://ripper234.com/p/disable-resharper-c-3-syntax/' rel='bookmark' title='Permanent Link: Disable Resharper C# 3 syntax'>Disable Resharper C# 3 syntax</a></li>
<li><a href='http://ripper234.com/p/thrift-win32-binary/' rel='bookmark' title='Permanent Link: Thrift win32 binary'>Thrift win32 binary</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve <a href="http://ripper234.com/p/met-community-emerging/">posted</a> <a href="http://ripper234.com/p/trying-out-the-stackexchange-platform/">a lot</a> <a href="http://ripper234.com/p/so-this-is-what-an-empty-stackoverflow-looks-like/">lately</a>,  but I think this post is well deserved. <a href="http://tomergabel.com/">Tomer</a> has recently <a href="http://www.tomergabel.com/AnnouncingAntintellijtasks.aspx">finished</a> an open source project he&#8217;s been working on for quite some time &#8211; <a href="http://code.google.com/p/ant-intellij-tasks/">ant-intellij-tasks</a>. It is an ant task that takes an intellij-format project structures, builds and tests it. <a href="http://delver.com">We</a> have been using it for the past two months or so, and I must say it has brought great joy to <a href="http://en.wikipedia.org/wiki/Continuous_integration">the CI</a>. Before that, we used to maintain two separate sets of files &#8211; IntelliJ project files, because that&#8217;s our IDE of choice, and Eclipse files, because &#8230; that&#8217;s how the build system worked. Many a times the build broke because one did not apply a change to the eclipse file, and &#8220;it all <a href="http://www.buildsonmymachine.com/">worked on his machine</a>&#8220;. No more (we still have broken builds, but usually not because of compilation errors).</p>
<p>In related news, JetBrains recently <a href="http://blogs.jetbrains.com/idea/2009/10/intellij-idea-open-sourced/">open-sourced IntelliJ</a> itself. Tomer&#8217;s work is still worth while, simply because there is no other tool we know of that does what it does &#8211; however the code there might use some refactoring now that he can simply use portions of the IntelliJ codebase. If you want to help, go on to the <a href="http://code.google.com/p/ant-intellij-tasks/">project homepage</a>.</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/knuth-and-the-city-teamcity/' rel='bookmark' title='Permanent Link: Knuth and The City (TeamCity!)'>Knuth and The City (TeamCity!)</a></li>
<li><a href='http://ripper234.com/p/disable-resharper-c-3-syntax/' rel='bookmark' title='Permanent Link: Disable Resharper C# 3 syntax'>Disable Resharper C# 3 syntax</a></li>
<li><a href='http://ripper234.com/p/thrift-win32-binary/' rel='bookmark' title='Permanent Link: Thrift win32 binary'>Thrift win32 binary</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/si3NAFZnAY0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/ant-intellij-tasks/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/ant-intellij-tasks/</feedburner:origLink></item>
		<item>
		<title>There’s a (meta) community emerging</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/FaWaIqzXrqk/</link>
		<comments>http://ripper234.com/p/met-community-emerging/#comments</comments>
		<pubDate>Wed, 21 Oct 2009 19:52:11 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[community]]></category>
		<category><![CDATA[draw3cards]]></category>
		<category><![CDATA[StackExchange]]></category>
		<category><![CDATA[Stackoverflow]]></category>
		<category><![CDATA[World of Warcraft]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1183</guid>
		<description><![CDATA[As you probably know, I joined the new wave and got my own Stack Exchange site. It&#8217;s really amazing how many different SE sites are emerging so rapidly. There&#8217;s a strong sense of (meta) community with most of the site owners heavily participating in discussions on meta stackexchange.
There is some overlap between different sites, but most sites [...]


Related posts:<ol><li><a href='http://ripper234.com/p/trying-out-the-stackexchange-platform/' rel='bookmark' title='Permanent Link: Trying out the StackExchange platform'>Trying out the StackExchange platform</a></li>
<li><a href='http://ripper234.com/p/fake-sites/' rel='bookmark' title='Permanent Link: Fake Sites'>Fake Sites</a></li>
<li><a href='http://ripper234.com/p/stackoverflow-overflow/' rel='bookmark' title='Permanent Link: StackOverflow Overflow'>StackOverflow Overflow</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>As you <a href="http://ripper234.com/p/trying-out-the-stackexchange-platform/">probably know</a>, I joined the new wave and got my own <a href="http://draw3cards.com/">Stack Exchange site</a>. It&#8217;s really amazing how many <a href="http://meta.stackexchange.com/questions/4/list-of-stackexchange-sites">different SE sites</a> are emerging so rapidly. There&#8217;s a strong sense of (meta) community with most of the site owners heavily participating in <a href="http://meta.stackexchange.com/questions/1287/google-still-hasnt-indexed-my-site-and-its-webmasters-tools-says-ses-robots-tx">discussions</a> <a href="http://meta.stackexchange.com/questions/1316/share-the-knowledge-top-tips-list">on</a> <a href="http://meta.stackexchange.com/questions/643/what-should-i-customize-before-i-launch-my-site">meta stackexchange</a>.</p>
<p>There is some <a href="http://meta.stackexchange.com/questions/1180/the-elephant-in-the-room-many-of-us-have-started-sites-on-exactly-the-same-topi">overlap between different sites</a>, but most sites I&#8217;ve seen are <a href="http://moms4mom.com/">original</a> and <a href="http://mathoverflow.net/">useful</a>. The owner/s of <a href="http://epicadvice.com/">one SE site</a> have been nice enough to post links to other SE sites, including <a href="http://draw3cards.com/">Draw3Cards</a>, at the top of their homepage!</p>
<p>Today I convinced a friend at work to open his own website, and I think you should to &#8211; before all the good ones are taken. Come and <a href="http://beta.stackexchange.com/sign-up/">join us</a>, it&#8217;s really that easy.</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/trying-out-the-stackexchange-platform/' rel='bookmark' title='Permanent Link: Trying out the StackExchange platform'>Trying out the StackExchange platform</a></li>
<li><a href='http://ripper234.com/p/fake-sites/' rel='bookmark' title='Permanent Link: Fake Sites'>Fake Sites</a></li>
<li><a href='http://ripper234.com/p/stackoverflow-overflow/' rel='bookmark' title='Permanent Link: StackOverflow Overflow'>StackOverflow Overflow</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/FaWaIqzXrqk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/met-community-emerging/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/met-community-emerging/</feedburner:origLink></item>
		<item>
		<title>Trying out the StackExchange platform</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/OSawn8dMRdQ/</link>
		<comments>http://ripper234.com/p/trying-out-the-stackexchange-platform/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 19:29:38 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[draw3cards]]></category>
		<category><![CDATA[Magic]]></category>
		<category><![CDATA[Stackoverflow]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1176</guid>
		<description><![CDATA[For the last couple of days I&#8217;ve been obsessing over a new toy. Jeol &#38; Jeff, the powers behind StackOverflow, have launched a public beta of StackExchange &#8211; a platform for hosting Q&#38;A sites. Browsing the list of stack exchange sites, I saw several more and less successful sites, including:

The (already-profiting) site on World of [...]


Related posts:<ol><li><a href='http://ripper234.com/p/met-community-emerging/' rel='bookmark' title='Permanent Link: There&#8217;s a (meta) community emerging'>There&#8217;s a (meta) community emerging</a></li>
<li><a href='http://ripper234.com/p/stackoverflowcom/' rel='bookmark' title='Permanent Link: Stackoverflow.com'>Stackoverflow.com</a></li>
<li><a href='http://ripper234.com/p/fake-sites/' rel='bookmark' title='Permanent Link: Fake Sites'>Fake Sites</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>For the last couple of days I&#8217;ve been obsessing over <a href="http://draw3cards.com">a new toy</a>. Jeol &amp; Jeff, the powers behind <a href="http://stackoverflow.com">StackOverflow</a>, have launched a public beta of <a href="http://stackexchange.com">StackExchange</a> &#8211; a platform for hosting Q&amp;A sites. Browsing the <a href="http://meta.stackexchange.com/questions/4">list of stack exchange sites</a>, I saw several more and less successful sites, including:</p>
<ul>
<li>The (<a href="http://meta.stackexchange.com/questions/1008/early-se-sites-hows-it-going-with-adsense">already-profiting</a>) <a href="http://epicadvice.com/">site on World of Warcraft</a> (and site has barely been online for 2 weeks!)</li>
<li>AskSci, in which <a href="http://ripper234.com/p/so-this-is-what-an-empty-stackoverflow-looks-like/">I&#8217;ve been made moderator</a>, but has been rather desolate since</li>
<li><a href="http://ripper234.com/p/so-this-is-what-an-empty-stackoverflow-looks-like/"></a>And <a href="http://mathoverflow.net/">MathOverflow</a>, which seem to be already useful</li>
</ul>
<p>I decided to try and open <a href="http://draw3cards.com">my own site, about Magic: The Gathering</a>. The setup itself was rather easy. I:</p>
<ul>
<li>Bought a domain and set it up, with <a href="http://meta.stackexchange.com/questions/1689/guide-for-dummies-on-configuring-my-own-se-site-at-foo-com">some help</a></li>
<li>Seeded the site with some <a href="http://draw3cards.com/questions/3/how-does-hypnotic-specter-work-in-two-headed-giant-games">questions and answers</a></li>
<li>Tweaked the color scheme, logo and favicon (thanks Eran)</li>
<li>Got some friends to <a href="http://draw3cards.com/questions/1/how-to-draft-an-aggro-deck">help out</a> (though so far they&#8217;ve only posted answers, not questions)</li>
<li>Setup Google Analytics, and noticed incoming search traffic <a href="http://meta.stackexchange.com/questions/1844/how-much-time-are-search-visitors-staying-on-your-site">only stayed for 42 seconds on the site</a></li>
<li>Opened a small AdWords campaign, paying 1.5$ a day to test the water.</li>
<li>Post the site on this blog, of course.</li>
</ul>
<p>Now what remains to be seen is whether the site can accumulate the needed critical mass. For now, the site is in beta, meaning I don&#8217;t have to pay anything to keep it running (except time and effort). <a href="http://meta.stackexchange.com/questions/1614/how-long-will-stackexchange-be-in-beta">When the beta is over</a>, the cost will be $129 a month, which is quite challenging to make using adsense.</p>
<p>Keep your fingers crossed for me <img src='http://ripper234.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>P.S.</strong></p>
<p><span style="text-decoration: line-through;">Just got a</span> $100 coupon for AdWords by visiting Google Webmasters Tools &#8211; how cool is that? In a second look, it appears the coupon was lying in my Webmasters Tools inbox for two months now, just waiting for the perfect opportunity.</p>
<p>I also forgot to mention opening <a href="http://draw3cards.uservoice.com/">a uservoice forum</a> (+ adding the widget to my site).</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/met-community-emerging/' rel='bookmark' title='Permanent Link: There&#8217;s a (meta) community emerging'>There&#8217;s a (meta) community emerging</a></li>
<li><a href='http://ripper234.com/p/stackoverflowcom/' rel='bookmark' title='Permanent Link: Stackoverflow.com'>Stackoverflow.com</a></li>
<li><a href='http://ripper234.com/p/fake-sites/' rel='bookmark' title='Permanent Link: Fake Sites'>Fake Sites</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/OSawn8dMRdQ" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/trying-out-the-stackexchange-platform/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/trying-out-the-stackexchange-platform/</feedburner:origLink></item>
		<item>
		<title>Zendikar draft walkthrough (mono-red)</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/AJo_uq6wAAk/</link>
		<comments>http://ripper234.com/p/zendikar-draft-walkthrough-mono-red/#comments</comments>
		<pubDate>Sun, 18 Oct 2009 00:05:29 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1170</guid>
		<description><![CDATA[Chcek out my recent draft walkthrough on monored Zendikar.


Related posts:A lucky Alara Reborn walkthrough (Esper)
Alara Reborn Draft Walkthrough &#8211; 5-Color Naya
Magic draft walkthrough creator



Related posts:<ol><li><a href='http://ripper234.com/p/a-lucky-alara-reborn-walkthrough-esper/' rel='bookmark' title='Permanent Link: A lucky Alara Reborn walkthrough (Esper)'>A lucky Alara Reborn walkthrough (Esper)</a></li>
<li><a href='http://ripper234.com/p/alara-reborn-draft-walkthrough-5-color-naya/' rel='bookmark' title='Permanent Link: Alara Reborn Draft Walkthrough &#8211; 5-Color Naya'>Alara Reborn Draft Walkthrough &#8211; 5-Color Naya</a></li>
<li><a href='http://ripper234.com/p/magic-draft-walkthrough-creator/' rel='bookmark' title='Permanent Link: Magic draft walkthrough creator'>Magic draft walkthrough creator</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Chcek out my recent draft walkthrough on <a href="http://ripper234.com/magic/dr/">monored Zendikar</a>.</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/a-lucky-alara-reborn-walkthrough-esper/' rel='bookmark' title='Permanent Link: A lucky Alara Reborn walkthrough (Esper)'>A lucky Alara Reborn walkthrough (Esper)</a></li>
<li><a href='http://ripper234.com/p/alara-reborn-draft-walkthrough-5-color-naya/' rel='bookmark' title='Permanent Link: Alara Reborn Draft Walkthrough &#8211; 5-Color Naya'>Alara Reborn Draft Walkthrough &#8211; 5-Color Naya</a></li>
<li><a href='http://ripper234.com/p/magic-draft-walkthrough-creator/' rel='bookmark' title='Permanent Link: Magic draft walkthrough creator'>Magic draft walkthrough creator</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/AJo_uq6wAAk" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/zendikar-draft-walkthrough-mono-red/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/zendikar-draft-walkthrough-mono-red/</feedburner:origLink></item>
		<item>
		<title>So this is what an empty StackOverflow looks like</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/Hm0yGCLcEXw/</link>
		<comments>http://ripper234.com/p/so-this-is-what-an-empty-stackoverflow-looks-like/#comments</comments>
		<pubDate>Thu, 15 Oct 2009 12:07:24 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Ask Science]]></category>
		<category><![CDATA[Stackoverflow]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1155</guid>
		<description><![CDATA[Well, I said this would happen.
StackOverflow&#8217;s flood gates are open, and there are many new sites based on the stackoverflow engine.
One of those that I think has great potential is Ask Science, though at the moment it&#8217;s rather desolate:



Related posts:StackOverflow Overflow
Stackoverflow.com
Trying out the StackExchange platform



Related posts:<ol><li><a href='http://ripper234.com/p/stackoverflow-overflow/' rel='bookmark' title='Permanent Link: StackOverflow Overflow'>StackOverflow Overflow</a></li>
<li><a href='http://ripper234.com/p/stackoverflowcom/' rel='bookmark' title='Permanent Link: Stackoverflow.com'>Stackoverflow.com</a></li>
<li><a href='http://ripper234.com/p/trying-out-the-stackexchange-platform/' rel='bookmark' title='Permanent Link: Trying out the StackExchange platform'>Trying out the StackExchange platform</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Well, <a href="http://ripper234.com/p/stackoverflow-overflow/">I said</a> this would happen.</p>
<p>StackOverflow&#8217;s flood gates are open, and there are <a href="http://meta.stackexchange.com/questions/4/list-of-stackexchange-sites">many new sites</a> based on the stackoverflow engine.</p>
<p>One of those that I think has great potential is <a href="http://asksci.com/">Ask Science</a>, though at the moment it&#8217;s rather desolate:<br />
<img src="http://img63.imageshack.us/img63/5676/asksci.png" alt="asksci" title="asksci" width="1001" height="753" class="alignnone size-full wp-image-1156" /></p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/stackoverflow-overflow/' rel='bookmark' title='Permanent Link: StackOverflow Overflow'>StackOverflow Overflow</a></li>
<li><a href='http://ripper234.com/p/stackoverflowcom/' rel='bookmark' title='Permanent Link: Stackoverflow.com'>Stackoverflow.com</a></li>
<li><a href='http://ripper234.com/p/trying-out-the-stackexchange-platform/' rel='bookmark' title='Permanent Link: Trying out the StackExchange platform'>Trying out the StackExchange platform</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/Hm0yGCLcEXw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/so-this-is-what-an-empty-stackoverflow-looks-like/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/so-this-is-what-an-empty-stackoverflow-looks-like/</feedburner:origLink></item>
		<item>
		<title>Ouch, System process is locking my folders!</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/xtKnoNpnIeg/</link>
		<comments>http://ripper234.com/p/ouch-system-process-is-locking-my-folders/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 07:51:07 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Debugging]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1152</guid>
		<description><![CDATA[A devilish problem I’ve had in the past week is the the Windows “System” process was locking a folder or two. This was on a build agent, and was causing problems deleting that folder as part of the build. This was all happening while I was introducing a new build type to our collection – [...]


Related posts:<ol><li><a href='http://ripper234.com/p/keep-fighting-the-voodoo/' rel='bookmark' title='Permanent Link: Keep fighting the voodoo'>Keep fighting the voodoo</a></li>
<li><a href='http://ripper234.com/p/knuth-and-the-city-teamcity/' rel='bookmark' title='Permanent Link: Knuth and The City (TeamCity!)'>Knuth and The City (TeamCity!)</a></li>
<li><a href='http://ripper234.com/p/requiring-a-minimum-cpu-benchmark-in-teamcity/' rel='bookmark' title='Permanent Link: Requiring a minimum CPU benchmark in TeamCity'>Requiring a minimum CPU benchmark in TeamCity</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A devilish problem I’ve had in the past week is the the Windows “System” process was locking a folder or two. This was on a build agent, and was causing problems deleting that folder as part of the build. This was all happening while I was introducing a new build type to our collection – automated <a href="http://en.wikipedia.org/wiki/System_testing">system tests</a> using <a href="http://seleniumhq.org/">Selenium</a> – and I initially thought some voodoo in Selenium was causing the problem.</p>
<p><a href="http://lockhunter.com/">LockHunter</a> (a 64-bit <a href="http://ccollomb.free.fr/unlocker/">Unlocker</a> equivalent) wasn’t able to unlock the folder (though it did well on folders locked by other processes). The problem seemed to go away after a reboot of the build agent, but then came back to haunt me. I tried asking this on <a href="http://superuser.com/questions/52337/how-to-unlock-a-folder-locked-by-system-process-on-windows-2008">SuperUser</a> (StackOverflow’s colorful twin), but to no avail.</p>
<p>Well, last night I finally found the problem – my own computer had an open explorer window on one of the folders in the build server. I believe this window persisted even after an agent reboot. Closing it solved the problem, and achieved world peace.</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/keep-fighting-the-voodoo/' rel='bookmark' title='Permanent Link: Keep fighting the voodoo'>Keep fighting the voodoo</a></li>
<li><a href='http://ripper234.com/p/knuth-and-the-city-teamcity/' rel='bookmark' title='Permanent Link: Knuth and The City (TeamCity!)'>Knuth and The City (TeamCity!)</a></li>
<li><a href='http://ripper234.com/p/requiring-a-minimum-cpu-benchmark-in-teamcity/' rel='bookmark' title='Permanent Link: Requiring a minimum CPU benchmark in TeamCity'>Requiring a minimum CPU benchmark in TeamCity</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/xtKnoNpnIeg" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/ouch-system-process-is-locking-my-folders/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/ouch-system-process-is-locking-my-folders/</feedburner:origLink></item>
		<item>
		<title>Zendikar draft walkthough – green red</title>
		<link>http://feedproxy.google.com/~r/AQuantumImmortal/~3/NVkHoMjwitE/</link>
		<comments>http://ripper234.com/p/zendikar-draft-walkthough-green-red/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 22:20:01 +0000</pubDate>
		<dc:creator>ripper234</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Magic]]></category>
		<category><![CDATA[Walkthrough]]></category>
		<category><![CDATA[Zendikar]]></category>

		<guid isPermaLink="false">http://ripper234.com/?p=1149</guid>
		<description><![CDATA[A new year, a new Magic block. Get the latest draft walkthrough here.


Related posts:Magic draft walkthrough creator
Another draft walkthough, Grixis
Conflux draft walkthrough (Domain/5 color)



Related posts:<ol><li><a href='http://ripper234.com/p/magic-draft-walkthrough-creator/' rel='bookmark' title='Permanent Link: Magic draft walkthrough creator'>Magic draft walkthrough creator</a></li>
<li><a href='http://ripper234.com/p/another-draft-walkthrough-grixis/' rel='bookmark' title='Permanent Link: Another draft walkthough, Grixis'>Another draft walkthough, Grixis</a></li>
<li><a href='http://ripper234.com/p/conflux-draft-walkthrough-domain5-color/' rel='bookmark' title='Permanent Link: Conflux draft walkthrough (Domain/5 color)'>Conflux draft walkthrough (Domain/5 color)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>A new year, a new Magic block. Get the latest draft walkthrough <a href="http://ripper234.com/magic/zendikar-walkthrough-green-red/">here</a>.</p>


<p>Related posts:<ol><li><a href='http://ripper234.com/p/magic-draft-walkthrough-creator/' rel='bookmark' title='Permanent Link: Magic draft walkthrough creator'>Magic draft walkthrough creator</a></li>
<li><a href='http://ripper234.com/p/another-draft-walkthrough-grixis/' rel='bookmark' title='Permanent Link: Another draft walkthough, Grixis'>Another draft walkthough, Grixis</a></li>
<li><a href='http://ripper234.com/p/conflux-draft-walkthrough-domain5-color/' rel='bookmark' title='Permanent Link: Conflux draft walkthrough (Domain/5 color)'>Conflux draft walkthrough (Domain/5 color)</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/AQuantumImmortal/~4/NVkHoMjwitE" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://ripper234.com/p/zendikar-draft-walkthough-green-red/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://ripper234.com/p/zendikar-draft-walkthough-green-red/</feedburner:origLink></item>
	</channel>
</rss>
