<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Nick Berardi's Coder Journal</title><link>http://www.coderjournal.com</link><description>while(!(succeed = try()));</description><lastBuildDate>Fri, 04 Dec 2009 22:11:25 +0000</lastBuildDate><generator>http://wordpress.org/?v=2.8.5</generator><language>en</language><sy:updatePeriod>hourly</sy:updatePeriod><sy:updateFrequency>1</sy:updateFrequency><cloud domain="www.coderjournal.com" port="80" path="/?rsscloud=notify" registerProcedure="" protocol="http-post" /><creativeCommons:license>http://creativecommons.org/licenses/by-sa/3.0/</creativeCommons:license><image><link>http://creativecommons.org/licenses/by-sa/3.0/</link><url>http://creativecommons.org/images/public/somerights20.gif</url><title>Some Rights Reserved</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/coderjournal" type="application/rss+xml" /><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/coderjournal" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsalloy.com/?rss=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.newsalloy.com/subrss3.gif">Subscribe with NewsAlloy</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://download.attensa.com/app/get_attensa.html?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.attensa.com/blogs/attensa/WindowsLiveWriter/BadgeredintoBadges_10C02/attensa_feed_button5.gif">Subscribe with Attensa for Outlook</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.flurry.com/pushRssFeed.do?r=fb&amp;url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.flurry.com/images/flurry_rss_logo2.gif">Subscribe with Flurry</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fcoderjournal" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>jQuery 1.4 Alpha 1 Released</title><link>http://feedproxy.google.com/~r/coderjournal/~3/pwQc_IaKvfI/</link><comments>http://www.coderjournal.com/2009/12/jquery-1-4-alpha-1-released/#comments</comments><pubDate>Fri, 04 Dec 2009 22:09:53 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[News]]></category><category><![CDATA[jQuery]]></category><guid isPermaLink="false">http://www.coderjournal.com/2009/12/jquery-1-4-alpha-1-released/</guid><description><![CDATA[Looks like some great new improvements coming to the 1.4 release.  It doesn’t look like any new methods are being added, but updating many of the new ones released with 1.3.
There are a few areas in jQuery that have seen extensive changes since 1.3.2 was released:

live was drastically overhauled and now supports submit, change, mouseenter, [...]]]></description><content:encoded><![CDATA[<p>Looks like some great <a href="http://blog.jquery.com/2009/12/04/jquery-14-alpha-1-released/">new improvements coming to the 1.4 release</a>.  It doesn’t look like any new methods are being added, but updating many of the new ones released with 1.3.</p>
<blockquote><p>There are a few areas in jQuery that have seen extensive changes since 1.3.2 was released:</p>
<ul>
<li><strong>live</strong> was drastically overhauled and now supports submit, change, mouseenter, mouseleave, focus, and blur events in all browsers. Also now supports context and data.</li>
<li><strong>append, prepend, etc.</strong> have been heavily optimized.</li>
<li><strong>add</strong> has been adjusted to always return elements in document order.</li>
<li><strong>find</strong>, <strong>empty</strong>, <strong>remove</strong>, <strong>addClass</strong>, <strong>removeClass</strong>, <strong>hasClass</strong>, <strong>attr</strong>, and <strong>css</strong> have been heavily optimized.</li>
</ul>
<p>Full details concerning the release are forthcoming &#8211; for now we just need your help in catch regressions. Some more details can be found in <a href="http://ejohn.org/blog/talks-at-the-2009-jquery-conference/">John Resig’s keynote at the 2009 jQuery Conference</a>.</p></blockquote>
<p><strong>Grab the code:</strong></p>
<ul>
<li>Regular: <a href="http://code.jquery.com/jquery-1.4a1.js">http://code.jquery.com/jquery-1.4a1.js</a></li>
<li>Minified: <a href="http://code.jquery.com/jquery-1.4a1.min.js">http://code.jquery.com/jquery-1.4a1.min.js</a></li>
</ul>
<p><strong>NOTE:</strong> If you’re using jQuery 1.4a1 and you run into an error please make sure that you’re using the regular version of the code, it’ll make it easier to spot where the error is occurring.</p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/522B297A5ABDCECB332E0C6F0167D2AB74F95955"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/522B297A5ABDCECB332E0C6F0167D2AB74F95955"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=pwQc_IaKvfI:5XOIJKtuHsw:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pwQc_IaKvfI:5XOIJKtuHsw:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pwQc_IaKvfI:5XOIJKtuHsw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pwQc_IaKvfI:5XOIJKtuHsw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pwQc_IaKvfI:5XOIJKtuHsw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=pwQc_IaKvfI:5XOIJKtuHsw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pwQc_IaKvfI:5XOIJKtuHsw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=pwQc_IaKvfI:5XOIJKtuHsw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pwQc_IaKvfI:5XOIJKtuHsw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/pwQc_IaKvfI" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/12/jquery-1-4-alpha-1-released/feed/</wfw:commentRss><slash:comments>0</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/12/jquery-1-4-alpha-1-released/</feedburner:origLink></item><item><title>Sometimes you just need to CodingHorror it!</title><link>http://feedproxy.google.com/~r/coderjournal/~3/cocqrQrgslo/</link><comments>http://www.coderjournal.com/2009/12/sometimes-you-just-need-to-codinghorror-it/#comments</comments><pubDate>Thu, 03 Dec 2009 17:53:46 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[C#]]></category><category><![CDATA[How To]]></category><category><![CDATA[Programming]]></category><category><![CDATA[SQL]]></category><category><![CDATA[Codinghorror]]></category><category><![CDATA[Entity Framework]]></category><category><![CDATA[SubSonic]]></category><guid isPermaLink="false">http://www.coderjournal.com/2009/12/sometimes-you-just-need-to-codinghorror-it/</guid><description><![CDATA[The title of this post is a tongue-in-cheek reference to SubSonic’s inline query by the same name, which in turn is a reference to the blogger Jeff Atwood’s blog who you should all know.&#160; Rob Conery, the SubSonic project leader, named the inline query class CodingHorror after he allegedly read Jeff Atwood’s post titled Embracing [...]]]></description><content:encoded><![CDATA[<p>The title of this post is a tongue-in-cheek reference to <a href="http://www.subsonicproject.com/docs/CodingHorror" target="_blank">SubSonic’s inline query</a> by the same name, which in turn is a reference to the blogger <a href="http://www.codinghorror.com" target="_blank">Jeff Atwood’s blog</a> who you should all know.&#160; <a href="http://blog.wekeroad.com/" target="_blank">Rob Conery</a>, the SubSonic project leader, named the inline query class <em>CodingHorror</em> after he allegedly read Jeff Atwood’s post titled <a href="http://www.codinghorror.com/blog/archives/000989.html" target="_blank">Embracing Languages Inside Languages</a>, in which he bestowed the virtues of inline SQL inside your code, instead of the standard bequeathed statement that I bet you all have heard “We do all database work in stored procedures.”.&#160; Jeff outlined his though process on ad-hoc vs stored procs as follows:</p>
<blockquote><p>The <a href="http://www.subsonicproject.com">Subsonic project</a> attempts to do something similar for SQL. Consider this SQL query: </p>
<div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:87722ddd-ee8d-49e6-82ff-632cf6f9517e" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre class="brush: sql">SELECT * from Customers WHERE Country = "USA"
ORDER BY CompanyName</pre>
</div>
<p>Here&#8217;s how we would express that same SQL query in SubSonic&#8217;s fluent interface:</p>
<p><div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:b43cadf1-3403-4c34-aa02-77b7e3bf2ce0" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre class="brush: c#">CustomerCollection c = new CustomerCollection();
c.Where(Customer.Columns.Country, "USA");
c.OrderByAsc(Customer.Columns.CompanyName);
c.Load();</pre>
</div>
<p>I&#8217;ve mentioned before that <a href="http://www.codinghorror.com/blog/archives/000617.html">I&#8217;m no fan of object-oriented rendering</a> when a simple string will suffice. That&#8217;s exactly the reaction I had here; why in the world would I want to use four lines of code instead of one? This seems like a particularly egregious example. <b>The SQL is harder to write and more difficult to understand when it&#8217;s wrapped in all that proprietary SubSonic object noise.</b> Furthermore, if you don&#8217;t learn the underlying SQL&#8211; and how databases work&#8211; you&#8217;re in serious trouble as a software developer.</p>
</blockquote>
<h3>Enough of the History lesson, why are you writing this post</h3>
<p>Well the reason for this post is two fold, I haven’t written a post in a couple of weeks, and I wanted to write about my own <em>CodingHorror</em> moment, while working with the Entity Framework, that solved a big problem I was having with getting the LIKE statement to work in LINQ.</p>
<p>I am working with a client of mine trying to expose their data to the web via a simple REST service.&#160; Their whole database model has been constructed in the Entity Framework in a simple active record format.&#160; One of the requirements, I was given, was to support wildcards on a couple of the input fields.&#160; I thought this was no big deal, because I knew that the <strong>StartWith</strong>, <strong>EndsWith</strong>, and <strong>Contains</strong> methods of the <strong>System.String</strong> object, when used in LINQ, translated down to the SQL LIKE operator.&#160; </p>
<p>However at the time I didn’t anticipate how much of a pain in the butt it was to actually figure out which of these three methods I should use depending on where the wildcard was placed in the string.&#160; And how I would support a wildcard that was placed in the middle of a string.</p>
<h3>Enter Entity Frameworks’s parameterized Where method</h3>
<p>The parameterized <a href="http://msdn.microsoft.com/en-us/library/bb338811.aspx" target="_blank"><strong>Where</strong></a> method, of the <em>ObjectQuery&lt;T&gt; </em>object, really saved my butt.&#160; It allowed me to produce the exact effect of the query I was looking for, and with out a lot of hacking.&#160; Here is what I did:</p>
<p><div class="wlWriterEditableSmartContent" id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:bcba398a-b2c4-4854-a7ea-c9baa1d7efdc" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px">
<pre class="brush: c#">if (!String.IsNullOrEmpty(toAddress))
	table = table.Where(
		"it.ToAddress LIKE @toAddress",
		new ObjectParameter("toAddress", toAddress)
	);

var results =
	from result in table
	where result.Account.AccountId == accountId
		&amp;&amp; result.DateTime &gt;= startDate

return View(results.ToList());</pre>
</div>
<p>The best part of the above code is that I can still use LINQ, and jump in to standard SQL syntax when the LINQ syntax fell short.&#160; </p>
<p>This is my opinion gives the Entity Framework a step above the rest, because it means that I don’t have to complicate my life and my program by moving to a stored proc or making the whole select statement inline-SQL (which I wouldn’t ever do).&#160; </p>
<p>Features like this that make developing software easier, and obviously have the programmer in mind, are what we should all strive for.&#160; I like this for the very fact that the Entity Framework team has acknowledged that LINQ, while a wonderful addition to .NET, doesn’t meet all the needs for pulling data from the database and they sought to minimize the short comings by allowing developers to jump back in to the natural SQL language.&#160; This is a wonderful addition in my book.</p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/9D1C43F35B6C93D945257BE497093B5E1BBEE512"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/9D1C43F35B6C93D945257BE497093B5E1BBEE512"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=cocqrQrgslo:p-xkjJL5z9k:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=cocqrQrgslo:p-xkjJL5z9k:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=cocqrQrgslo:p-xkjJL5z9k:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=cocqrQrgslo:p-xkjJL5z9k:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=cocqrQrgslo:p-xkjJL5z9k:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=cocqrQrgslo:p-xkjJL5z9k:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=cocqrQrgslo:p-xkjJL5z9k:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=cocqrQrgslo:p-xkjJL5z9k:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=cocqrQrgslo:p-xkjJL5z9k:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/cocqrQrgslo" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/12/sometimes-you-just-need-to-codinghorror-it/feed/</wfw:commentRss><slash:comments>0</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/12/sometimes-you-just-need-to-codinghorror-it/</feedburner:origLink></item><item><title>Create an attractive loading panel in jQuery</title><link>http://feedproxy.google.com/~r/coderjournal/~3/UgcZu5XjC3s/</link><comments>http://www.coderjournal.com/2009/11/create-an-attractive-loading-panel-in-jquery/#comments</comments><pubDate>Fri, 13 Nov 2009 06:27:05 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[How To]]></category><category><![CDATA[JavaScript]]></category><category><![CDATA[Programming]]></category><category><![CDATA[AJAX]]></category><category><![CDATA[jQuery]]></category><category><![CDATA[Usability]]></category><guid isPermaLink="false">http://www.coderjournal.com/2009/11/create-an-attractive-loading-panel-in-jquery/</guid><description><![CDATA[One of the important things about web programming, especially when using AJAX, from a usability standpoint is to provide a responsive user interface to the audience.  This level of responsiveness to the user’s actions can be achieved in many different ways; showing messages, changing colors, adding animation, changing contexts, basically anything that provides a natural [...]]]></description><content:encoded><![CDATA[<p>One of the important things about web programming, especially when using AJAX, from a usability standpoint is to provide a responsive user interface to the audience.  This level of responsiveness to the user’s actions can be achieved in many different ways; showing messages, changing colors, adding animation, changing contexts, basically anything that provides a natural transition from the action performed by the user to the reaction by the application to indicate that their action is actually causing something to happen.</p>
<p>One of the companies that has gone way beyond standard application responsiveness is a company called <a href="http://www.thirteen23.com">thirteen23</a>.  They put an amazing level of detail and thought in to every action that the user performs.  A great example of their skilful approach to application development is a WPF Twitter client they call <a href="http://www.thirteen23.com/experiences/desktop/blu/">Blu</a>.  An example of the level of thought they provide is their reply feature they offer.</p>
<p><a href="http://www.coderjournal.com/uploads/2009/11/thirteen23_blu2.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="thirteen23_blu" src="http://www.coderjournal.com/uploads/2009/11/thirteen23_blu_thumb.png" border="0" alt="thirteen23_blu" width="853" height="198" /></a></p>
<p>Not only are they solving a problem with this user interaction, but they are providing a feedback mechanism, with animation and context switching, to the user.  If you haven’t already download the Blu client, you should definitely take a look at it, and notice all the subtle usability features that make it a really great tool.</p>
<h3>A feeback mechanism we all can do</h3>
<p>I don’t even think I could achieve what thirteen23 has achieved with Blu or even write up a good blog post about everything they have done right with this Twitter client.  But one thing that I can do is show you how you can add an attractive loading panel to your website, with relatively no effort and that will provide ample feedback for your users during an AJAX request.  For my example I am going to be using jQuery, but what I am showing you is easily ported to other JavaScript frameworks.</p>
<h3>The example</h3>
<p>The first thing I have is this pretty graph with a couple of inputs and an <em>Update</em> button.</p>
<p><a href="http://www.coderjournal.com/uploads/2009/11/graph.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="graph" src="http://www.coderjournal.com/uploads/2009/11/graph_thumb.png" border="0" alt="graph" width="705" height="294" /></a></p>
<p>When I click the update button is does a standard <a href="http://docs.jquery.com/Ajax/jQuery.get">jQuery.get(…)</a> command against my web server to pull the new graph data.  However depending on the date range, which dictates the number of plot points I need to pull for the graph, it can take anywhere from a half second to 5 seconds to pull all the data necessary to show the graph. A half second isn’t bad, because that is just about fast enough where they consider the new graph showing up a adequate response to their action of clicking the <em>Update</em> button.  However 5 seconds is really pushing their patients.  So in order to give the feeling of something is really happening because of their button click, we need to provide a feedback mechanism.  The feedback mechanism I choose to implement was a standard loading window.</p>
<h4>First things first</h4>
<p>The first things we need to do is setup the necessary HTML elements and CSS styling.  Before I went off and added in my HTML and CSS, I first needed to pick out a loading animated image that I liked and worked with the look and feel of the website.  Lucky for me there is a great AJAX Loader generator at a site called <a href="http://www.ajaxload.info/">http://www.ajaxload.info/</a>.</p>
<p>After I found the image I was interested in using with my website, I then needed to add the HTML.  The first thing I needed to do was create the desired content area, or update pane, that would be the focus area of the update.  I did this by creating a wrapper around my graph, called <em>report-pane</em>, and then added an element called <em>report-loading</em>, which would be the loading window that would be styled by the CSS.</p>
<div id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:fbba594d-cffe-4d38-9261-0b399518f78d" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre class="brush: html">&lt;div id="report-pane" style="position: relative;"&gt;
	&lt;div id="report-loading" class="loading"&gt;&lt;img src="/Content/images/ajax-loader.gif" width="32" height="32" /&gt;&lt;br /&gt;&lt;strong&gt;Loading&lt;/strong&gt;&lt;/div&gt;

	&lt;!-- report here --&gt;
&lt;/div&gt;</pre>
</div>
<p>The next thing I did was add in the CSS that would render my loading window in an appealing way that fit in to the design of the site.</p>
<div id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:6bc83265-13b4-4921-9770-308bb4fd6475" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre class="brush: css">/*  Loading
**********************************************************************/

.loading {
	position: absolute;
	display: none;
	border: 1px solid #5c9ccc;
	padding: 2px;
	background-color: #5c9ccc;
	color: #ffffff;
	opacity: 0.90;
	-webkit-border-radius: 5px;
	-moz-border-radius: 5px;
	width: 100px;
	height: 50px;
	text-align: center;
	z-index: 100000;
}</pre>
</div>
<p>After I had the necessary markup and styles in place, the <em>update-loading</em> element I added to the HTML looked like this:</p>
<p><a href="http://www.coderjournal.com/uploads/2009/11/loading_panel.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="loading_panel" src="http://www.coderjournal.com/uploads/2009/11/loading_panel_thumb.png" border="0" alt="loading_panel" width="124" height="70" /></a></p>
<p>Now I can move on to creating the actual user interaction.</p>
<h4>Enter jQuery</h4>
<p>jQuery has a couple nice global events that trigger whenever an AJAX request being made.  The two we are going to use today are called <a href="http://docs.jquery.com/Ajax/ajaxStart">ajaxStart</a> and <a href="http://docs.jquery.com/Ajax/ajaxStop">ajaxStop</a>.  The method names are a pretty good indicator of their functionality, so I won’t bother going in to detail.</p>
<p>The actual jQuery JavaScript code for getting this to display is pretty trivial.  Which speaks more to the power and flexibility of jQuery, more than anything else.</p>
<div id="scid:f32c3428-b7e9-4f15-a8ea-c502c7ff2e88:1ff5bd95-5258-4633-95dd-d572eaedddc7" class="wlWriterEditableSmartContent" style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px">
<pre class="brush: javascript">$("#report-pane").ajaxStart(function() {
	var width = $(this).width();
	var height = $(this).height();

    $("#report-loading").css({
		top: ((height / 2) - 25),
		left: ((width / 2) - 50)
    }).fadeIn(200);    // fast fade in of 200 mili-seconds
}).ajaxStop(function() {
	$("#report-loading", this).fadeOut(1000);    // slow fade out of 1 second
});</pre>
</div>
<p>There are two things you should pay special attention to in the above code.  The first is the fact that I want the loading screen to be positioned in the center of the graph so that, so that it is very apparent to the user what is being updated, and because their attention is already on the graph as the main focal point of their clicking of the <em>Update</em> button.  I do this by taking half the width and height of the <em>report-pane</em> and subtracting the size of the <em>report-loading</em> box, this will give me the <em>x</em> and <em>y</em> coordinates at which to place the <em>report-loading</em> box inside the <em>report-pane</em>.</p>
<p>The second thing you should take note of is that I do a quick fade in of 200 mili-seconds, so that the loading box appears almost instantaneously after they have clicked the <em>Update</em> button.  However on the face out, after the AJAX request has finished, I want them to really notice that the action has completed so I make the face-out 5 times longer than the fade in.  This provides enough time for them to notice that the action has completed and that the plot points being shown in the graph have been updated.</p>
<h4>Final Result</h4>
<p>And here is what the final result looks like, after adding only a handful of code to my already existing application.</p>
<p><a href="http://www.coderjournal.com/uploads/2009/11/graph_loading.png"><img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="graph_loading" src="http://www.coderjournal.com/uploads/2009/11/graph_loading_thumb.png" border="0" alt="graph_loading" width="708" height="296" /></a></p>
<p>Not bad huh?  And it didn’t even require any process change to my already working application.  It was really that easy, so you really have no excuse for not adding a little flare and usability to your web application.  Your users will thank you by lowering their anxiety level a little by not having to wonder if that button they just clicked actually did anything.</p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/2A62DD5DFA430A50CEAEAC058855693DA2897FEB"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/2A62DD5DFA430A50CEAEAC058855693DA2897FEB"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=UgcZu5XjC3s:9ZGQQ129dHA:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=UgcZu5XjC3s:9ZGQQ129dHA:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=UgcZu5XjC3s:9ZGQQ129dHA:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=UgcZu5XjC3s:9ZGQQ129dHA:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=UgcZu5XjC3s:9ZGQQ129dHA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=UgcZu5XjC3s:9ZGQQ129dHA:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=UgcZu5XjC3s:9ZGQQ129dHA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=UgcZu5XjC3s:9ZGQQ129dHA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=UgcZu5XjC3s:9ZGQQ129dHA:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/UgcZu5XjC3s" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/11/create-an-attractive-loading-panel-in-jquery/feed/</wfw:commentRss><slash:comments>4</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/11/create-an-attractive-loading-panel-in-jquery/</feedburner:origLink></item><item><title>Philly Code Camp 2009.2</title><link>http://feedproxy.google.com/~r/coderjournal/~3/pzgmswtwypE/</link><comments>http://www.coderjournal.com/2009/10/code-camp/#comments</comments><pubDate>Sun, 18 Oct 2009 19:59:04 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[Personal]]></category><category><![CDATA[Programming]]></category><category><![CDATA[Code Camp]]></category><category><![CDATA[Code Camp 2009.2]]></category><category><![CDATA[philly.net]]></category><category><![CDATA[Public Speaking]]></category><guid isPermaLink="false">http://www.coderjournal.com/?p=783</guid><description><![CDATA[As I indicated a couple weeks ago I was going to be speaking at the Philly Code Camp 2009.2.  If you weren&#8217;t there you missed a great day of learning about many of the new technologies that are going to matter to you, as a developer, in the next 12 months.  Not all [...]]]></description><content:encoded><![CDATA[<p><img src="http://www.coderjournal.com/uploads/2009/10/pr_zune_hd_f.jpg" alt="Zune HD" title="Zune HD" width="200" class="alignright size-full wp-image-789" align="right" />As I <a href="http://www.coderjournal.com/2009/09/philly-code-camp-2009-2/">indicated a couple weeks ago</a> I was going to be speaking at the Philly Code Camp 2009.2.  If you weren&#8217;t there you missed a great day of learning about many of the new technologies that are going to matter to you, as a developer, in the next 12 months.  Not all of the topics were Microsoft related or even Developer related, for the first time this year there was an Enterprise IT track, targeting specifically you network admins.  So Code Camp next year is something you should pay attention too, even if you are not a developer.</p>
<p>Also the Beginner Track was broken in to two different tracks this year, Beginner I (which I was apart of) is designed for those of you who are brand new to software development and want to get a feel for the tools, Beginner II is designed for those of you who already have a handle on the tools and want to start learning a little more about developing software.  Both are great tracks and both had a very good showing, so if you know a high school student, college student, or seasoned learner that wants to start developing software, they should stay tuned and check back with the <a href="http://www.phillydotnet.org">Philly.NET website</a> in late March 2010.</p>
<p>Also if you weren&#8217;t there, I really hope you can make the next one in April.  You will not be disappointed.  The two presentations that I attended this Code Camp were:</p>
<ol>
<li><a href="http://codingsmarter.com">Al Katawazi&#8217;s</a> presentation on <a href="http://codingsmarter.com/post/2009/10/PhillyNet.aspx">using ASP.NET MVC in the Enterprise</a>.</li>
<li><a href="http://smallandmighty.net/">Dani Diaz&#8217;s</a> presentation on the Managed Extensibility Framework (MEF)</li>
</ol>
<p>Both presentations were interesting and engaging and I highly recommend them as speakers.</p>
<p>While I am on the subject, if you have a chance, and were present for my talks, please take the time to respond to the survey of what you thought about Philly Code Camp 2009.2 and specifically my talks.  This is the only way that Philly.NET Users Group can get feed back on what to do better next time and what worked great this time around.  I look forward to the feedback.  And there is a Zune HD in it for one lucky winner.</p>
<ul>
<li><strong><a href="http://codecamp.phillydotnet.org/2009-2/Lists/Evaluation/NewForm.aspx">Code Camp 2009.2 Evaluation</a></strong></li>
</ul>
<p>As I promised in my talks here are the downloadable resources that I used as part of my presentation.</p>
<hr/>
<h3>Beginner I Track &#8211; 10:30 AM &#8211; Gooey GUI&#8230; Programming in Visual Studio</h3>
<p><iframe src="http://docs.google.com/present/embed?id=dcrrgz44_43c2tgzkd5&#038;interval=5&#038;size=m" frameborder="0" width="555" height="451"></iframe></p>
<ul>
<li><strong>Microsoft Visual Studio Express</strong><br/><a href="http://www.microsoft.com/express/download">http://www.microsoft.com/express/download</a></li>
<li><strong>Microsoft SQL Server Express w/ Tools</strong><br/><a href="http://www.microsoft.com/express/sql/download">http://www.microsoft.com/express/sql/download</a></li>
<li><strong>Sara Ford&#8217;s Blog:</strong><br/><a href="http://blogs.msdn.com/saraford">http://blogs.msdn.com/saraford</a></li>
<li>And Sara Ford&#8217;s best selling <a href="http://www.amazon.com/gp/product/0735626405?tag=coderjournal-20">book on the subject</a></li>
</ul>
<hr/>
<h3>Tools Track &#8211; 3:30 AM &#8211; Visual Studio 2010 Extensibility</h3>
<p><iframe src="http://docs.google.com/present/embed?id=dcrrgz44_23g8s3sqd8&#038;interval=5&#038;size=m" frameborder="0" width="555" height="451"></iframe></p>
<ul>
<li><strong>MSDN Visual Studio Extensibility</strong><br/><a href="http://www.msdn.com/vsx">http://www.msdn.com/vsx</a></li>
<li><strong>Visual Studio Extensibility Team Blog</strong><br/><a href="http://blogs.msdn.com/vsxteam">http://blogs.msdn.com/vsxteam</a></li>
<li><strong>Samples shown during demonstration</strong><br/><a href="http://editorsamples.codeplex.com/">http://editorsamples.codeplex.com/</a></li>
<li><strong>My project for the URL Rewriter showing during demonstration</strong><br/><a href="http://urlrewriter.codeplex.com/">http://urlrewriter.codeplex.com/</a></li>
</ul>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/3D6F18E31636DE9A876C63B3267D7C2413BA660A"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/3D6F18E31636DE9A876C63B3267D7C2413BA660A"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=pzgmswtwypE:cOYFg-QsLSI:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pzgmswtwypE:cOYFg-QsLSI:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pzgmswtwypE:cOYFg-QsLSI:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pzgmswtwypE:cOYFg-QsLSI:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pzgmswtwypE:cOYFg-QsLSI:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=pzgmswtwypE:cOYFg-QsLSI:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pzgmswtwypE:cOYFg-QsLSI:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=pzgmswtwypE:cOYFg-QsLSI:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=pzgmswtwypE:cOYFg-QsLSI:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/pzgmswtwypE" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/10/code-camp/feed/</wfw:commentRss><slash:comments>0</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/10/code-camp/</feedburner:origLink></item><item><title>I am going to be speaking at Philly Code Camp 2009.2</title><link>http://feedproxy.google.com/~r/coderjournal/~3/IN1DiX7s47Y/</link><comments>http://www.coderjournal.com/2009/09/philly-code-camp-2009-2/#comments</comments><pubDate>Wed, 30 Sep 2009 12:03:49 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[News]]></category><category><![CDATA[Personal]]></category><category><![CDATA[Portfolio]]></category><category><![CDATA[Code Camp]]></category><category><![CDATA[Code Camp 2009.2]]></category><category><![CDATA[philly.net]]></category><guid isPermaLink="false">http://www.coderjournal.com/?p=777</guid><description><![CDATA[For the second 2009 Philly Code Camp, it will be held at the DeVry University campus in Fort Washington, PA on Saturday, October 17 from 8:30 AM &#8211; 5:00 PM. If you haven&#8217;t signed up please register on the Philly.NET web site.  Detailed directions are on the DeVry web site.  Check here and here for the latest printable agenda, there [...]]]></description><content:encoded><![CDATA[<p>For the second 2009 Philly Code Camp, it will be held at the DeVry University campus in Fort Washington, PA on Saturday, October 17 from 8:30 AM &#8211; 5:00 PM. If you haven&#8217;t signed up <strong>please register</strong> on the Philly.NET <a style="text-decoration: none; color: #003399;" href="http://www.phillydotnet.org/Default.aspx?tabid=805">web site</a>.  Detailed directions are on the DeVry <a style="text-decoration: none; color: #003399;" href="http://www.devry.edu/locations/campuses/loc_ftwashingtoncampus.jsp">web site</a>.  Check <a style="text-decoration: none; color: #003399;" href="http://codecamp.phillydotnet.org/2009-2/Lists/Sessions/Full%20List.aspx">here</a> and <a style="text-decoration: none; color: #003399;" href="http://codecamp.phillydotnet.org/2009-2/Lists/Sessions/By%20Track.aspx">here</a> for the latest printable agenda, there will be:</p>
<ul>
<li>Lots of code, just say no to slides!</li>
<li>8 hours of presentations</li>
<li>60 sessions (8:30, 10:00, 12:30, 2:00, 3:30)</li>
<li>12 tracks including two hands-on Beginner rooms and the Bonus Track</li>
<li>600 seats with tables (laptops welcome)</li>
<li>Free breakfast, lunch, and afternoon snack (expanded menu!)</li>
<li>Raffles and prizes at 5:00</li>
<li>Convenient parking</li>
<li>After hours party in Ambler (network with speakers and attendees)</li>
</ul>
<p>All of this is made possible by the Gold partners (<strong>Component One, Hosting.com, TEK Systems</strong>), Silver partners (<strong>Pearson, Redgate, Telerik</strong>) and the Platinum site sponsors (<strong>DeVry University, Microsoft</strong>).</p>
<hr />
<h3>My First Presentation at 10:00</h3>
<p>I have been asked back to do <a href="http://www.coderjournal.com/2009/4/code-camp">my presentation from April</a> again in the newly expanded <em>Beginner I</em> track at 10:00 AM.  The abstract for this talk is as follows:</p>
<blockquote><p>This session explores the Microsoft Visual Studio development environment and how it is used to develop Web and Windows applications.  The topics include:</p>
<ul>
<li>The IDE</li>
<li>Solutions and projects</li>
<li>Templates</li>
<li>Files created</li>
<li>The debugger</li>
<li>The configuration file</li>
</ul>
</blockquote>
<p><em>If you are going to be attending this talk please bring Visual C# 2008 Express with you, that is going to be the main tool I will be using to demonstrate the features of Visual Studio.</em></p>
<hr />
<h3>My Second Presentation at 3:30 PM</h3>
<p>I will also be doing a new presentation on extending Visual Stuido 2010 in the <em>Tools </em>track at 3:30 PM.  The abstract for this is as follows:</p>
<blockquote><p>I will be showing the basics of how to get started on extending Visual Studio 2010 for custom highlighting and intellisense support for custom Domain Specific Languages that may be used with in a company for configuration or custom processing. I will be using a real world example, of how I am extending visual studio to support the coding of the Apache mod_rewrite style configuration files that are used in my URL Rewriter that was featured in PDC 2008 last year. <a style="text-decoration: none; color: #3966bf;" href="http://urlrewriter.codeplex.com/">http://urlrewriter.codeplex.com</a></p></blockquote>
<p><em>If you are going to be attending this talk please bring Visual Studio 2010 with you and the <a href="http://msdn.microsoft.com/en-us/vsx/default.aspx">Visual Studio SDK</a> already installed.</em></p>
<hr />On the day of the presentation I will be posting up the slides and any links that are relevant to my presentation on this blog.</p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/8142D1635699E9FCA3E0D92EDEAA3853A869EE51"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/8142D1635699E9FCA3E0D92EDEAA3853A869EE51"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=IN1DiX7s47Y:nrKJo_EzVbc:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=IN1DiX7s47Y:nrKJo_EzVbc:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=IN1DiX7s47Y:nrKJo_EzVbc:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=IN1DiX7s47Y:nrKJo_EzVbc:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=IN1DiX7s47Y:nrKJo_EzVbc:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=IN1DiX7s47Y:nrKJo_EzVbc:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=IN1DiX7s47Y:nrKJo_EzVbc:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=IN1DiX7s47Y:nrKJo_EzVbc:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=IN1DiX7s47Y:nrKJo_EzVbc:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/IN1DiX7s47Y" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/09/philly-code-camp-2009-2/feed/</wfw:commentRss><slash:comments>0</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/09/philly-code-camp-2009-2/</feedburner:origLink></item><item><title>Show CodeRush Xpress 9.2 Menu in Visual Studio</title><link>http://feedproxy.google.com/~r/coderjournal/~3/w6OrpRKFUyc/</link><comments>http://www.coderjournal.com/2009/08/show-coderush-xpress-9-2-menu-in-visual-studio/#comments</comments><pubDate>Mon, 31 Aug 2009 19:06:51 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[How To]]></category><category><![CDATA[CodeRush]]></category><category><![CDATA[Xpress]]></category><guid isPermaLink="false">http://www.coderjournal.com/?p=772</guid><description><![CDATA[As promised to the people of my last post for CodeRush Xpress 9.1, here is the updated scripts for CodeRush Xpress 9.2, which was released last week.
The Keyboard Command Way
Shift+Ctrl+Alt+O
The Registry Hack Way

Show Menu for CodeRush Xpress (x86)
Show Menu for CodeRush Xpress (x64)

I really wish DevExpress would stop treating the registry as a dumping ground [...]]]></description><content:encoded><![CDATA[<p>As promised to the people of my <a href="http://www.coderjournal.com/2009/08/show-coderush-xpress-menu-in-visual-studio/">last post for CodeRush Xpress 9.1</a>, here is the updated scripts for CodeRush Xpress 9.2, which was <a href="http://www.devexpress.com/Products/Visual_Studio_Add-in/CodeRushX/">released last week</a>.</p>
<p>The Keyboard Command Way</p>
<blockquote><p><kbd>Shift+Ctrl+Alt+O</kbd></p></blockquote>
<p>The Registry Hack Way</p>
<ul>
<li><a href="http://coderjournal.googlecode.com/svn/trunk/Posts/2009/08/ShowMenuCodeRushXpress_x32-92.reg">Show Menu for CodeRush Xpress (x86)</a></li>
<li><a href="http://coderjournal.googlecode.com/svn/trunk/Posts/2009/08/ShowMenuCodeRushXpress_x64-92.reg">Show Menu for CodeRush Xpress (x64)</a></li>
</ul>
<p><em>I really wish DevExpress would stop treating the registry as a dumping ground and creating a new parallel registry path with each new install, it makes customizing the registry settings very difficult to keep up with.  I could see it for each major version, but common is a new registry path really needed for each minor version?</em></p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/3028986A458E0EEAFCD2703389EC6157C1C9E1F3"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/3028986A458E0EEAFCD2703389EC6157C1C9E1F3"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=w6OrpRKFUyc:TGLW-8zYdYg:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=w6OrpRKFUyc:TGLW-8zYdYg:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=w6OrpRKFUyc:TGLW-8zYdYg:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=w6OrpRKFUyc:TGLW-8zYdYg:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=w6OrpRKFUyc:TGLW-8zYdYg:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=w6OrpRKFUyc:TGLW-8zYdYg:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=w6OrpRKFUyc:TGLW-8zYdYg:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=w6OrpRKFUyc:TGLW-8zYdYg:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=w6OrpRKFUyc:TGLW-8zYdYg:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/w6OrpRKFUyc" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/08/show-coderush-xpress-9-2-menu-in-visual-studio/feed/</wfw:commentRss><slash:comments>0</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/08/show-coderush-xpress-9-2-menu-in-visual-studio/</feedburner:origLink></item><item><title>Static Constructors in .NET 3.5, still a bad thing?</title><link>http://feedproxy.google.com/~r/coderjournal/~3/OiE9jVf7F7E/</link><comments>http://www.coderjournal.com/2009/08/static-constructors-in-net-3-5-still-a-bad-thing/#comments</comments><pubDate>Sun, 30 Aug 2009 20:55:02 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[C#]]></category><category><![CDATA[Programming]]></category><category><![CDATA[beforefieldinit]]></category><category><![CDATA[CLR]]></category><category><![CDATA[Code Analysis]]></category><category><![CDATA[FxCop]]></category><category><![CDATA[Static Constructors]]></category><guid isPermaLink="false">http://www.coderjournal.com/?p=748</guid><description><![CDATA[Recently at the Philly.NET User Group, Kathleen Dollard gave a great presentation on the use of generics and rethinking object orientation.  Both topics were very engaging.  But the part of the night that I found most intriguing was a conversation, that I had in a Ruby Tuesdays after the presentation, about the useage of static constructors and [...]]]></description><content:encoded><![CDATA[<p>Recently at the Philly.NET User Group, <a href="http://msmvps.com/blogs/kathleen/">Kathleen Dollard</a> gave <a href="http://www.phillydotnet.org/Default.aspx?tabid=785">a great presentation on the use of generics and rethinking object orientation</a>.  Both topics were very engaging.  But the part of the night that I found most intriguing was a conversation, that I had in a Ruby Tuesdays after the presentation, about the useage of static constructors and if they are still a bad thing to use in your code.</p>
<p>Many years ago, I had read the articles by <a href="http://odetocode.com/Blogs/scott/archive/2004/09/15/481.aspx">K. Scott Allen</a> and <a href="http://blogs.msdn.com/brada/archive/2004/04/17/115300.aspx">Brad Abrams</a>, explaining why the original FxCop rule, <em>&#8220;Do not declare explicit static constructors&#8221;</em>, existed and the IL command <code>beforefieldinit</code>, that caused the FxCop rule to trigger and cause performance issues.  Jon Skeet explained it best <a href="http://stackoverflow.com/questions/610818/what-does-beforefieldinit-flag-do/610837#610837">in a recent Stack Overflow post</a>.</p>
<blockquote><p>Basically, <code>beforefieldinit</code> means &#8220;the type can be initialized at any point before any fields are referenced.&#8221;</p>
<p><em>In theory</em> that means it can be very lazily initialized &#8211; if you call a static method which doesn&#8217;t touch any fields, the JIT doesn&#8217;t need to initialize the type.</p>
<p><em>In practice</em> it means that the class is initialized earlier than it would be otherwise &#8211; it&#8217;s okay for it to be initialized at the start of the first method which might use it. Compare this with types which don&#8217;t have beforefieldinit applied to them, where the type initialization has to occur immediately before the first actual use.</p></blockquote>
<p>But, I had assumed that since this rule was never include in the Code Analysis (FxCop replacement) part of Visual Studio 2005, 2008, or 2010 that it was a non issue in .NET 2.0 and forward.  Since all these previous credible articles that I could find were run against the .NET 1.1 framework.  But I had never really looked in to it until now.  The first thing I did was create the following program to test 8 different senarios where a static constructor could be created by the compiler or was created by me to test the performance differences.</p>
<ul>
<li><a href="http://code.google.com/p/coderjournal/source/browse/trunk/Posts/2009/08/Program.cs">Program.cs</a></li>
</ul>
<p>Each of the 8 senarios had a public interface like the following:</p>
<pre class="brush: csharp">class StaticX
{
    static string Name = "Nick Berardi";
    static string GetName() { /* to make sure the Name property was referenced */ }
}</pre>
<p>The scenarios were broken down as follows:</p>
<ol>
<li><strong>Static1:</strong> static class, name set on field</li>
<li><strong>Static2:</strong> static class, name set in constructor</li>
<li><strong>Static3:</strong> static class, name set in property</li>
<li><strong>Static4:</strong> static class, name set on field and in constructor</li>
<li><strong>Static5:</strong> name set on field</li>
<li><strong>Static6:</strong> name set in constructor</li>
<li><strong>Static7:</strong> name set in property</li>
<li><strong>Static8:</strong> name set on field and in constructor</li>
</ol>
<p><img src="http://www.coderjournal.com/uploads/2009/08/static-constructor-test.png" alt="Static Constructor Test" title="Static Constructor Test" width="471" height="667" class="alignright size-full wp-image-751" align="right" />I then used reflector to give me the following IL dump of the code.</p>
<ul>
<li><a href="http://code.google.com/p/coderjournal/source/browse/trunk/Posts/2009/08/Program.il">Program.il</a></li>
</ul>
<p>If we look at the IL code for each of these classes and static constructors we start finding some interesting patterns in how the compiler optimizes the code.</p>
<h4>Static1, Static2, Static5, and Static6</h4>
<p>All the the following static constructor (<code>.cctor()</code>), which is interesting because half of them defined the code in the static constructor and half defined the code by setting the field during initialization.</p>
<pre class="brush: csharp">.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
    .maxstack 8
    L_0000: ldstr "Nick Berardi"
    L_0005: stsfld string ConsoleApplication1.Program/Static1::Name
    L_000a: ret
}</pre>
<h4>Static3 and Static7</h4>
<p>These do not have any static constructor, which we could have probably guessed because there was no constructor defined and no fields set during intialization of the classes.</p>
<h4>Static4 and Static8</h4>
<p>These do not match any of the other static constructors we have seen, probably because there is an operating occurring in them.</p>
<pre class="brush: csharp">.method private hidebysig specialname rtspecialname static void .cctor() cil managed
{
    .maxstack 8
    L_0000: ldstr "Nick"
    L_0005: stsfld string ConsoleApplication1.Program/Static8::Name
    L_000a: ldsfld string ConsoleApplication1.Program/Static8::Name
    L_000f: ldstr " Berardi"
    L_0014: call string [mscorlib]System.String::Concat(string, string)
    L_0019: stsfld string ConsoleApplication1.Program/Static8::Name
    L_001e: ret
}</pre>
<p>There is one more place we are going to want to pay attention to before we start looking at the performance, and I sort of alluded to this at the beginning of the article.  That is the IL for the class definition:</p>
<pre class="brush: csharp">.class abstract auto ansi sealed nested public beforefieldinit Static1
.class abstract auto ansi sealed nested public                 Static2
.class abstract auto ansi sealed nested public beforefieldinit Static3
.class abstract auto ansi sealed nested public                 Static4
.class          auto ansi        nested public beforefieldinit Static5
.class          auto ansi        nested public                 Static6
.class          auto ansi        nested public beforefieldinit Static7
.class          auto ansi        nested public                 Static8</pre>
<p><em>Please note that I added in the spaces to show the differences between the definitions.</em></p>
<p>You will notice that the <code>abstract</code> and <code>sealed</code> are missing from <em>Static5</em> &#8211; <em>Static8</em>, don&#8217;t worry about those keywords they are the difference between a <code>static class</code> and an <code>instantiatable class</code>.  The one we are about is <code>beforefieldinit</code>, which is only added to classes that don&#8217;t already contain a static constructor.  The definition of how this works has <a href="http://www.ecma-international.org/publications/standards/Ecma-335-arch.htm">changed slightly from the original specification</a> (<a href="http://msdn.microsoft.com/en-us/netframework/aa569283.aspx">ECMA-335</a>).  Here is the break down as related to .NET Framework releases:</p>
<ul>
<li>1st Edition (December 2001) &#8211; .NET 1.0</li>
<li>2nd Edition (December 2002) &#8211; .NET 1.1</li>
<li>3rd Edition (June 2005) &#8211; .NET 2.0, .NET 3.0, .NET 3.5</li>
<li>4th Edition (June 2006) &#8211; .NET 2.0, .NET 3.0, .NET 3.5 (Changes from the previous edition were made to align this Standard with ISO/IEC 23271:2006.)</li>
</ul>
<p>I have marked changes that have been added since the first edition.</p>
<blockquote><p>
The semantics of when and what triggers execution of such type initialization methods, is as follows: </p>
<ol>
<li>A type can have a type-initializer method, or not. </li>
<li>A type can be specified as having a relaxed semantic for its type-initializer method (for<br />
convenience below, we call this relaxed semantic <code>BeforeFieldInit</code>). </li>
<li>If marked <code>BeforeFieldInit </code>then the type’s initializer method is executed at, or sometime before,<br />
first access to any static field defined for that type. </li>
<li>If not marked <code>BeforeFieldInit </code>then that type’s initializer method is executed at (i.e., is triggered<br />
by): </p>
<ul>
<li>first access to any static field of that type, or</li>
<li>first invocation of any static method of that type or </li>
<li>first invocation of any constructor for that type. <strong>(new in 3rd edition)</strong></li>
</ul>
</li>
<li>Execution of any type&#8217;s initializer method will not trigger automatic execution of any initializer<br />
methods defined by its base type, nor of any interfaces that the type implements</li>
</ol>
<p><strong>START &#8212; The following is new to the 3rd edition.</strong><br />
For reference types, a constructor has to be called to create a non-null instance. Thus, for reference types, the<br />
.cctor will be called before instance fields can be accessed and methods can be called on non-null instances. For<br />
value types, an “all-zero” instance can be created without a constructor (but only this value can be created<br />
without a constructor). Thus for value types, the .cctor is only guaranteed to be called for instances of the value<br />
type that are not “all-zero”.  [<em>Note</em>: This changes the semantics slightly in the reference class case from the first<br />
edition of this standard, in that the .cctor might not be called before an instance method is invoked if the 'this'<br />
argument is null. The added performance of avoiding class constructors warrants this change. <em>end note</em>]<br />
<strong>END</strong></p>
<p>[<em>Note</em>: <code>BeforeFieldInit </code>behavior is intended for initialization code with no interesting side-effects, where exact<br />
timing does not matter.  Also, under <code>BeforeFieldInit </code>semantics, type initializers are allowed to be executed <em>at<br />
or before</em> first access to any static field of that type, at the discretion of the CLI.<br />
If a language wishes to provide more rigid behavior—e.g., type initialization automatically triggers execution<br />
of base class’s initializers, in a top-to-bottom order—then it can do so by either: </p>
<ul>
<li>defining hidden static fields and code in each class constructor that touches the hidden static field of its<br />
base class and/or interfaces it implements, or </li>
<li>by making explicit calls to System.Runtime.CompilerServices.<strike>Runtime-Helpers</strike>RuntimeHelpers<strong><sup>3rd edition</sup></strong>.RunClassConstructor<br />
(see Partition IV).</li>
</ul>
<p><em>end note</em>] </p></blockquote>
<p>So to analyze what has changed, it looks like some major changes took place in the CLR for the .NET 2.0 framework on how and when static constructors should be initialized.  In <a href="http://odetocode.com/Blogs/scott/archive/2004/09/15/481.aspx">K. Scott Allen&#8217;s post that I referenced above</a> he concluded that classes with out the <code>beforefieldinit</code> IL command ran 5 times faster on the .NET 1.1 framework.  Lets see if that still holds true for the .NET 2.0 framework (and .NET 3.0 and 3.5 which run off the same CLR as .NET 2.0).</p>
<p>To test this, I ran each of the 8 scenarios through a loop about <strong>2.15 billion</strong> times.  Or <a href="http://msdn.microsoft.com/en-us/library/system.int32.maxvalue.aspx">Int32.MaxValue</a>.  Then I repeated the process 5 times (for those counting each one was ran about 10 billion times), and averaged the results and came up with these numbers:</p>
<ol>
<li><strong>Static1:</strong> <code>05.7505114</code> seconds (static class, name set on field)</li>
<li><strong>Static2:</strong> <code>07.4920393</code> seconds (static class, name set in constructor)</li>
<li><strong>Static3:</strong> <code>11.6594099</code> seconds (static class, name set in property)</li>
<li><strong>Static4:</strong> <code>08.3254804</code> seconds (static class, name set on field and in constructor)</li>
<li><strong>Static5:</strong> <code>05.7362727</code> seconds (name set on field)</li>
<li><strong>Static6:</strong> <code>07.6593536</code> seconds (name set in constructor)</li>
<li><strong>Static7:</strong> <code>12.4801669</code> seconds (name set in property)</li>
<li><strong>Static8:</strong> <code>08.3191176</code> seconds (name set on field and in constructor)</li>
</ol>
<p>We can obviously throw out the outliers of setting the name in the property because they where 2 times slower than the fastest method.  And we can also throw out the name being set half in the field and half in the constructor, because this is obviously not the best performing and is also not really the best way to code this type of field, and it was only in there as a baseline for doing both a field and constructor setting in the same class.</p>
<p>So lets look at the actual numbers of field vs constructor:</p>
<table>
<tr>
<th>&nbsp;</th>
<th>field</th>
<th>constructor</th>
<th>difference</th>
</tr>
<tr>
<th>static class</th>
<td><code>05.750511</code></td>
<td><code>07.492039</code></td>
<td><code>01.741528</code></td>
</tr>
<tr>
<th>instantiatable class</th>
<td><code>05.7362727</code></td>
<td><code>07.6593536</code></td>
<td><code>01.9230809</code></td>
</tr>
<tr>
<th>difference</th>
<td><code>00.014238</code>3</td>
<td><code>00.167314</code>6</td>
<td>&nbsp;</td>
</tr>
</table>
<p>The performance points are pretty much a wash between <em>static class</em> and <em>instantiatable class</em>, and there is essentially no difference between the field and constructor for everyday normal programs to think about changing how you create your static-code as related to fields or constructors.  The difference was only 30%, while that sounds like a lot the difference was only 2 seconds over 2.15 billion times run, so we are really talking about fractions of milliseconds per instance.  In addition it was no 500% reported by K. Scott Allen against .NET 1.1 back in 2004.</p>
<p>You can draw your own conclusions.  <strong>But my recommendation is to NOT spend your time changing your code from the use of static constructor to fields, because you won&#8217;t find the performance gains in your application.</strong>  Spend the time on something useful, like the amount of data you are pulling from the database or other places.  </p>
<p>I think we can finally put this issue to rest and say that there is no more performance penalty to a degree that every day programmers should care about if you are using the .NET 2.0 framework or forward.  Which means I probably guessed correctly as to why they removed it from the Code Analysis rules in Visual Studio 2005.  </p>
<p><strong>Update:</strong> I had to run each static class individually again to get the correct results, because after I had published this I started playing around with other scenario and noticed that there seemed to be an <strong>optimization of static constructor classes (without <code>beforefieldinit</code>), with the same constructor signature, that got loaded later</strong>.  With the new results, there is now there is virtually no difference between static classes and instantiatable classes which is what I sort of assumed would happen from the beginning.</p>
<p>If anybody knows why static constructor classes that share the same signature would be optimized can you please let me know, this is a new mystery to the static constructor debate.</p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/A4242763880040D6AD2D2E4760A39E50F61CEC96"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/A4242763880040D6AD2D2E4760A39E50F61CEC96"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=OiE9jVf7F7E:cI8F0ZnLpOw:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=OiE9jVf7F7E:cI8F0ZnLpOw:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=OiE9jVf7F7E:cI8F0ZnLpOw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=OiE9jVf7F7E:cI8F0ZnLpOw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=OiE9jVf7F7E:cI8F0ZnLpOw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=OiE9jVf7F7E:cI8F0ZnLpOw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=OiE9jVf7F7E:cI8F0ZnLpOw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=OiE9jVf7F7E:cI8F0ZnLpOw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=OiE9jVf7F7E:cI8F0ZnLpOw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/OiE9jVf7F7E" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/08/static-constructors-in-net-3-5-still-a-bad-thing/feed/</wfw:commentRss><slash:comments>2</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/08/static-constructors-in-net-3-5-still-a-bad-thing/</feedburner:origLink></item><item><title>How to create a Reverse Proxy using Url Rewriter</title><link>http://feedproxy.google.com/~r/coderjournal/~3/1T4rDhYb5Qw/</link><comments>http://www.coderjournal.com/2009/08/how-to-create-a-reverse-proxy-using-url-rewriter/#comments</comments><pubDate>Tue, 18 Aug 2009 18:01:07 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[How To]]></category><category><![CDATA[Managed Fusion]]></category><category><![CDATA[Reverse Proxy]]></category><category><![CDATA[URL Rewriter]]></category><guid isPermaLink="false">http://www.coderjournal.com/?p=746</guid><description><![CDATA[I just wanted to share a really well written article on how to setup a Reverse Proxy, by John Gully, using the Url Rewriter that I have been working on for the past 2 years.  Here is an excerpt from his article.
I recently came to realize that our website situation was growing out of [...]]]></description><content:encoded><![CDATA[<p>I just wanted to share a <a href="http://www.johngully.com/blog/2009/08/reverse-proxy-using-url-rewriter.html">really well written article on how to setup a Reverse Proxy</a>, by <a href="http://www.johngully.com">John Gully</a>, using the <a href="http://urlrewriter.codeplex.com">Url Rewriter</a> that I have been working on for the past 2 years.  Here is an excerpt from <a href="http://www.johngully.com/blog/2009/08/reverse-proxy-using-url-rewriter.html">his article</a>.</p>
<blockquote><p>I recently came to realize that our website situation was growing out of hand. We had a corporate website, an intranet site, and even a site for web access to email. All of these sites were scattered across multiple servers and each was on a unique port. While this worked, it was not simple. Each new site had to have a new rule configured in the firewall, and who wants the hassle of putting port number at the end of a url?</p>
<p>The solution to this mess turned out to be adding a <a href="http://en.wikipedia.org/wiki/Reverse_proxy">reverse proxy</a> to our network. By simply providing different urls (www.example.com, mail.example.com) the incomming traffic can be anlayzed by the proxy server and routed to the appropriate internal web server. All the incomming traffic is sent over the default port 80 so the end user never sees any difference. That&#8217;s exactly what I wanted, great!</p>
<p>Since our sites are all built upon ASP.NET and hosted on IIS6 the natural option for this was <a href="http://www.microsoft.com/isa">Microsoft ISA Server</a>. Unfortunately, the $1500 cost was way beyond our small company&#8217;s internal IT budget. So it was off to Google for me, and after some searching, it appeared that the open source project <a href="http://www.managedfusion.com/products/url-rewriter/">Url Rewriter</a> by <a href="http://www.managedfusion.com/">ManagedFusion</a> <em>[sic]</em> seemed to fit the bill.</p></blockquote>
<p>Thanks for the great write up John.  I hope to be including John&#8217;s article in an up coming FAQ wiki on my CodePlex project site in the near future.</p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/0E217C71E6FAFBF7DCBE8CF53376AE368846E8D9"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/0E217C71E6FAFBF7DCBE8CF53376AE368846E8D9"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=1T4rDhYb5Qw:c2OCk3H_8-E:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=1T4rDhYb5Qw:c2OCk3H_8-E:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=1T4rDhYb5Qw:c2OCk3H_8-E:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=1T4rDhYb5Qw:c2OCk3H_8-E:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=1T4rDhYb5Qw:c2OCk3H_8-E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=1T4rDhYb5Qw:c2OCk3H_8-E:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=1T4rDhYb5Qw:c2OCk3H_8-E:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=1T4rDhYb5Qw:c2OCk3H_8-E:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=1T4rDhYb5Qw:c2OCk3H_8-E:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/1T4rDhYb5Qw" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/08/how-to-create-a-reverse-proxy-using-url-rewriter/feed/</wfw:commentRss><slash:comments>0</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/08/how-to-create-a-reverse-proxy-using-url-rewriter/</feedburner:origLink></item><item><title>TF53002, TF30040, TF30059, TF30063 Team Foundation Server Errors</title><link>http://feedproxy.google.com/~r/coderjournal/~3/XN4sXYnZDdQ/</link><comments>http://www.coderjournal.com/2009/08/tf53002-tf30040-tf30059-tf30063-team-foundation-servers-errors/#comments</comments><pubDate>Mon, 17 Aug 2009 00:07:00 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[Uncategorized]]></category><category><![CDATA[CNAME]]></category><category><![CDATA[TF30040]]></category><category><![CDATA[TF30059]]></category><category><![CDATA[TF30063]]></category><category><![CDATA[TF53002]]></category><category><![CDATA[TFS]]></category><guid isPermaLink="false">http://www.coderjournal.com/?p=742</guid><description><![CDATA[Today I received the following error while getting ready to do some new development for my URL Rewriter.
TF53002: Unable to obtain registration data for application VersionControl.
TF30040: The database is not correctly configured. Contact your Team Foundation Server administrator.
TF30059: Fatal error while initializing web service
TF30063: You are not authorized to access myserver.443. (type TeamFoundationServerUnauthorizedException)
This is very [...]]]></description><content:encoded><![CDATA[<p>Today I received the following error while getting ready to do some new development for my <a href="http://urlrewriter.codeplex.com">URL Rewriter</a>.</p>
<blockquote><p>TF53002: Unable to obtain registration data for application VersionControl.<br />
TF30040: The database is not correctly configured. Contact your Team Foundation Server administrator.<br />
TF30059: Fatal error while initializing web service<br />
TF30063: You are not authorized to access <em>myserver</em>.443. (type TeamFoundationServerUnauthorizedException)</p></blockquote>
<p>This is very weird because I was just working on it earlier this week, without any issues.  So I go in to check the recent update history of Windows Update and to my surprise I see 13 new updates, mostly security related.  And since TF30063 is a security related exception, I think I found the culprit.  Here are the KB articles of the updates that were done for reference:</p>
<ol>
<li>KB956744</li>
<li>KB973540</li>
<li>KB947319</li>
<li>KB971032</li>
<li>KB960859</li>
<li>KB971557</li>
<li>KB973869</li>
<li>KB973507</li>
<li>KB973354</li>
<li>KB961371</li>
<li>KB971657</li>
<li>KB890830</li>
<li>KB973815</li>
</ol>
<p>So I started searching the web for each of those error messages, and I found a ton of old articles related to the SP1 release of Team Foundation Server.  However I upgraded about a year ago to SP1 so I doubt that is the issue.  But during my searching I found an obscure article referencing <a href="http://support.microsoft.com/kb/926642">KB926642</a>, which on first pass I just brushed off as not being the issue.  But as I started reading it I remembered that I do access my server through a CNAME address, and one of these security updates might have disabled Windows Authentication through CNAME&#8217;s.  So I tried as the article suggested.</p>
<blockquote><p>\\myserver\c$ &#8212; works<br />
\\myserver-cname\c$ &#8212; tells me I am not authorized</p></blockquote>
<p>So I followed Method 1 in KB926642:</p>
<blockquote>
<h4>Method 1 (recommended): Create the Local Security Authority host names that can be referenced in an NTLM authentication request</h4>
<p>To do this, follow these steps for all the nodes on the client computer:</p>
<ol>
<li>Click <strong>Start</strong>, click <strong>Run</strong>, type <strong>regedit</strong>, and then click <strong>OK</strong>.</li>
<li>Locate and then click the following registry subkey:<strong>HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0</strong></li>
<li>Right-click <strong>MSV1_0</strong>, point to <strong>New</strong>, and then click <strong>Multi-String Value</strong>.</li>
<li>In the <strong>Name</strong> column, type <strong>BackConnectionHostNames</strong>, and then press ENTER.</li>
<li>Right-click <strong>BackConnectionHostNames</strong>, and then click <strong>Modify</strong>.</li>
<li>In the <strong>Value</strong> data box, type the CNAME or the DNS alias, that is used for the local shares on the computer, and then click <strong>OK</strong>.<strong>Note </strong>Type each host name on a separate line.
<p><strong>Note </strong>If the BackConnectionHostNames registry entry exists as a REG_DWORD type, you have to delete the BackConnectionHostNames registry entry.</li>
<li>Exit Registry Editor, and then restart the computer.</li>
</ol>
</blockquote>
<p>And everything is working great now.  So if you are using a CNAME with your TF server, you may want to consider adding the CNAME in to the BackConnectionHostNames.  It will not only help your TF server, but all your other connections to this server that use Windows Authentication and the CNAME.  Hope this helps somebody else besides me.</p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/7E402DDADF13C50603000906D8940100CAAF0DBE"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/7E402DDADF13C50603000906D8940100CAAF0DBE"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=XN4sXYnZDdQ:z7-x8GQm9eU:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=XN4sXYnZDdQ:z7-x8GQm9eU:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=XN4sXYnZDdQ:z7-x8GQm9eU:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=XN4sXYnZDdQ:z7-x8GQm9eU:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=XN4sXYnZDdQ:z7-x8GQm9eU:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=XN4sXYnZDdQ:z7-x8GQm9eU:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=XN4sXYnZDdQ:z7-x8GQm9eU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=XN4sXYnZDdQ:z7-x8GQm9eU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=XN4sXYnZDdQ:z7-x8GQm9eU:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/XN4sXYnZDdQ" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/08/tf53002-tf30040-tf30059-tf30063-team-foundation-servers-errors/feed/</wfw:commentRss><slash:comments>0</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/08/tf53002-tf30040-tf30059-tf30063-team-foundation-servers-errors/</feedburner:origLink></item><item><title>Fun With Wacky JavaScript Type Comparison</title><link>http://feedproxy.google.com/~r/coderjournal/~3/8JkKVsRRrys/</link><comments>http://www.coderjournal.com/2009/08/fun-with-wacky-javascript-type-comparison/#comments</comments><pubDate>Thu, 13 Aug 2009 15:05:03 +0000</pubDate><dc:creator>Nick Berardi</dc:creator><category><![CDATA[Programming]]></category><category><![CDATA[JavaScript]]></category><guid isPermaLink="false">http://www.coderjournal.com/?p=729</guid><description><![CDATA[I recently had a conversation with Scoot Koon (LazyCoder) over Twitter about the wacky JavaScript type comparisons that are allowed.  I was interested to see what weird oddities would come out if I compared the whole type system against it self.  So I sat down and wrote a simple JavaScript routine to do just that, [...]]]></description><content:encoded><![CDATA[<p>I recently had a conversation with <a href="http://www.lazycoder.com">Scoot Koon (LazyCoder)</a> over <a href="http://twitter.com/lazycoder">Twitter</a> about the <a href="http://twitter.com/nberardi/status/3285947110">wacky JavaScript type comparisons</a> that are allowed.  I was interested to see what weird oddities would come out if I compared the whole type system against it self.  So I sat down and wrote a simple JavaScript routine to do just that, and the below reference table is the output of that routine.</p>
<table border="0">
<thead>
<tr>
<th> </th>
<th style="text-align:center">null</th>
<th style="text-align:center">undefined</th>
<th style="text-align:center">true</th>
<th style="text-align:center">false</th>
<th style="text-align:center">-1</th>
<th style="text-align:center">0</th>
<th style="text-align:center">1</th>
<th style="text-align:center">NaN</th>
<th style="text-align:center">Infinity</th>
<th style="text-align:center">&#8220;&#8221;</th>
<th style="text-align:center">&#8221; &#8220;</th>
<th style="text-align:center">&#8220;null&#8221;</th>
<th style="text-align:center">&#8220;undefined&#8221;</th>
<th style="text-align:center">&#8220;true&#8221;</th>
<th style="text-align:center">&#8220;false&#8221;</th>
<th style="text-align:center" nowrap="nowarp">&#8220;-1&#8243;</th>
<th style="text-align:center">&#8220;0&#8243;</th>
<th style="text-align:center">&#8220;1&#8243;</th>
<th style="text-align:center">&#8220;NaN&#8221;</th>
<th style="text-align:center">&#8220;Infinity&#8221;</th>
</tr>
</thead>
<tbody>
<tr>
<th>null</th>
<td style="background-color: black; text-align: center;">null</td>
<td style="color: #00af33; background-color: green; text-align: center;">null</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>undefined</th>
<td style="color: #00af33; background-color: green; text-align: center;">undefined</td>
<td style="background-color: black; text-align: center;">undefined</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>true</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">true</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">true</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">true</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>false</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">false</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">false</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">false</td>
<td style="color: #00af33; background-color: green; text-align: center;">false</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">false</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>-1</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">-1</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">-1</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>0</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">0</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">0</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">0</td>
<td style="color: #00af33; background-color: green; text-align: center;">0</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">0</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>1</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">1</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">1</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">1</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>NaN</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>Infinity</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">Infinity</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">Infinity</td>
</tr>
<tr>
<th>&#8220;&#8221;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8220;&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8220;&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8221; &#8220;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8221; &#8220;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8221; &#8220;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8221; &#8220;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;null&#8221;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;null&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;undefined&#8221;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;undefined&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;true&#8221;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;true&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;false&#8221;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;false&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;-1&#8243;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;" nowrap="nowarp">&#8220;-1&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;-1&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;0&#8243;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8220;0&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8220;0&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;0&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;1&#8243;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8220;1&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8220;1&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;1&#8243;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;NaN&#8221;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;NaN&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
</tr>
<tr>
<th>&#8220;Infinity&#8221;</th>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #00af33; background-color: green; text-align: center;">&#8220;Infinity&#8221;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="color: #e0e0e0; text-align: center;">&#8211;</td>
<td style="background-color: black; text-align: center;">&#8220;Infinity&#8221;</td>
</tr>
</tbody>
</table>
<p>So some of the oddities that emerged to me are:</p>
<ul>
<li>The word &#8220;Infinity&#8221; is equal to the type <code>Infinity</code>, however &#8220;true&#8221; or &#8220;false&#8221; don&#8217;t equal <code>true</code> or <code>false</code> respectively.</li>
<li><code>" " == 0 == false</code> and also <code>"" == 0 == false</code>, however <code>" " != ""</code></li>
<li><strong>Update</strong> Just noticed that <code>NaN != NaN</code> but <code>Infinity == Infinity</code></li>
</ul>
<p>If you would like to try this your self, or want to add to it, here is the code that I used.</p>
<pre class="brush: javascript">
var values = [null, undefined, true, false, -1, 0, 1, NaN, Infinity, &quot;&quot;, &quot; &quot;, &quot;null&quot;, &quot;undefined&quot;, &quot;true&quot;, &quot;false&quot;, &quot;-1&quot;, &quot;0&quot;, &quot;1&quot;, &quot;NaN&quot;, &quot;Infinity&quot;];

document.write(&quot;&lt;table&gt;&lt;thead&gt;&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&quot;)
for (var x = 0; x &lt; values.length; x++) {
	document.write(&quot;&lt;th&gt;&quot; + (x &gt; 8 ? &quot;\&quot;&quot; : &quot;&quot;) + values[x] + (x &gt; 8 ? &quot;\&quot;&quot; : &quot;&quot;) + &quot;&lt;/th&gt;&quot;);
}
document.write(&quot;&lt;/tr&gt;&lt;/thead&gt;&lt;tbody&gt;&quot;);
for (var i = 0; i &lt; values.length; i++) {
	document.write(&quot;&lt;tr&gt;&quot;);
	document.write(&quot;&lt;th&gt;&quot; + (i &gt; 8 ? &quot;\&quot;&quot; : &quot;&quot;) + values[i] + (i &gt; 8 ? &quot;\&quot;&quot; : &quot;&quot;) + &quot;&lt;/th&gt;&quot;);

	for (var j = 0; j &lt; values.length; j++) {
		var output = values[i] == values[j];

		document.write(&quot;&lt;td style=\&quot;text-align:center;&quot; + (i == j ? &quot;background-color:black;&quot; : (output ? &quot;background-color:green;color:#00AF33;&quot; : &quot;color:#e0e0e0;&quot;)) + &quot;\&quot;&gt;&quot;);
		document.write(output ? (i &gt; 8 ? &quot;\&quot;&quot; : &quot;&quot;) + values[i] + (i &gt; 8 ? &quot;\&quot;&quot; : &quot;&quot;) : &quot;--&quot;);
		document.write(&quot;&lt;/td&gt;&quot;);
	}

	document.write(&quot;&lt;/tr&gt;&quot;);
}
document.write(&quot;&lt;/tbody&gt;&lt;/table&gt;&quot;);
</pre>
<p>I think <a href="http://twitter.com/lazycoder/statuses/3287262166">Scott really hit the nail on the head</a> when he said this about JavaScript coercion.</p>
<p><a href="http://twitter.com/lazycoder/statuses/3287262166"><img src="http://www.coderjournal.com/uploads/2009/08/lazycoder-on-javascript-coercion.png" alt="LazyCoder (Scott Koon) on JavaScript Coercion" title="LazyCoder (Scott Koon) on JavaScript Coercion" width="612" height="341" class="alignnone size-full wp-image-730" /></a></p>
<p><a target="_blank" href="http://theloungenet.com/feeds/redirect/DOTNETRSS/CJOURNAL/2A754B7E4F824688DE2403A3699318CFB2A4F391"><img src="http://theloungenet.com/feeds/img/DOTNETRSS/CJOURNAL/2A754B7E4F824688DE2403A3699318CFB2A4F391"></a></p><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/coderjournal?a=8JkKVsRRrys:8C1RKzNzwzw:bcOpcFrp8Mo"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=bcOpcFrp8Mo" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=8JkKVsRRrys:8C1RKzNzwzw:zYSYRoQSaQY"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=zYSYRoQSaQY" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=8JkKVsRRrys:8C1RKzNzwzw:qj6IDK7rITs"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=qj6IDK7rITs" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=8JkKVsRRrys:8C1RKzNzwzw:TzevzKxY174"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=TzevzKxY174" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=8JkKVsRRrys:8C1RKzNzwzw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=8JkKVsRRrys:8C1RKzNzwzw:gIN9vFwOqvQ" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=8JkKVsRRrys:8C1RKzNzwzw:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/coderjournal?i=8JkKVsRRrys:8C1RKzNzwzw:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/coderjournal?a=8JkKVsRRrys:8C1RKzNzwzw:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/coderjournal?d=7Q72WNTAKBA" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/coderjournal/~4/8JkKVsRRrys" height="1" width="1"/>]]></content:encoded><wfw:commentRss>http://www.coderjournal.com/2009/08/fun-with-wacky-javascript-type-comparison/feed/</wfw:commentRss><slash:comments>6</slash:comments><feedburner:origLink>http://www.coderjournal.com/2009/08/fun-with-wacky-javascript-type-comparison/</feedburner:origLink></item></channel></rss>
