<?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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Euphemos &#187; Geek Stuff</title>
	<atom:link href="http://blog.euphemos.com/category/geek-stuff/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.euphemos.com</link>
	<description>Things worth thinking about...</description>
	<lastBuildDate>Sun, 04 Apr 2010 00:30:11 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Oh boy, this is gonna draw some interesting press.</title>
		<link>http://blog.euphemos.com/2009/10/26/oh-boy-this-is-gonna-draw-some-interesting-press/</link>
		<comments>http://blog.euphemos.com/2009/10/26/oh-boy-this-is-gonna-draw-some-interesting-press/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 04:05:43 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[Jesus Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/?p=683</guid>
		<description><![CDATA[The Scientific Impossibility of Evolution
November 9, 2009 9:30 a.m. to 5:00 p.m. St. Pius V University (Rome)
In Response to Pope Benedict XVI’s Call for Both Sides to be Heard
http://sites.google.com/site/scientificcritiqueofevolution/
]]></description>
			<content:encoded><![CDATA[<p><strong><a href="http://sites.google.com/site/scientificcritiqueofevolution/">The Scientific Impossibility of Evolution</a></strong></p>
<p>November 9, 2009 9:30 a.m. to 5:00 p.m. St. Pius V University (Rome)<br />
In Response to Pope Benedict XVI’s Call for Both Sides to be Heard</p>
<p><a href="http://sites.google.com/site/scientificcritiqueofevolution/">http://sites.google.com/site/scientificcritiqueofevolution/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2009/10/26/oh-boy-this-is-gonna-draw-some-interesting-press/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cursor10 &#8211; don&#8217;t go here unless you have 10 minutes</title>
		<link>http://blog.euphemos.com/2008/05/20/cursor10-dont-go-here-unless-you-have-10-minutes/</link>
		<comments>http://blog.euphemos.com/2008/05/20/cursor10-dont-go-here-unless-you-have-10-minutes/#comments</comments>
		<pubDate>Wed, 21 May 2008 02:32:24 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2008/05/20/cursor10-dont-go-here-unless-you-have-10-minutes/</guid>
		<description><![CDATA[http://www.nekogames.jp/mt/2008/01/cursor10.html
 Great concept, and clean implementation, impossible to stop clicking until you beat it.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.nekogames.jp/mt/2008/01/cursor10.html">http://www.nekogames.jp/mt/2008/01/cursor10.html</a></p>
<p> Great concept, and clean implementation, impossible to stop clicking until you beat it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2008/05/20/cursor10-dont-go-here-unless-you-have-10-minutes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UPGRADINGPRODUCTCODE and Major Upgrade vs. Uninstall</title>
		<link>http://blog.euphemos.com/2007/03/21/upgradingproductcode-and-major-upgrade-vs-uninstall/</link>
		<comments>http://blog.euphemos.com/2007/03/21/upgradingproductcode-and-major-upgrade-vs-uninstall/#comments</comments>
		<pubDate>Wed, 21 Mar 2007 14:19:19 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2007/03/21/upgradingproductcode-and-major-upgrade-vs-uninstall/</guid>
		<description><![CDATA[Many people working with MSI aren&#8217;t aware of the UPGRADINGPRODUCTCODE (http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgradingproductcode.asp) property, which Windows Installer sets when uninstalling the product being upgraded. This property should be used to condition custom actions that need to be run only when &#8220;really&#8221; uninstalling vs. uninstalling as part of an upgrade.
So&#8230;

if you want a custom action to be executed [...]]]></description>
			<content:encoded><![CDATA[<p>Many people working with MSI aren&#8217;t aware of the UPGRADINGPRODUCTCODE (<a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgradingproductcode.asp">http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/upgradingproductcode.asp</a>) property, which Windows Installer sets when uninstalling the product being upgraded. This property should be used to condition custom actions that need to be run only when &#8220;really&#8221; uninstalling vs. uninstalling as part of an upgrade.</p>
<p>So&#8230;</p>
<ul>
<li>if you want a custom action to be executed only when uninstalling, add &#8220;AND NOT UPGRADINGPRODUCTCODE&#8221; to your condition</li>
<li>if you want a custom action to be executed only when upgrading, add &#8220;AND UPGRADINGPRODUCTCODE&#8221; to your condition</li>
<li>if you want a custom action to be executed only when being upgraded by a specific product (generally relevant only when multiple &#8220;editions&#8221; of a product exist), refer to the specific product code, e.g. AND UPGRADINGPRODUCTCODE=&#8221;{ABC-123}&#8221;</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2007/03/21/upgradingproductcode-and-major-upgrade-vs-uninstall/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New vs. Existing Code</title>
		<link>http://blog.euphemos.com/2006/04/19/new-vs-existing-code/</link>
		<comments>http://blog.euphemos.com/2006/04/19/new-vs-existing-code/#comments</comments>
		<pubDate>Wed, 19 Apr 2006 20:00:04 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2006/04/19/new-vs-existing-code/</guid>
		<description><![CDATA[This isn&#8217;t news, but is worth remembering&#8230;
Peter Hallam commented on what consumes most of a developer&#8217;s time between the following:

Design Code
Write New Code
Understand Existing Code
Modify Existing Code
Verify Existing Code Still Works

He argues that most developers spend most of their time understanding, modifying, and verifying that existing code still works. His focus is primarily upon how this [...]]]></description>
			<content:encoded><![CDATA[<p>This isn&#8217;t news, but is worth remembering&#8230;</p>
<p><a href="http://blogs.msdn.com/peterhal/archive/2006/01/04/509302.aspx">Peter Hallam commented</a> on what consumes most of a developer&#8217;s time between the following:</p>
<ul>
<li>Design Code</li>
<li>Write New Code</li>
<li>Understand Existing Code</li>
<li>Modify Existing Code</li>
<li>Verify Existing Code Still Works</li>
</ul>
<p>He argues that most developers spend most of their time understanding, modifying, and verifying that existing code still works. His focus is primarily upon how this balance impacts (or should impact) editor (Visual Studio) features, but the discussion is interesting outside that context also.</p>
<p>Why do we hire developers based upon how well they can write some lame from-scratch sample code? My current employer did something unique in my experience: they gave me some unfamiliar buggy code and asked me to discuss what was wrong with it, discuss some possible solutions, and implement one of them.</p>
<p>Hello? Test driven development? How about even starting with automated unit tests, even if they&#8217;re written after the code?</p>
<p>Does the whole thing make the wacky world of <a href="http://blogs.msdn.com/devdev/archive/2006/01/23/516431.aspx">literate programming</a> less whacky?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2006/04/19/new-vs-existing-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Games and the joy of failure</title>
		<link>http://blog.euphemos.com/2006/04/13/games-and-the-joy-of-failure/</link>
		<comments>http://blog.euphemos.com/2006/04/13/games-and-the-joy-of-failure/#comments</comments>
		<pubDate>Thu, 13 Apr 2006 18:38:02 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>
		<category><![CDATA[Jesus Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2006/04/13/games-and-the-joy-of-failure/</guid>
		<description><![CDATA[It is no secret that the actual or perceived possibility of failure is critical to the enjoyment of success, but the concept of failure as a source of pleasure was new to me....]]></description>
			<content:encoded><![CDATA[<p>I came across an interesting article with implications for game design and, perhaps, for the etiology of some addictions. In their study <a href="http://www.gamesconference.org/digra2005/papers/d97b3f01a7de86a2d4d01b7b71cc.doc">The Psychophysiology of Video Gaming: Phasic Emotional Responses to Game Events </a>, Ravaja, Saari, Laarni, Kallinen, Salminen, Holopainen, and Järvinen discovered that &#8220;Not only putatively positive game events, but also putatively negative events that involved active participation by the player elicited positive emotional responses&#8230;&#8221; Interestingly, the reaction to failure was more strongly positive than the reaction to success, and the pleasure associated with success was primarily anticipatory, with a noticeable drop once success was achieved. It&#8217;s no secret that a game that is too easy, that presents no opportunity for failure, is quickly abandoned as &#8220;boring&#8221;. Game designers and Game Masters have long been aware of the necessity of balancing challenge and achievement. A &#8220;Monty Haul&#8221; adventure is generally accepted to be less &#8220;fun&#8221; than &#8220;Mission: Impossible.&#8221; So it is no secret that the actual or perceived possibility of failure is critical to the enjoyment of success, but the concept of failure as a source of pleasure was new to me.</p>
<p>The upside of this is that game designers have an additional tool to apply consciously in the quest to entertain and educate. The downside is the ugly intersection of this pleasurable failure with the unhealthy psyche. For individuals convinced at some level that they deserve to fail, whether by neurochemical imbalance, environmental factors, or an agent of the enemy of their soul, this quick and repeatable source of failure can be dangerous. The endless treadmill of MMPOGs are perhaps the most dangerous. It&#8217;s like putting a crack-dispenser in an addict&#8217;s bedroom.</p>
<p>This doesn&#8217;t mean I think games are evil or should be eliminated or restricted in some way. I am firmly convinced that games, storytelling through games, and the art of game design offer benefits to society, technology innovation, education, etc. that outweigh the associated dangers. Additionally, I suspect that perhaps this pleasure in failure may underly other addictive behaviors. Similar patterns appear to exist in addictions to work, unsuccessful relationships, spending, approval from others, food, pot, and other psychological (vs. chemical) addictions.</p>
<p>What I do suggest, is that mentors, parents, pastors, and others who care about someone demonstrating symptoms of addiction consider this as a possible underlying cause. In my experience, games stopped being a snare for me when I came to grips with my belovedness in the eyes of God. Human approval, even intense human love, was insufficient. People can be deceived or mistaken; God cannot. Only recognizing that the same God who knows everything about me loves me intensely was sufficient to drive the changes that took me from addicted and depressed to joyful and free.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2006/04/13/games-and-the-joy-of-failure/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Architects vs Developers and Software Patents &#8211; Worth a read</title>
		<link>http://blog.euphemos.com/2006/04/11/architects-vs-developers-and-software-patents-worth-a-read/</link>
		<comments>http://blog.euphemos.com/2006/04/11/architects-vs-developers-and-software-patents-worth-a-read/#comments</comments>
		<pubDate>Tue, 11 Apr 2006 18:21:57 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2006/04/11/architects-vs-developers-and-software-patents-worth-a-read/</guid>
		<description><![CDATA[Ambrose Little has a thought-provoking article on Architects vs. Developers over at ASP Alliance. He follows up with some additional comments on his blog.
Oh, and speaking of thought-provoking check out Paul Graham&#8217;s latest essay on Software Patents. I actually beat SlashDot to this one by 24 hours or so which was nice. It gave me [...]]]></description>
			<content:encoded><![CDATA[<p><a href="https://mvp.support.microsoft.com/profile=1bae6533-b16f-42e1-88af-f4c4fbf3339">Ambrose Little</a> has a thought-provoking article on Architects vs. Developers over at <a href="http://aspalliance.com/777">ASP Alliance</a>. He follows up with some additional comments on <a href="http://dotnettemplar.net/default.aspx#aa059b2d1-12de-4aa8-9bd6-ac728fe5123d">his blog</a>.</p>
<p>Oh, and speaking of thought-provoking check out <a href="http://www.paulgraham.com/articles.html">Paul Graham&#8217;s</a> latest essay on <a href="http://www.paulgraham.com/softwarepatents.html">Software Patents</a>. I actually beat SlashDot to this one by 24 hours or so which was nice. It gave me a chance to ponder this before being utterly corrupted by the <a href="http://yro.slashdot.org/yro/06/04/10/1440251.shtml">SlashDot community&#8217;s</a> followup. I find Graham alternately insightful and annoying, but almost always thought-provoking.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2006/04/11/architects-vs-developers-and-software-patents-worth-a-read/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>First Computer Bug</title>
		<link>http://blog.euphemos.com/2006/01/20/first-computer-bug/</link>
		<comments>http://blog.euphemos.com/2006/01/20/first-computer-bug/#comments</comments>
		<pubDate>Fri, 20 Jan 2006 12:17:08 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2006/01/20/first-computer-bug/</guid>
		<description><![CDATA[
My friend Adam pointed out this link, and it is too critical to world history not to mention. J
http://www.history.navy.mil/photos/images/h96000/h96566kc.htm
]]></description>
			<content:encoded><![CDATA[<p class="Section1">
<p class="MsoNormal"><span style="font-size: 10pt; color: navy; font-family: Arial">My friend Adam pointed out this link, and it is too critical to world history not to mention. </span><span style="font-size: 10pt; color: navy; font-family: Wingdings">J</span></p>
<p class="MsoNormal"><span style="font-size: 10pt; color: navy; font-family: Arial"><a href="http://www.history.navy.mil/photos/images/h96000/h96566kc.htm">http://www.history.navy.mil/photos/images/h96000/h96566kc.htm</a></span></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2006/01/20/first-computer-bug/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Symbol Recognition Interview Question</title>
		<link>http://blog.euphemos.com/2005/06/09/40/</link>
		<comments>http://blog.euphemos.com/2005/06/09/40/#comments</comments>
		<pubDate>Thu, 09 Jun 2005 17:09:20 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2005/06/09/40/</guid>
		<description><![CDATA[Yesterday, I came across this post by Jomo Fisher about an interview question he's considering. The goal is to implement a symbol recognition algorithm.]]></description>
			<content:encoded><![CDATA[<p>Yesterday, I came across this post on <a href="http://blogs.msdn.com/jomo_fisher/">Jomo Fisher&#8217;s Blog</a> about <a href="http://blogs.msdn.com/jomo_fisher/archive/2005/05/20/420599.aspx">an interview question he&#8217;s considering</a>. To quote the problem in case his blog dies before mine does. . .</p>
<hr /><font size="3" face="Times New Roman">Consider this code:</font><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"><font size="2"><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">const</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">int</span> WIDTH <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> 8;<br />
<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">const</span> <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">int</span> HEIGHT <span style="font-size: 11px; color: red; font-family: Courier New; background-color: transparent">=</span> 8;</font></span><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"><font size="2"><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">interface</span> IGrid {<br />
    <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">int</span> CountBlocksSet(<span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">int</span> x1, <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">int</span> x2, <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">int</span> y1, <span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">int</span> y2);<br />
}</font></span><span style="font-size: 11px; color: black; font-family: Courier New; background-color: transparent"><font size="2"><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">enum</span> Shape {<br />
    Square,<br />
    Rectangle<br />
}</p>
<p><span style="font-size: 11px; color: blue; font-family: Courier New; background-color: transparent">static</span> Shape Recognize(IGrid grid) {<br />
    <span style="font-size: 11px; color: green; font-family: Courier New; background-color: transparent">// Implement this.</span><br />
}</p>
<p></font><font size="3" face="Times New Roman"><span>The goal is to implement a symbol recognition algorithm. The symbol can only either be a square or a rectangle. The image always fits in an 8-by-8 grid (zero relative) represented by ‘grid’. The method CountBlocksSet will return the total number of blocks that are set within the area of the rectangle passed in.</span></font></p>
<p></span></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span>Calling CountBlocksSet is very slow (imagine that it’s driving a physical scanner) so you want to call it as few times as possible. The speed does <em><span>not</span></em> depend on the size of the rectangle passed in to CountBlocksSet.</span></font></p>
<p class="MsoNormal"><font size="3" face="Times New Roman"><span><br />
<hr /></span></font></p>
<p>I misunderstood the question, so my results aren&#8217;t precisely relevant (hence the posting here and not in his comments). I thought that (0,0) (0,0) for example, would define the bottom left-most point on the grid, and therefore not define a valid area. It looks like he is actually considering that to define the bottom-leftmost square, where I considered the space between (0,0) and (1,1) to be the bottom-leftmost square.</p>
<p>So, my results may not correspond directly to his, but they might still be interesting. Play with this a bit and then compare your results to ours.  My best effort so far is 1.17 calls to CountBlocksSet per grid.</p>
<p>One pointer to verify algorithm correctness. We <a href="http://www.mathematik.uni-bielefeld.de/~sillke/SEQUENCES/grid-squares">know</a> that the number of squares should equal 204, the number of rectangles (including squares) should equal 1296, and the number of non-square rectangles would therefore be 1092.</p>
<p>Attached are <a href="http://blog.euphemos.com/wp-content/uploads/2008/03/testdrivercs.txt" title="testdrivercs.txt">testdrivercs.txt</a>, the test driver and sample implementation, and <a href="http://blog.euphemos.com/wp-content/uploads/2008/03/gridcs.txt" title="gridcs.txt">gridcs.txt</a>, the sample IGrid implementation.</p>
<p><a href="http://blog.euphemos.com/wp-content/uploads/2008/03/mysolutioncs.txt" title="mysolutioncs.txt">mysolutioncs.txt</a> is also attached, and includes my iterative improvements.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2005/06/09/40/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>MSDN Nuggets from the UK</title>
		<link>http://blog.euphemos.com/2005/06/07/msdn-nuggets-from-the-uk/</link>
		<comments>http://blog.euphemos.com/2005/06/07/msdn-nuggets-from-the-uk/#comments</comments>
		<pubDate>Tue, 07 Jun 2005 12:52:24 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2005/06/07/msdn-nuggets-from-the-uk/</guid>
		<description><![CDATA[MSDN Nuggets
Don&#8217;t have the time to read a 10-page how-to article or watch a full length webcast? Try an MSDN Nugget, a webcast that takes you step-by-step to discovering new functionality or exploring a hot developer topic, all in 10-15 minutes. View them online or download for later reference.
http://www.microsoft.com/uk/msdn/events/nuggets.aspx
The few I&#8217;ve watched so far were [...]]]></description>
			<content:encoded><![CDATA[<p><strong>MSDN Nuggets</strong></p>
<p>Don&#8217;t have the time to read a 10-page how-to article or watch a full length webcast? Try an MSDN Nugget, a webcast that takes you step-by-step to discovering new functionality or exploring a hot developer topic, all in 10-15 minutes. View them online or download for later reference.</p>
<p><a href="http://www.microsoft.com/uk/msdn/events/nuggets.aspx">http://www.microsoft.com/uk/msdn/events/nuggets.aspx</a></p>
<p>The few I&#8217;ve watched so far were &#8220;not lame.&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2005/06/07/msdn-nuggets-from-the-uk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fusion handles missing assemblies poorly</title>
		<link>http://blog.euphemos.com/2005/06/06/fusion-handles-missing-assemblies-poorly/</link>
		<comments>http://blog.euphemos.com/2005/06/06/fusion-handles-missing-assemblies-poorly/#comments</comments>
		<pubDate>Mon, 06 Jun 2005 23:56:02 +0000</pubDate>
		<dc:creator>e</dc:creator>
				<category><![CDATA[Geek Stuff]]></category>

		<guid isPermaLink="false">http://blog.euphemos.com/2005/06/06/fusion-handles-missing-assemblies-poorly/</guid>
		<description><![CDATA[Junfeng Zhang's .NET Framework notes (http://blogs.msdn.com/junfeng/archive/2005/06/03/424680.aspx) referenced a bug logged against Fusion and answered as "Won't Fix". I do not think that Microsoft has correctly understood or responded to the problem.]]></description>
			<content:encoded><![CDATA[<p>Junfeng Zhang&#8217;s .NET Framework notes (<a href="http://blogs.msdn.com/junfeng/archive/2005/06/03/424680.aspx">http://blogs.msdn.com/junfeng/archive/2005/06/03/424680.aspx</a>) referenced <a href="http://lab.msdn.microsoft.com/productfeedback/viewfeedback.aspx?feedbackid=6ca1cd8c-4cc4-4456-8c50-7705b5157548">a bug logged against Fusion</a> and answered as &#8220;Won&#8217;t Fix&#8221;. I do not think that Microsoft has correctly understood or responded to the problem.</p>
<p>Here&#8217;s a quick summary of the bug:</p>
<ul>
<li>Install two assemblies Binding.exe and ClassLibrary1.dll, with Binding dependent upon ClassLibrary1.</li>
<li>Delete ClassLibary1.dll.</li>
<li>Launch Binding.</li>
<li>MSI is not invoked for a repair, and the load fails with &#8220;Unhandled Exception: System.IO.FileNotFoundException: File or assembly name ClassLibrary1, or one of its dependencies, was not found.&#8221;</li>
</ul>
<p>The problem is that Fusion allows the assembly binding to fail rather than invoke <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/msiprovideassembly.asp">MsiProvideAssembly </a>(&#8230;INSTALLMODE_DEFAULT&#8230;). The <a href="http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconhowruntimelocatesassemblies.asp">MSDN article describing how assemblies are located</a> says that &#8220;If the assembly is not found after probing, the runtime requests the Windows Installer to provide the assembly.&#8221; This is referring to dependent assemblies, not to how Fusion attempts to locate assemblies directly invoked via Explorer.</p>
<p>Junfeng Zhang&#8217;s response is:</p>
<p>&#8220;We don&#8217;t invoke MSI install every time we see a binding failure. There are many by-design binding failure for resource probing. If we do that the perf will go to hell.</p>
<p>Instead, we query MSI before we invoke MSI install. If MSI says it has the component we then will invoke MSI install. In John&#8217;s case, the query returns nothing because ClassLibrary1.dll is in the wrong context/component.&#8221;</p>
<p>To address each point without hijacking that post. . .</p>
<p>There are certainly by-design binding failures, but these are most often for .resource assemblies, and do not result in a final Unhandled Exception attempting to load (right?). In this case, Fusion knows that the assembly is going to fail to load and that it is because there was an unhandled exception while attempting to load a dependency. The probing process already consumes significant time at this point, so investing additional time necessary to ask MSI to provide the assembly and repair if necessary seems like a good return on investment. The only time we&#8217;d take the hit of actually running a repair would be when MsiProvideAssembly detects that a repair is necessary.</p>
<p>Without knowledge of Fusion&#8217;s implementation, I can only speculate about how they are querying MSI in this scenario to see if it &#8220;has the component&#8221;. It doesn&#8217;t appear that Fusion ever loads MSI into it&#8217;s process, and no separate msiexec process is started. If Fusion used MsiProvideComponent (&#8230;INSTALLMODE_DEFAULT&#8230;) then the directly invoked assembly and any components in the component&#8217;s feature or feature parent would be reinstalled. Even if Fusion is somehow querying MSI in this scenario, doing so for only the directly invoked component would be almost useless in a real-world scenario. Very rarely would we have an assembly with no dependencies.</p>
<p>I&#8217;m not sure what &#8220;the query returns nothing because ClassLibrary1.dll is in the wrong component&#8221; means. MSI only allows one assembly per component, so I assume that &#8220;wrong component&#8221; just means &#8220;not the component we&#8217;re specifically verifying&#8221;. Even that is suspect, however, since a Component&#8217;s state can only be accurately evaluated in the context of a Feature. The &#8220;wrong&#8221; thing here seems to be Fusion&#8217;s implementation of the described functionality. Fusion should be using the MsiProvideComponent method rather than directly referencing a component out of the context of the associated feature.</p>
<p>The best solution would seem to be that if an assembly fails to bind dependencies after probing, the runtime requests that Windows Installer provide the assembly; <em>the same solution that the documentation indicates has been implemented</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.euphemos.com/2005/06/06/fusion-handles-missing-assemblies-poorly/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.404 seconds -->
