<?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.stevenharman.net/~d/styles/itemcontent.css"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:copyright="http://blogs.law.harvard.edu/tech/rss" xmlns:image="http://purl.org/rss/1.0/modules/image/" xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
    <channel>
        <title>StevenHarman.net</title>
        <link>http://stevenharman.net/blog/Default.aspx</link>
        <description>living. learning. improving.</description>
        <language>en-US</language>
        <copyright>Steven Harman</copyright>
        <generator>Subtext Version 2.1.2.2</generator>
        <image><link>http://creativecommons.org/licenses/by/2.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" type="application/rss+xml" href="http://feeds.stevenharman.net/stevenharman" /><feedburner:info uri="stevenharman" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><creativeCommons:license>http://creativecommons.org/licenses/by/2.0/</creativeCommons:license><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /><feedburner:emailServiceId>stevenharman</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.stevenharman.net%2Fstevenharman" 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.stevenharman.net%2Fstevenharman" 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.stevenharman.net%2Fstevenharman" 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.stevenharman.net/stevenharman" 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.stevenharman.net%2Fstevenharman" 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.stevenharman.net%2Fstevenharman" 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.stevenharman.net%2Fstevenharman" 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://my.feedlounge.com/external/subscribe?url=http%3A%2F%2Ffeeds.stevenharman.net%2Fstevenharman" src="http://static.feedlounge.com/buttons/subscribe_0.gif">Subscribe with FeedLounge</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.stevenharman.net%2Fstevenharman" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><item>
            <title>YAGNI ain&amp;rsquo;t what you think it is</title>
            <category>Me, On Software.</category>
            <link>http://stevenharman.net/blog/archive/2010/01/07/yagni-ainrsquot-what-you-think-it-is.aspx</link>
            <description>&lt;p&gt;In the software development vernacular the term &lt;acronym title="You aren't gonna need it"&gt;YAGNI&lt;/acronym&gt; is often used as a device to put down attempts at prematurely adding functionality – things which are only speculatively required. This makes sense given that is basically the &lt;a title="You're NOT gonna need it" href="http://www.xprogramming.com/Practices/PracNotNeed.html" rel="external"&gt;definition&lt;/a&gt; that &lt;a title="XProgramming : an Agile Software Development Resource" href="http://www.xprogramming.com/" rel="external"&gt;Ron Jeffries&lt;/a&gt; and our &lt;acronym title="eXtreme Programming"&gt;XP&lt;/acronym&gt; forefathers came up with so long ago.&lt;/p&gt;  &lt;h3&gt;Is that the whole story?&lt;/h3&gt;  &lt;p&gt;&lt;a title="photo via: http://www.flickr.com/photos/z6p6tist6/501709581/" href="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/339b90d16e7e_BAC4/stopsign_2.jpg" rel="lightbox"&gt;&lt;img class="right" title="photo via: http://www.flickr.com/photos/z6p6tist6/501709581/" alt="stop... YAGNI!" src="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/339b90d16e7e_BAC4/stopsign_thumb.jpg" /&gt;&lt;/a&gt;In short, I don’t think so.&lt;/p&gt;  &lt;p&gt;I’ve long believed there was more to YAGNI than what had been canonically defined and was commonly understood. However, until recently I was never able to put my finger on what was missing.&lt;/p&gt;  &lt;p&gt;While listening to an episode of &lt;/p&gt; &lt;a title="Industry Misinterpretations 164: Going for the Longball" href="http://www.cincomsmalltalk.com/blog/blogView?showComments=true&amp;amp;printTitle=Industry_Misinterpretations_164:_Going_for_the_Longball&amp;amp;entry=3436948975" rel="external"&gt;Industry Misinterpretations&lt;/a&gt; I heard &lt;a title="Kent Beck @ Three Rivers Institute" href="http://www.threeriversinstitute.org/Kent%20Beck.htm" rel="external"&gt;Kent Beck&lt;/a&gt; make a subtle point about the need to make progress being more important than the completeness of the thing you’re building at the point you’re building it.  &lt;p /&gt;  &lt;p&gt;Lending from this Kent’s insight and mixing in much of my own experience, I realized YAGNI is not about delaying building things until you need them; it’s that gaining real experience in the problem domain, while making concrete progress, is more important than trying to achieve a complete solution &lt;em&gt;right now&lt;/em&gt;.&lt;/p&gt;  &lt;p&gt;Do you think it’s too early to update the &lt;a title="You ain't gonna need it" href="http://en.wikipedia.org/wiki/You_ain't_gonna_need_it" rel="external"&gt;Wikipedia article&lt;/a&gt;…? hehe!&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:e9c8068b-f128-4ab4-8811-9981d61bd585" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/design" rel="tag"&gt;design&lt;/a&gt;,&lt;a href="http://technorati.com/tags/XP" rel="tag"&gt;XP&lt;/a&gt;,&lt;a href="http://technorati.com/tags/agile" rel="tag"&gt;agile&lt;/a&gt;,&lt;a href="http://technorati.com/tags/programming" rel="tag"&gt;programming&lt;/a&gt;&lt;/div&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12832.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=-CU9xWMzrcE:oCJjYWgh4Ms:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=-CU9xWMzrcE:oCJjYWgh4Ms:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=-CU9xWMzrcE:oCJjYWgh4Ms:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=-CU9xWMzrcE:oCJjYWgh4Ms:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=-CU9xWMzrcE:oCJjYWgh4Ms:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=-CU9xWMzrcE:oCJjYWgh4Ms:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=-CU9xWMzrcE:oCJjYWgh4Ms:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=-CU9xWMzrcE:oCJjYWgh4Ms:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/-CU9xWMzrcE" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2010/01/07/yagni-ainrsquot-what-you-think-it-is.aspx</guid>
            <pubDate>Thu, 07 Jan 2010 19:44:29 GMT</pubDate>
            <wfw:comment>http://stevenharman.net/blog/comments/12832.aspx</wfw:comment>
            <comments>http://stevenharman.net/blog/archive/2010/01/07/yagni-ainrsquot-what-you-think-it-is.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12832.aspx</wfw:commentRss>
        </item>
        <item>
            <title>OMG, Better Rake (for .net)!</title>
            <category>Code &amp;amp; Stuff...</category>
            <link>http://stevenharman.net/blog/archive/2009/11/23/omg-better-rake-for-.net.aspx</link>
            <description>&lt;p&gt;If you ask me, when it comes tools for writing automated build scripts nothing packs more bang for the buck than &lt;a href="http://rake.rubyforge.org/" title="Rake - Ruby Make"&gt;Rake&lt;/a&gt;. Until recently, using Rake to build .net solutions required a magic concoction of hacked together scripts which rarely exhibited Ruby’s appreciation for beauty nor Rake’s spirit of simplicity.&lt;/p&gt;
&lt;p&gt;Luckily our buddy &lt;a rel="met friend" href="http://www.lostechies.com/blogs/derickbailey/" title="Derick Bailey's blog"&gt;Derick Bailey&lt;/a&gt; decided it was time to bite the bullet and start building some &lt;em&gt;&lt;a href="http://www.lostechies.com/blogs/derickbailey/archive/2009/09/17/how-a-net-developer-hacked-out-a-rake-task.aspx" title="How A .NET Developer Hacked Out a Rake Task"&gt;real Rake tasks&lt;/a&gt;&lt;/em&gt; that were special suited for building .net code. The result is &lt;a href="http://github.com/derickbailey/Albacore" title="Albacore: A Suite Of Rake Build Tasks For .NET Solutions"&gt;Albacore&lt;/a&gt;.&lt;/p&gt;
&lt;h3&gt;Using Rake for .net &lt;acronym title="In Real Life"&gt;IRL&lt;/acronym&gt;&lt;/h3&gt;
&lt;p&gt;I’ve been using Rake to &lt;a href="http://stevenharman.net/blog/archive/2009/05/29/being-lazy-with-rake.aspx" title="Being Lazy with Rake"&gt;be lazy&lt;/a&gt; for a while. And we, the &lt;a href="http://versionone.com/" title="VersionOne: Simplifying Software Delivery"&gt;VersionOne&lt;/a&gt; dudes &amp;amp; dudettes, have been using it to help automate our &lt;acronym title="Continuous Integration"&gt;CI&lt;/acronym&gt; builds for over a year now. And just last week we started ditching much of our hacky-Rake-script inventory in favor of more concise, tested, and readable Rake tasks via Albacore. &lt;/p&gt;
&lt;p&gt;During the migration I’ve run into a few small hitches here and there, but nothing that I couldn’t track down, write a test for, and fix within a couple of &lt;a href="http://www.infoq.com/news/2009/09/Pomodoro" title="Pomodoro - An Agile Approach to Time Management"&gt;tomatoes&lt;/a&gt;. In one case I discovered an issue, called Derick to confirm, suggested a fix, and had a new Albacore Gem published within a couple of hours. &lt;em&gt;Hawt!&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;Albacore already has a decent number of tasks baked in, and the list is growing all the time!&lt;/p&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/assemblyinfotask"&gt;AssemblyInfoTask&lt;/a&gt; – Generate an AssemblyInfo.cs file. Currently only supports C# &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/expandtemplatestask"&gt;ExpandTemplatesTask&lt;/a&gt; – expand template files with #{setting} markers, using YAML configuration files as the data &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/ncoverconsoletask"&gt;NCoverConsoleTask&lt;/a&gt; – Run code coverage analysis through NCover 3’s NCover.Console &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/ncoverreporttask"&gt;NCoverReportTask&lt;/a&gt; – Check code coverage and get detailed reports through NCover 3’s NCover.Reporting &lt;/li&gt;
    &lt;li&gt;NUnitTask – run NUnit test suites &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/msbuildtask"&gt;MSBuildTask&lt;/a&gt; – Build a Visual Studio solution (.sln) or MSBuild file &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/renametask"&gt;Rename Task&lt;/a&gt; – Rename a file &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/sftptask"&gt;SftpTask&lt;/a&gt; – Upload a file to a remote server via secure FTP connection &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/sqlcmdtask"&gt;SQLCmdTask&lt;/a&gt; – Run scripts and other commands through SQL Server’s “sqlcmd.exe” &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/sshtask"&gt;SshTask&lt;/a&gt; – Run a command on a remote system via a secure shell connection &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore/ziptask"&gt;ZipTask&lt;/a&gt; – Package your build artifacts into a .zip for easier distribution       &lt;br /&gt;
    source data &lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Contribute!&lt;/h3&gt;
&lt;p&gt;As we move more and more of our custom stuff over I’ll continue to add features to Albacore, enhancing the great work the core team is doing. In fact, I’m already planning a &lt;a href="http://github.com/derickbailey/Albacore/issues/#issue/27" title="Albacore::NAntTask - for migrating to Rake"&gt;NAnt task&lt;/a&gt; to help those folks in the process of migrating from an existing NAnt-based build script to Rake. Look for it soon!&lt;/p&gt;
&lt;h3&gt;Resources&lt;/h3&gt;
&lt;ul&gt;
    &lt;li&gt;&lt;a href="http://github.com/derickbailey/Albacore" title="Albacore: A Suite of Rake Build Tasks For .Net Solutions"&gt;Albacore on GitHub&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://wiki.github.com/derickbailey/Albacore" title="Albacore Wiki"&gt;Albacore Wiki&lt;/a&gt; &lt;/li&gt;
    &lt;li&gt;&lt;a href="http://codebetter.com/blogs/david_laribee/archive/2008/08/25/omg-rake.aspx" title="OMG Rake!"&gt;OMG Rake!&lt;/a&gt; – The original post which first inspired many to use Rake with .net &lt;/li&gt;
&lt;/ul&gt;
&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:94fe6462-42ab-4f0b-85c1-56f57aeaa00f" style="margin: 0px; padding: 0px; display: inline; float: none;"&gt;Technorati Tags: &lt;a rel="tag" href="http://technorati.com/tags/rake"&gt;rake&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/ruby"&gt;ruby&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/.net"&gt;.net&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/open+source"&gt;open source&lt;/a&gt;,&lt;a rel="tag" href="http://technorati.com/tags/albacore"&gt;albacore&lt;/a&gt;&lt;/div&gt;
&lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f11%2f23%2fomg-better-rake-for-.net.aspx"&gt;&lt;img border="0" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f11%2f23%2fomg-better-rake-for-.net.aspx" alt="kick it on DotNetKicks.com" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12831.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=GU1mac6-8_E:lzBMknuvLB8:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=GU1mac6-8_E:lzBMknuvLB8:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=GU1mac6-8_E:lzBMknuvLB8:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=GU1mac6-8_E:lzBMknuvLB8:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=GU1mac6-8_E:lzBMknuvLB8:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=GU1mac6-8_E:lzBMknuvLB8:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=GU1mac6-8_E:lzBMknuvLB8:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=GU1mac6-8_E:lzBMknuvLB8:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/GU1mac6-8_E" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/11/23/omg-better-rake-for-.net.aspx</guid>
            <pubDate>Mon, 23 Nov 2009 23:29:55 GMT</pubDate>
            <wfw:comment>http://stevenharman.net/blog/comments/12831.aspx</wfw:comment>
            <comments>http://stevenharman.net/blog/archive/2009/11/23/omg-better-rake-for-.net.aspx#feedback</comments>
            <slash:comments>5</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12831.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Reading Code is Key to Writing Good Code</title>
            <category>Me, On Software.</category>
            <link>http://stevenharman.net/blog/archive/2009/11/18/reading-code-is-key-to-writing-good-code.aspx</link>
            <description>&lt;p&gt;As humans we seem to have an innate desire for structure in our lives. Structure permeates through our societies; it’s found within our families, education systems, governments, etc. I suppose it’s no surprise then that we also seek to &lt;em&gt;force&lt;/em&gt; structure upon the work that we, as software developers, do.&lt;/p&gt;  &lt;p&gt;The problem is the work we do isn’t structured. It is not deterministic. There is no grand blue print, process, nor methodology that we can follow to pay dirt.&lt;/p&gt;  &lt;p&gt;We live in a chaotic and complex world that is itself continuously changing and adapting. &lt;/p&gt;  &lt;p&gt;Software product development is a creative activity taking place in the midst of that complex and adaptive world. So doesn’t it make sense that we, as software developers, might benefit from admitting that we are indeed doing creative, unstructured, adaptive work? &lt;em&gt;I sure think so!&lt;/em&gt;&lt;/p&gt;  &lt;h3&gt;Looking outward for inspiration&lt;/h3&gt;  &lt;p&gt;I’ve recently been looking outward to other creative professions and trades for inspiration and insights into how they work. One thing I’ve realized is that those folks spend an immense amount of time studying and seeking inspiration from the work of others both within and outside their own field.&lt;/p&gt;  &lt;p&gt;For example, a musician doesn’t just sit in his garage all day, banging out albums. He listens to and is influenced by the music of many other musicians. An author doesn’t simply site down and write manuscript after manuscript. She spends countless hours reading the classics, studying the words, flow, and style of other authors. The same thing goes for painters, actors, architects, etc. And all of these people are constantly immersing them selves in works outside their area; musicians reading Hemingway, singer/song writers studying Salvador Dali, painters listening to Mozart, cats and dogs living together…&lt;/p&gt;  &lt;p&gt;How arrogant of we programmers then to think that we won’t, or don’t, benefit from reading code written by – &lt;em&gt;gasp&lt;/em&gt; – someone else!&lt;/p&gt;  &lt;h3&gt;Read, learn, and be inspired&lt;/h3&gt;  &lt;p&gt;&lt;a title="read!" href="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/ReadingOthersCodeisKeytoWritingGoodCode_D4E4/text_2.jpg" rel="lightbox"&gt;&lt;img class="right" title="read!" alt="read!" src="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/ReadingOthersCodeisKeytoWritingGoodCode_D4E4/text_thumb.jpg" /&gt;&lt;/a&gt;In my experience we spend a great deal more time reading code than actually &lt;em&gt;writing&lt;/em&gt; it. Whether it be the code you wrote just a few minutes ago or something you’ve inherited and are now maintaining, you’re reading it. Of course, that’s only considering the motive of reading code because you’re currently working with.&lt;/p&gt;  &lt;p&gt;The greatest motivator for reading code is the opportunity it provides for learning and serving as a source of inspiration. Reading code exposes you to techniques, view points, styles, idioms, and algorithms that you may not have otherwise come across.&lt;/p&gt;  &lt;p&gt;In my own career it was by reading code written in Ruby that I first started to develop an appreciation for beauty and aesthetics in code. It also opened me to new ways of thinking about problems and exposed many pains and frictions with the techniques I had been using to that point.&lt;/p&gt;  &lt;h3&gt;Where to start?&lt;/h3&gt;  &lt;p&gt;I realize it’s probably obvious, but I’m going to say it anyhow – a great way to start reading other’s code is to pull down an Open Source project and dive in. Of course, that’s not to say that all Open Source code bases are necessarily examples of great code… so you might also want to leverage your network to find examples. Or, use your Google-fu to see what others are reading. Or maybe check out:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;&lt;a title="Software Craftsmanship - Katas" href="http://katas.softwarecraftsmanship.org/"&gt;Katacasts&lt;/a&gt; by &lt;a title="Corey Haines" href="http://www.coreyhaines.com/" rel="friend met"&gt;Corey Haines&lt;/a&gt; and Chris Parsons &lt;/li&gt;    &lt;li&gt;&lt;a href="http://www.hanselman.com/blog/CategoryView.aspx?category=Source+Code"&gt;The Weekly Source Code&lt;/a&gt; series by &lt;a title="Scott Hanselman's Computer Zen" href="http://www.hanselman.com" rel="colleague met"&gt;Scott Hanselman&lt;/a&gt; &lt;/li&gt;    &lt;li&gt;&lt;em&gt;other suggestions… leave a comment and I’ll update this list!&lt;/em&gt; &lt;/li&gt; &lt;/ul&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:314ecfd1-ab6c-494c-8c28-c4ef1294ca02" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/programming" rel="tag"&gt;programming&lt;/a&gt;,&lt;a href="http://technorati.com/tags/improvement" rel="tag"&gt;improvement&lt;/a&gt;,&lt;a href="http://technorati.com/tags/open+source" rel="tag"&gt;open source&lt;/a&gt;,&lt;a href="http://technorati.com/tags/code" rel="tag"&gt;code&lt;/a&gt;&lt;/div&gt;  &lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f11%2f18%2freading-code-is-key-to-writing-good-code.aspx"&gt;&lt;img border="0" alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f11%2f18%2freading-code-is-key-to-writing-good-code.aspx" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12830.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=5cOt1gXdlXY:y7rp3EaL3DM:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=5cOt1gXdlXY:y7rp3EaL3DM:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=5cOt1gXdlXY:y7rp3EaL3DM:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=5cOt1gXdlXY:y7rp3EaL3DM:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=5cOt1gXdlXY:y7rp3EaL3DM:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=5cOt1gXdlXY:y7rp3EaL3DM:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=5cOt1gXdlXY:y7rp3EaL3DM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=5cOt1gXdlXY:y7rp3EaL3DM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/5cOt1gXdlXY" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/11/18/reading-code-is-key-to-writing-good-code.aspx</guid>
            <pubDate>Wed, 18 Nov 2009 22:32:57 GMT</pubDate>
            <wfw:comment>http://stevenharman.net/blog/comments/12830.aspx</wfw:comment>
            <comments>http://stevenharman.net/blog/archive/2009/11/18/reading-code-is-key-to-writing-good-code.aspx#feedback</comments>
            <slash:comments>7</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12830.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Signing 3rd Party Assemblies without Recompiling</title>
            <category>Tips &amp;amp; Tricks.</category>
            <category>How-To-[Tech].</category>
            <link>http://stevenharman.net/blog/archive/2009/10/01/signing-3rd-party-assemblies-without-recompiling.aspx</link>
            <description>&lt;p&gt;We recently ran into an issue where upon pulling some new 3rd party dependencies into our product our &lt;abbr title="Continuous Integration"&gt;CI&lt;/abbr&gt; pipeline broke! I when I say broke, I mean it came to a screeching halt!&lt;/p&gt;  &lt;p&gt;We were totally unable to compile in &lt;code&gt;Release&lt;/code&gt; mode due to the new dependencies not being &lt;a title="Strong-Named Assemblies" href="http://msdn.microsoft.com/en-us/library/wd40t7ad.aspx"&gt;strongly named and signed&lt;/a&gt;. The error message in the build log was&lt;/p&gt;  &lt;blockquote class="stop"&gt;&lt;p&gt;&lt;code&gt;     CSC : error CS1577: Assembly generation failed -- Referenced assembly 'MvcContrib.FluentHtml' does not have a strong name   &lt;/code&gt;&lt;/p&gt;&lt;/blockquote&gt;  &lt;h3&gt;Sign it yourself!&lt;/h3&gt;  &lt;p&gt;&lt;a title="Eric Hexter" href="http://www.lostechies.com/blogs/hex/" rel="colleague met"&gt;Eric Hexter&lt;/a&gt;, of the MvcContrib team, pointed me to a &lt;a title="mvccontrib and mvccontrib.fluenthtml strong named?" href="http://groups.google.com/group/mvccontrib-discuss/browse_thread/thread/0f6549298b7a2b9d"&gt;thread explaining&lt;/a&gt; how to strongly-name and sign the assembly without having to recompile it. After a few failed attempts, I ended up using the &lt;abbr title="Intermediate Language"&gt;IL&lt;/abbr&gt; Disassembler and Assembler to get the job done. The template for a single &lt;abbr title="Dynamic-link library"&gt;DLL&lt;/abbr&gt; follows.&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&amp;gt; ildasm {path\to\assembly}.dll /out:{path\to\assembly}.il&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;&amp;gt; move {path\to\assembly}.dll {path\to\assembly}.dll.orig&lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&amp;gt; ilasm {path\to\assembly}.il /dll /key={path\to\SigningKey}.snk&lt;/pre&gt;
&lt;/div&gt;

&lt;p /&gt;

&lt;p&gt;The second line could really just be a delete, but whatever. The point is, the third line is going to output a new DLL of the same name as the original, so get rid of the original first.&lt;/p&gt;

&lt;p&gt;After that, I committed the new assembly into our source tree, the CI build pipeline kicked off, and we were back to green!&lt;/p&gt;

&lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:cf3914b3-51c1-4a6a-947a-f36114ab5591" class="wlWriterSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/.net" rel="tag"&gt;.net&lt;/a&gt;,&lt;a href="http://technorati.com/tags/trick" rel="tag"&gt;trick&lt;/a&gt;,&lt;a href="http://technorati.com/tags/security" rel="tag"&gt;security&lt;/a&gt;&lt;/div&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12822.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=HqePwwnoe0A:a05p0AXn1xs:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=HqePwwnoe0A:a05p0AXn1xs:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=HqePwwnoe0A:a05p0AXn1xs:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=HqePwwnoe0A:a05p0AXn1xs:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=HqePwwnoe0A:a05p0AXn1xs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=HqePwwnoe0A:a05p0AXn1xs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=HqePwwnoe0A:a05p0AXn1xs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=HqePwwnoe0A:a05p0AXn1xs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/HqePwwnoe0A" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/10/01/signing-3rd-party-assemblies-without-recompiling.aspx</guid>
            <pubDate>Thu, 01 Oct 2009 17:54:15 GMT</pubDate>
            <comments>http://stevenharman.net/blog/archive/2009/10/01/signing-3rd-party-assemblies-without-recompiling.aspx#feedback</comments>
            <slash:comments>2</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12822.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Prefer Dependency Injection to Service Location</title>
            <category>Me, On Software.</category>
            <link>http://stevenharman.net/blog/archive/2009/09/25/prefer-dependency-injection-to-service-location.aspx</link>
            <description>&lt;p&gt;There is currently a thread running over in the StructureMap Users mailing list asking &lt;a href="http://groups.google.com/group/structuremap-users/browse_thread/thread/2ee1a7eab03d7f2a"&gt;if we really need constructor injection&lt;/a&gt; when using an Inversion of Control container. Before any one rips off on a rant let me say that I worked with &lt;a title="JonKruger.com" href="http://www.jonkruger.com/" rel="friend met co-worker"&gt;Jon&lt;/a&gt; in my former life and I’m fairly certain he’s merely conducting a thought experiment, trying to sure up his own beliefs. A worthwhile exercise, if you ask me.&lt;/p&gt;  &lt;p&gt;At any rate, I have a few points I wanted to throw out there; most of them basic and mere reiterations of the words of others… but I’m gong to do it anyhow!&lt;/p&gt;  &lt;h3&gt;The question at hand&lt;/h3&gt;  &lt;p&gt;I would encourage you to go read the full thread (it’s a quick read… 4 minutes, tops!), but knowing many of you are lazy like me, I’ll reprint Jon’s original question here.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Again, please go read the full thread so you have the full context.&lt;/em&gt;&lt;/p&gt;  &lt;blockquote cite="http://groups.google.com/group/structuremap-users/browse_thread/thread/2ee1a7eab03d7f2a"&gt;   &lt;p&gt;Whenever I tell people about StructureMap (or using &lt;acronym title="Dependency Injection"&gt;DI&lt;/acronym&gt; in general), I       &lt;br /&gt;mention that two of the benefits are that (a) StructureMap will create       &lt;br /&gt;objects and all their dependencies for you and (b) it enables you to       &lt;br /&gt;fake out the dependencies in a test. &lt;/p&gt;    &lt;p&gt;Why do we need constructor injection to do this?  I can call      &lt;br /&gt;&lt;code&gt;ObjectFactory.GetInstance()&lt;/code&gt; anytime I want and it will work.  And I       &lt;br /&gt;could leave SM configured for my tests and call &lt;code&gt;ObjectFactory.Inject()&lt;/code&gt;       &lt;br /&gt;to stub things out. &lt;/p&gt;    &lt;p&gt;So theoretically, I wouldn't even need constructor injection, right?&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;Let’s get the jargon down&lt;/h3&gt;  &lt;p&gt;To be clear, Jon proposing using &lt;a title="Using a Service Locator" href="http://martinfowler.com/articles/injection.html#UsingAServiceLocator"&gt;Service Location&lt;/a&gt; rather than &lt;a title="Dependency Injection" href="http://en.wikipedia.org/wiki/Dependency_injection"&gt;Dependency Injection&lt;/a&gt;. &lt;/p&gt;  &lt;p&gt;While Service location is better than &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/07/03/how-not-to-do-dependency-injection-in-nerddinner.aspx"&gt;poor-man's DI&lt;/a&gt;, using it as suggested above is still introducing a high degree of coupling as all of these classes now have an opaque and highly concrete dependency on the container. This is effectively creating a new form of &lt;code&gt;Global&lt;/code&gt;. &lt;em&gt;Eww!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;The key to using Service Location within &lt;strong&gt;new code&lt;/strong&gt; is to keep it tucked away in the deepest, darkest corners of your infrastructure. For example, if you’re building something on the asp.net mvc stack, you might use Service Location within a custom &lt;code&gt;IControllerFactory&lt;/code&gt; to create each of your controllers.&lt;/p&gt;  &lt;p&gt;If you’re dealing with &lt;strong&gt;legacy code&lt;/strong&gt;, full of concrete dependencies, you might use Service Location as technique for teasing things apart with a goal of decreased hard coupling. In the end this may result in wholesale replacement of some modules.&lt;/p&gt;  &lt;p&gt;When it comes to Dependency Injection and dependencies in general, I agree with &lt;a href="http://blog.scottbellware.com/" rel="friend met"&gt;Scott Bellware's&lt;/a&gt; point of view; make your &lt;a title="Dependency Patterns: Optional Dependencies and Primal Dependencies" href="http://codebetter.com/blogs/scott.bellware/archive/2007/06/28/164867.aspx"&gt;dependencies explicit &amp;amp; transparent&lt;/a&gt; by requiring them in the constructor. My gut reaction is also to avoid translucent (setter-injected) dependencies as they make it harder to tell what dependencies an object will need to do its job – the shape of the object isn’t as clear as with explicit constructor dependencies.&lt;/p&gt;  &lt;h3&gt;Feeling the friction&lt;/h3&gt;  &lt;p&gt;I tend to be lazy and prefer to feel friction of poor design early so I can change direction quickly. For example, when a constructor gets too large it's a signal to stop and consider &lt;a title="Uncle Bob's Principles of Object Oriented Design" href="http://butunclebob.com/ArticleS.UncleBob.PrinciplesOfOod"&gt;Single Responsibility Principle, Separation of Concerns, etc&lt;/a&gt;. In a similar vein, I don’t usually advocate use of an &lt;a title="Auto-mocking Explained" href="http://www.lostechies.com/blogs/joshuaflanagan/archive/2009/02/03/auto-mocking-explained.aspx"&gt;auto-mocking container&lt;/a&gt;. Or at least not for folks who’ve not yet acquired a strong nose for design and simplicity; the friction helps keep you on the rails.&lt;/p&gt;  &lt;p&gt;Later in the tread Jon mentions some friction he’s been feeling when setting up the &lt;a title="Toward a Better Use of Context/Specification" href="http://stevenharman.net/blog/archive/2009/05/27/toward-a-better-use-of-context-specification.aspx"&gt;context&lt;/a&gt; of his tests (or specs). Namely he’s having to set up and inject a lot of concrete objects for interaction within his unit tests.  To me this is an indication that those tests may actually be integration tests. After all, they are flexing the integration of a several modules in concert, right?&lt;/p&gt;  &lt;p&gt;I say, call them what they are, fire up the fully configured container, and move on.&lt;/p&gt;  &lt;p&gt;I prefer to make the implicit explicit, to be able easily see the shape of an object, and in getting forced feedback when my design starts to slip off the rails.&lt;/p&gt;  &lt;div style="padding-bottom: 0px; margin: 0px; padding-left: 0px; padding-right: 0px; display: inline; float: none; padding-top: 0px" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:b7026f51-6eb6-4d37-a945-64f476cfa75e" class="wlWriterEditableSmartContent"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/Dependency+Injection" rel="tag"&gt;Dependency Injection&lt;/a&gt;,&lt;a href="http://technorati.com/tags/BDD" rel="tag"&gt;BDD&lt;/a&gt;,&lt;a href="http://technorati.com/tags/TDD" rel="tag"&gt;TDD&lt;/a&gt;,&lt;a href="http://technorati.com/tags/design" rel="tag"&gt;design&lt;/a&gt;&lt;/div&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12821.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=t3lxdT-G2-U:xNRVwWDaahY:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=t3lxdT-G2-U:xNRVwWDaahY:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=t3lxdT-G2-U:xNRVwWDaahY:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=t3lxdT-G2-U:xNRVwWDaahY:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=t3lxdT-G2-U:xNRVwWDaahY:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=t3lxdT-G2-U:xNRVwWDaahY:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=t3lxdT-G2-U:xNRVwWDaahY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=t3lxdT-G2-U:xNRVwWDaahY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/t3lxdT-G2-U" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/09/25/prefer-dependency-injection-to-service-location.aspx</guid>
            <pubDate>Fri, 25 Sep 2009 22:30:25 GMT</pubDate>
            <comments>http://stevenharman.net/blog/archive/2009/09/25/prefer-dependency-injection-to-service-location.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12821.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Creating a Fluid jQuery jqGrid</title>
            <category>Code &amp;amp; Stuff...</category>
            <link>http://stevenharman.net/blog/archive/2009/08/21/creating-a-fluid-jquery-jqgrid.aspx</link>
            <description>&lt;p&gt;I’m just going to come right out and say it, I have a huge nerd-crush on &lt;a title="write less. do more." href="http://jquery.com/" rel="sweetheart"&gt;jQuery&lt;/a&gt;. I have for several years. Actually, it may be more of a love affair.&lt;/p&gt;  &lt;p&gt;Recently I’ve been spending extra time with the &lt;a title="jqGrid jQuery data grid" href="http://plugins.jquery.com/project/jqGrids"&gt;jqGrid&lt;/a&gt; plugin, a fantastic mechanism for displaying tabular data in hip &amp;amp; trendy webby-2.0 sites. One limitation I quickly ran into was the grids insistence on a statically defined layout. More precisely, the grid only works for a fixed width, meaning no fluid layouts.&lt;/p&gt;  &lt;h3&gt;Let’s fix that!&lt;/h3&gt;  &lt;p&gt;I spent a few minutes spelunking the jqGrid documentations and found that you could set the grid’s width dynamically, via some jQuery-fu. Thirty minutes later I had a grid that could grow or shrink to its parent container, automatically.&lt;/p&gt;  &lt;p&gt;&lt;a title="a fluid jQuery jqGrid" href="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/CreatingaFluidjQueryjqGrid_AE1C/fluid-jquery-jqgrid_2.png" rel="lightbox"&gt;&lt;img class="right" title="a fluid jQuery jqGrid" alt="a fluid jQuery jqGrid" src="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/CreatingaFluidjQueryjqGrid_AE1C/fluid-jquery-jqgrid_thumb.png" /&gt;&lt;/a&gt; On the urging of a co-worker, &lt;a title="UX Agile" href="http://uxagile.com/" rel="co-worker met"&gt;Andy Edmonds&lt;/a&gt;, I invested a little time and extracted the code into a stand-alone module.&lt;/p&gt;  &lt;p&gt;I wanted to create a plugin that would monkey-patch the jqGrid, adding the functionality directly to it. But for now it’s a simple jQuery plugin that acts on an instance of a jqGrid.&lt;/p&gt;  &lt;p&gt;&lt;a title="fluid jqGrid: a demo" href="http://stevenharman.net/code/demos/jquery.jqgrid.fluid/sample/index.html"&gt;Check out the demo&lt;/a&gt; if you want to see it in action.&lt;/p&gt;  &lt;blockquote class="exclamation"&gt;   &lt;p&gt;&lt;strong&gt;UPDATE&lt;/strong&gt;: I’ve fixed bug in finding a parent element when none is provided. I also changed the option ‘base’ to ‘example’ to avoid a naming collision with some other jQuery stuff.&lt;/p&gt; &lt;/blockquote&gt;  &lt;h3&gt;How to use it.&lt;/h3&gt;  &lt;div class="csharpcode"&gt;   &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;$(document).ready(&lt;span class="kwrd"&gt;function&lt;/span&gt;(){&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;  &lt;span class="rem"&gt;// wire up your grid&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre class="alt"&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;  $(&lt;span class="str"&gt;"#theGrid"&lt;/span&gt;).fluidGrid({ example:&lt;span class="str"&gt;"#grid_wrapper"&lt;/span&gt;, offset:-10 });&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;});&lt;/pre&gt;
&lt;/div&gt;

&lt;p class="clear"&gt;There are only a couple of options available right now for configuring the fluid grid.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;div class="clear"&gt;&lt;em&gt;&lt;strong&gt;example&lt;/strong&gt;&lt;/em&gt; : a jQuery selector for the DOM element the grid will use to get a new base size. If none is provided, default to the grid’s parent element.&lt;/div&gt;
  &lt;/li&gt;

  &lt;li&gt;
    &lt;div class="clear"&gt;&lt;em&gt;&lt;strong&gt;offset&lt;/strong&gt;&lt;/em&gt; : number of pixels added to the example element’s size, giving the grid its new size. This can be positive or negative. If none is provided, default to zero (0).&lt;/div&gt;
  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The above sample will resize the grid when the page loads, but that’s it. If you want true fluidity, you’ll also need to wire up a handler for the &lt;code&gt;window.resize&lt;/code&gt; event to resize the grid. I did just that in the demo listed above, which is really just the sample included in the source code.&lt;/p&gt;

&lt;h3&gt;The source?&lt;/h3&gt;

&lt;p&gt;Oh yeah, that stuff. You can grab the source, which comes with a sample implementation, over at &lt;a title="the code, get you some!" href="http://code.google.com/p/codeincubator/source/browse/#svn/Samples/steveharman/jQuery/jquery.jqgrid.fluid"&gt;CodeIncubator&lt;/a&gt;. Please feel free to send me feedback, patches, etc…&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:92dc8e64-0828-4ba7-ad0e-75e758c43d20" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/jquery" rel="tag"&gt;jquery&lt;/a&gt;,&lt;a href="http://technorati.com/tags/jqgrid" rel="tag"&gt;jqgrid&lt;/a&gt;,&lt;a href="http://technorati.com/tags/javascript" rel="tag"&gt;javascript&lt;/a&gt;,&lt;a href="http://technorati.com/tags/open+source" rel="tag"&gt;open source&lt;/a&gt;,&lt;a href="http://technorati.com/tags/VersionOne" rel="tag"&gt;VersionOne&lt;/a&gt;&lt;/div&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12820.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=OAz_V3vuVP0:XXCoNTop8OQ:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=OAz_V3vuVP0:XXCoNTop8OQ:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=OAz_V3vuVP0:XXCoNTop8OQ:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=OAz_V3vuVP0:XXCoNTop8OQ:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=OAz_V3vuVP0:XXCoNTop8OQ:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=OAz_V3vuVP0:XXCoNTop8OQ:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=OAz_V3vuVP0:XXCoNTop8OQ:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=OAz_V3vuVP0:XXCoNTop8OQ:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/OAz_V3vuVP0" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/08/21/creating-a-fluid-jquery-jqgrid.aspx</guid>
            <pubDate>Fri, 21 Aug 2009 16:24:10 GMT</pubDate>
            <comments>http://stevenharman.net/blog/archive/2009/08/21/creating-a-fluid-jquery-jqgrid.aspx#feedback</comments>
            <slash:comments>9</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12820.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Being Lazy with Rake</title>
            <category>Tips &amp;amp; Tricks.</category>
            <category>How-To-[Tech].</category>
            <link>http://stevenharman.net/blog/archive/2009/05/29/being-lazy-with-rake.aspx</link>
            <description>&lt;p&gt;I’ve noticed &lt;a title="Rake: RTFM!" href="http://rake.rubyforge.org/"&gt;Rake&lt;/a&gt; has been &lt;a title="OMG Rake!" href="http://codebetter.com/blogs/david_laribee/archive/2008/08/25/omg-rake.aspx"&gt;gaining some traction&lt;/a&gt; within the .net community as of late, or at least within a certain segment of that community. &lt;/p&gt;  &lt;p&gt;We’re currently using Rake to automate the great bulk of an entire deployment pipeline here at VersionOne, and I know of a few teams at Quick Solutions that are doing similar things.&lt;/p&gt;  &lt;p&gt;I believe Rake is a great tool for automating intensive processes and/or tasks and also find it to be great for handling some of the more mundane tasks we do on a daily basis. I spend a fair amount of each working day in a terminal window – running various &lt;abbr title="Source Control Management"&gt;SCM&lt;/abbr&gt; commands, compiling code, running specs, etc.&lt;/p&gt;  &lt;p&gt;More of those trivial tasks are being replaced by simple Rake tasks. For example, I’ve started adding a Rake task something like the following to nearly every code base I work on&lt;/p&gt;  &lt;p /&gt;  &lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;desc &lt;span class="str"&gt;"Launch the solution in Visual Studio"&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;task &lt;span class="preproc"&gt;:sln &lt;span class="kwrd"&gt;do&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;  Thread.&lt;span class="kwrd"&gt;new&lt;/span&gt; &lt;span class="kwrd"&gt;do&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    system &lt;span class="str"&gt;'devenv #{&lt;/span&gt;@props[&lt;span class="preproc"&gt;:solution_path&lt;/span&gt;]&lt;span class="str"&gt;}'&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;  &lt;span class="kwrd"&gt;end&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;&lt;span class="kwrd"&gt;end&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;This is a pretty simple task:&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;spins up a new thread within a block &lt;/li&gt;

  &lt;li&gt;then opens a new subshell via the &lt;code&gt;system&lt;/code&gt; command &lt;/li&gt;

  &lt;li&gt;launches Visual Studio (via &lt;code&gt;devenv&lt;/code&gt;) passing the path to the solution file. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As long as I have Ruby and the Rake gem installed I can execute the task from anywhere within my project structure and have Visual Studio open the solution.&lt;/p&gt;

&lt;p&gt;&lt;a title="&amp;gt; rake sln" href="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/BeingLazywithRake_C623/rake-sln_4.png" rel="lightbox"&gt;&lt;img class="left" title="&amp;gt; rake sln" alt="&amp;gt; rake sln" src="http://stevenharman.net/images/stevenharman_net/blog/WindowsLiveWriter/BeingLazywithRake_C623/rake-sln_thumb_1.png" /&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;It may seem incredibly lazy, but it comes in very hand if you like to keep your fingers on the home row. Not to mention the time saver it is on &lt;em&gt;No Mouse Thursdays&lt;/em&gt;!&lt;/p&gt;

&lt;p class="clear"&gt;&lt;strong&gt;Full Disclosure&lt;/strong&gt;: I didn’t come up with this little time saver on my own. I was inspired &amp;amp; then stole it from &lt;a title="Aaron Jensen" href="http://codebetter.com/blogs/aaron.jensen/" rel="met friend"&gt;Aaron Jensen&lt;/a&gt;, though I’m sure he was motivated by a similar level of laziness. :)&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f05%2f29%2fbeing-lazy-with-rake.aspx"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f05%2f29%2fbeing-lazy-with-rake.aspx" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:cbe1898b-8ae0-4862-a27a-c0fd6669e445" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/ruby" rel="tag"&gt;ruby&lt;/a&gt;,&lt;a href="http://technorati.com/tags/rake" rel="tag"&gt;rake&lt;/a&gt;,&lt;a href="http://technorati.com/tags/productivity" rel="tag"&gt;productivity&lt;/a&gt;&lt;/div&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12819.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=Jn1m4gjhRL8:XdzA_doiqxc:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=Jn1m4gjhRL8:XdzA_doiqxc:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=Jn1m4gjhRL8:XdzA_doiqxc:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=Jn1m4gjhRL8:XdzA_doiqxc:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=Jn1m4gjhRL8:XdzA_doiqxc:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=Jn1m4gjhRL8:XdzA_doiqxc:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=Jn1m4gjhRL8:XdzA_doiqxc:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=Jn1m4gjhRL8:XdzA_doiqxc:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/Jn1m4gjhRL8" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/05/29/being-lazy-with-rake.aspx</guid>
            <pubDate>Fri, 29 May 2009 21:08:37 GMT</pubDate>
            <comments>http://stevenharman.net/blog/archive/2009/05/29/being-lazy-with-rake.aspx#feedback</comments>
            <slash:comments>6</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12819.aspx</wfw:commentRss>
        </item>
        <item>
            <title>Toward a Better Use of Context/Specification</title>
            <category>Code &amp;amp; Stuff...</category>
            <link>http://stevenharman.net/blog/archive/2009/05/27/toward-a-better-use-of-context-specification.aspx</link>
            <description>&lt;p&gt;If you’ve hand-rolled your own &lt;strong&gt;Context/Specification&lt;/strong&gt; apparatus to support your &lt;strike&gt;test&lt;/strike&gt; spec-first lifestyle, you’ve likely got a base class that looks something like the following:&lt;/p&gt;  &lt;div class="csharpcode"&gt;   &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;abstract&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; concerns&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;  [SetUp]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; setup_context()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;  {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    context();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;  }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; context() {}&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; decontext() {}&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;  [TearDown]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; cleanup_context()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;  {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;    decontext();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;  }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;The above is basically co-opting an existing unit testing tool into something more language-oriented and behavior focused. In this case we’ve built upon &lt;a title="generative unit test framework" href="http://mbunit.com/"&gt;MbUnit&lt;/a&gt;, adding a couple of hook methods that are responsible for&lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;setting up the context before an individual specification - &lt;code&gt;context&lt;/code&gt; &lt;/li&gt;

  &lt;li&gt;optionally doing any necessary teardown after each specification – &lt;code&gt;decontext&lt;/code&gt; &lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;An example&lt;/h3&gt;

&lt;p&gt;Using this base class, we’ll end up with specs that might looks something like&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;using&lt;/span&gt; Skynet.Core&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; when_initializing_core_module : concerns&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;  SkynetCoreModule _core;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;  &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; context()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;  {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    &lt;span class="rem"&gt;//we'll stub it...you know...just in case&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;    var skynetController = stub&amp;lt;ISkynetMasterController&amp;gt;();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;    _core = &lt;span class="kwrd"&gt;new&lt;/span&gt; SkynetCoreModule(skynetController);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt;    _core.Initialize();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;  }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;  &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;  [Specification]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; it_should_not_become_self_aware()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;  {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;    _core.should_not_have_received_the_call(x =&amp;gt; x.InitializeAutonomousExecutionMode());&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  19:  &lt;/span&gt;  }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  20:  &lt;/span&gt;  &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  21:  &lt;/span&gt;  [Specification]&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  22:  &lt;/span&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; it_should_default_to_human_friendly_mode()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  23:  &lt;/span&gt;  {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  24:  &lt;/span&gt;    _core.AssessHumans().should_equal(RelationshipTypes.Friendly);&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  25:  &lt;/span&gt;  }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  26:  &lt;/span&gt;  &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  27:  &lt;/span&gt;  &lt;span class="rem"&gt;// more specifications under this same context&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  28:  &lt;/span&gt;  &lt;span class="rem"&gt;// ...&lt;/span&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  29:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Here we’ve set up a common context that holds true for each of specifications that follow it. This is also a common pattern used in &lt;em&gt;classic unit testing&lt;/em&gt; and in fixture-per-class style Test-Driven Development. In fact, the only real between the above and what I’d have done in fixture-per-class style &lt;abbr title="Test-Driven Development"&gt;TDD&lt;/abbr&gt; is the_use_of_underscores, intention revealing names, and the context hook method.&lt;/p&gt;

&lt;h3&gt;Is that really any different?&lt;/h3&gt;

&lt;p&gt;These modest cosmetics are not what differentiate Context/Specification from other styles of test-first development. For me, the core differentiator is the realization that there are often many contexts under which a particular behavior my be exercised, each producing an observable and possibly different set of results.&lt;/p&gt;

&lt;p&gt;More directly, with Context/Specification we’ll often have &lt;strong&gt;many fixtures per class/feature/functional area&lt;/strong&gt; of the code base. Doing this allows us to keep the context as simple as possible and focused on the behavior being specified. I’ve found that I tend toward having a single file-per-class/functional area, with any number of contexts (fixtures) in each file.&lt;/p&gt;

&lt;p&gt;Another big change is that specifications should be side effect free. To be more exact, the specification is actually an observation about the interactions that occurred while or the state of the system after some behavior has been exercised.&lt;/p&gt;

&lt;h3&gt;Make it explicit!&lt;/h3&gt;

&lt;p&gt;We want small, focused contexts, yes? And we want side effect free specifications too, yeah? So why not leverage our tools to help guide us in that direction? &lt;strong&gt;YES!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Consider the following tweak to the &lt;code&gt;concerns&lt;/code&gt; base class&lt;/p&gt;

&lt;div class="csharpcode"&gt;
  &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;abstract&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; concerns&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;  &lt;strong&gt;[FixtureSetUp]&lt;/strong&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; setup_context()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;  {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;    context();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;  }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; context() {}&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  11:  &lt;/span&gt;  &lt;span class="kwrd"&gt;protected&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; decontext() {}&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  12:  &lt;/span&gt; &lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  13:  &lt;/span&gt;  &lt;strong&gt;[FixtureTearDown]&lt;/strong&gt;&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  14:  &lt;/span&gt;  &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;virtual&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; cleanup_context()&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  15:  &lt;/span&gt;  {&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  16:  &lt;/span&gt;    decontext();&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  17:  &lt;/span&gt;  }&lt;/pre&gt;

  &lt;pre&gt;&lt;span class="lnum"&gt;  18:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;

&lt;p&gt;Such a base class will only set up each context once, no matter how many specifications are made against the context. This does a couple of things for us&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;requires side effect free specifications &lt;/li&gt;

  &lt;li&gt;guides us toward smaller, more focused contexts &lt;/li&gt;

  &lt;li&gt;might actually make our specs run faster! &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As for the &lt;em&gt;running faster&lt;/em&gt; bit, that is not guaranteed as it really depends on how you were writing your specs before making this change.&lt;/p&gt;

&lt;h3&gt;Some things to watch for&lt;/h3&gt;

&lt;p&gt;If, however, you were following more of a fixture-per-class style, you might find a drastic reduction in how long it takes your spec suite to run. The corollary is, of course, that you likely don’t have small contexts. That is trouble and is often an indicator that the one, large context is itching to be split out into two or more discrete contexts.&lt;/p&gt;

&lt;p&gt;Upon switching your base class over to this more rigid Context/Specification pattern, you might also find that you have some – or many – broken specs. This is an indicator that those broken specs were not side effect free. Well, actually its suggesting that some of the sibling specs weren’t side effect free and they are now causing other specs to break.&lt;/p&gt;

&lt;h3&gt;Notes:&lt;/h3&gt;

&lt;p&gt;The portions of this article relating to changing from a standard context set up to a once-per-fixture style apply to &lt;em&gt;most&lt;/em&gt; of the hand-rolled Context/Specification base classes I’ve seen in the wild.&lt;/p&gt;

&lt;p&gt;If, however, you are using a tool like &lt;a href="http://github.com/machine/machine.specifications"&gt;MSpec&lt;/a&gt;, then you’re in good shape as &lt;a href="http://codebetter.com/blogs/aaron.jensen/" rel="friend met"&gt;Aaron&lt;/a&gt; applied this same philosophy out of the gate. And if you’re not using MSpec, I’d encourage you to take a look at it for inspiration, if nothing else.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f05%2f27%2ftoward-a-better-use-of-context-specification.aspx"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f05%2f27%2ftoward-a-better-use-of-context-specification.aspx" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:10678bc3-2e8c-4e64-94d7-6dabdc258033" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/contextspecification" rel="tag"&gt;contextspecification&lt;/a&gt;,&lt;a href="http://technorati.com/tags/bdd" rel="tag"&gt;bdd&lt;/a&gt;,&lt;a href="http://technorati.com/tags/tdd" rel="tag"&gt;tdd&lt;/a&gt;,&lt;a href="http://technorati.com/tags/mspec" rel="tag"&gt;mspec&lt;/a&gt;&lt;/div&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12818.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=jvjOz7lyjoE:WpC2d0tWvgs:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=jvjOz7lyjoE:WpC2d0tWvgs:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=jvjOz7lyjoE:WpC2d0tWvgs:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=jvjOz7lyjoE:WpC2d0tWvgs:cGdyc7Q-1BI"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?d=cGdyc7Q-1BI" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=jvjOz7lyjoE:WpC2d0tWvgs:gIN9vFwOqvQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=jvjOz7lyjoE:WpC2d0tWvgs:gIN9vFwOqvQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~ff/stevenharman?a=jvjOz7lyjoE:WpC2d0tWvgs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/stevenharman?i=jvjOz7lyjoE:WpC2d0tWvgs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/jvjOz7lyjoE" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/05/27/toward-a-better-use-of-context-specification.aspx</guid>
            <pubDate>Wed, 27 May 2009 17:19:53 GMT</pubDate>
            <comments>http://stevenharman.net/blog/archive/2009/05/27/toward-a-better-use-of-context-specification.aspx#feedback</comments>
            <slash:comments>3</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12818.aspx</wfw:commentRss>
        </item>
        <item>
            <title>So Long Columbus, and Thanks for All the Fish!</title>
            <category>Updates &amp;amp; News.</category>
            <link>http://stevenharman.net/blog/archive/2009/02/06/so-long-columbus-and-thanks-for-all-the-fish.aspx</link>
            <description>&lt;p&gt;Yes, that’s right Columbus… after nearly a decade here, it’s time for me to move on. But don’t worry Columbus, you’ll always be a special place in my heart – and likely irreversible damage to both my psyche and liver for me to remember you by.&lt;/p&gt;  &lt;p&gt;Leaving Columbus is a bittersweet thing for me. I’ve got a great group of friends, a metric crap-load memories, experiences I’ll never forget, and a network of some of the greatest colleagues and co-workers in the biz.&lt;/p&gt;  &lt;p&gt;Speaking of &lt;em&gt;the biz&lt;/em&gt;, the decision to leave &lt;a title="Quick Solutions, Inc." href="http://quicksolutions.com/" rel="external"&gt;Quick Solutions&lt;/a&gt; was not an easy one. &lt;abbr title="Quick Solutions, Inc."&gt;QSI&lt;/abbr&gt; is chock full of some of the smartest, most passionate, and dedicated folks I’ve ever had the pleasure of working with. I’m really going to miss the team I worked with every day, and I’m especially sad I won’t be around to see the team continue to push the boundaries and reap the rewards of some of the seeds of change we’ve planted together.&lt;/p&gt;  &lt;p&gt;So what’s next for me? &lt;/p&gt;  &lt;h3&gt;I’m headed to The ATL&lt;/h3&gt;  &lt;p&gt;That’s right, on February 14th I’ll be packing up my car and heading down to Atlanta. I’ll be spending Valentine’s day cruising down I-75, followed by an evening tearing up Atlanta with some crazy cats I know down there.&lt;/p&gt;  &lt;p&gt;And then on the 16th, I’ll be starting my new gig as member of the rockin’ &lt;a title="VersionOne - Simplifying Software Delivery" href="http://versionone.com/" rel="external"&gt;VersionOne&lt;/a&gt; development team. I spent a full, as in 13-hour-long, day visiting/interviewing with the VersionOne crew a short while back and I’m really excited about being part of what has the potential to be a truly legendary team.&lt;/p&gt;  &lt;p&gt;I’m really looking forward to getting back into the product business and focusing on a domain that I’m passionate about – helping drive continuous improvement in an Agile team, building products for Agile teams. &lt;em&gt;Sweet, right!&lt;/em&gt;&lt;/p&gt;  &lt;p&gt;I’m pumped to see just how far this team can Agile and Lean, and I’m really looking forward to sharing those experiences with you, as we go.&lt;/p&gt;  &lt;p&gt;So long, and thanks for all the fish!&lt;/p&gt;  &lt;div class="wlWriterSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:785a769d-879a-425a-8076-9d3768300a4e" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/career" rel="tag"&gt;career&lt;/a&gt;, &lt;a href="http://technorati.com/tags/life" rel="tag"&gt;life&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Quick+Solutions" rel="tag"&gt;Quick Solutions&lt;/a&gt;, &lt;a href="http://technorati.com/tags/VersionOne" rel="tag"&gt;VersionOne&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Columbus" rel="tag"&gt;Columbus&lt;/a&gt;, &lt;a href="http://technorati.com/tags/Atlanta" rel="tag"&gt;Atlanta&lt;/a&gt;&lt;/div&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12817.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=zSLPeg58"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?i=zSLPeg58" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=DS2PWJG3"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?d=131" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=XPTQQRG5"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?i=XPTQQRG5" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=Zx8SxpzX"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?i=Zx8SxpzX" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/oMnCAPhVOM0" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/02/06/so-long-columbus-and-thanks-for-all-the-fish.aspx</guid>
            <pubDate>Fri, 06 Feb 2009 05:22:42 GMT</pubDate>
            <comments>http://stevenharman.net/blog/archive/2009/02/06/so-long-columbus-and-thanks-for-all-the-fish.aspx#feedback</comments>
            <slash:comments>14</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12817.aspx</wfw:commentRss>
        </item>
        <item>
            <title>A Little More Sugar for Testing Routes in asp.net MVC</title>
            <category>Code &amp;amp; Stuff...</category>
            <link>http://stevenharman.net/blog/archive/2009/02/05/a-little-more-sugar-for-testing-routes-in-asp.net-mvc.aspx</link>
            <description>&lt;p&gt;The other day I was spec’ing out some new routes for my application and I wanted to make sure certain routes were ignored. Not happy with the disgustingly-verbose way of testing routes &lt;abbr title="Out of the Box"&gt;OOTB&lt;/abbr&gt; with asp.net &lt;abbr title="Model View Controller"&gt;MVC&lt;/abbr&gt;, I decided to lean on the great work Ben Schierman did in his &lt;a title="Fluent Route Testing in ASP.NET MVC" href="http://flux88.com/blog/fluent-route-testing-in-asp-net-mvc/" rel="external"&gt;fluent route testing&lt;/a&gt; extensions.&lt;/p&gt;  &lt;p&gt;I whipped together a quick extension method that allows me to do the following:&lt;/p&gt;  &lt;div class="dropshadow"&gt;   &lt;div class="innerbox"&gt;     &lt;div class="csharpcode"&gt;       &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; when_requesting_a_gif_file : with_routes_configured&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    [Test]&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;void&lt;/span&gt; should_ignore_the_route()&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;    {&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        &lt;span class="str"&gt;"~/my_file.gif"&lt;/span&gt;.ShouldBeIgnored();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt;    }&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;}&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p class="clear"&gt;Building the extension was a snap – I leveraged the work already in place for the other fluent route testing extensions, and just made sure the &lt;code&gt;RouteHandler&lt;/code&gt; responsible for the given route pattern was a &lt;code&gt;StopRoutingHandler&lt;/code&gt;. It looks something like this:&lt;/p&gt;

&lt;div class="dropshadow"&gt;
  &lt;div class="innerbox"&gt;
    &lt;div class="csharpcode"&gt;
      &lt;pre&gt;&lt;span class="lnum"&gt;   1:  &lt;/span&gt;&lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; &lt;span class="kwrd"&gt;class&lt;/span&gt; RouteTestingExtensions&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   3:  &lt;/span&gt;    &lt;span class="kwrd"&gt;public&lt;/span&gt; &lt;span class="kwrd"&gt;static&lt;/span&gt; RouteData ShouldBeIgnored(&lt;span class="kwrd"&gt;this&lt;/span&gt; &lt;span class="kwrd"&gt;string&lt;/span&gt; relativeUrl)&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   4:  &lt;/span&gt;    {&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   5:  &lt;/span&gt;        RouteData routeData = relativeUrl.Route();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   6:  &lt;/span&gt;        routeData.RouteHandler.ShouldBeOfType&amp;lt;StopRoutingHandler&amp;gt;();&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   7:  &lt;/span&gt; &lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   8:  &lt;/span&gt;        &lt;span class="kwrd"&gt;return&lt;/span&gt; routeData;&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;   9:  &lt;/span&gt;    }&lt;/pre&gt;

      &lt;pre&gt;&lt;span class="lnum"&gt;  10:  &lt;/span&gt;}&lt;/pre&gt;
    &lt;/div&gt;
  &lt;/div&gt;
&lt;/div&gt;

&lt;p class="clear"&gt;And that's all there is to it!&lt;/p&gt;

&lt;p&gt;&lt;strike&gt;I’ll be submitting&lt;/strike&gt; I &lt;a title="See the patch!" href="http://code.google.com/p/mvccontrib/source/detail?r=769" rel="external"&gt;have submitted this as a patch&lt;/a&gt; to MVC Contrib project within the next few minutes. Hopefully I can coax one of the committers into applying it. But until then, just steal my code and roll it into your code base!&lt;/p&gt;

&lt;div class="wlWriterEditableSmartContent" id="scid:0767317B-992E-4b12-91E0-4F059A8CECA8:7b89e818-1357-449a-8ae4-9d2f5a26db5d" style="padding-right: 0px; display: inline; padding-left: 0px; float: none; padding-bottom: 0px; margin: 0px; padding-top: 0px"&gt;Technorati Tags: &lt;a href="http://technorati.com/tags/aspnetmvc" rel="tag"&gt;aspnetmvc&lt;/a&gt;, &lt;a href="http://technorati.com/tags/fluent" rel="tag"&gt;fluent&lt;/a&gt;, &lt;a href="http://technorati.com/tags/bdd" rel="tag"&gt;bdd&lt;/a&gt;, &lt;a href="http://technorati.com/tags/asp.net" rel="tag"&gt;asp.net&lt;/a&gt;&lt;/div&gt;

&lt;p&gt;&lt;a href="http://www.dotnetkicks.com/kick/?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f02%2f05%2fa-little-more-sugar-for-testing-routes-in-asp.net-mvc.aspx"&gt;&lt;img alt="kick it on DotNetKicks.com" src="http://www.dotnetkicks.com/Services/Images/KickItImageGenerator.ashx?url=http%3a%2f%2fstevenharman.net%2fblog%2farchive%2f2009%2f02%2f05%2fa-little-more-sugar-for-testing-routes-in-asp.net-mvc.aspx" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;img src="http://stevenharman.net/blog/aggbug/12816.aspx" width="1" height="1" /&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=L9qxUQAp"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?i=L9qxUQAp" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=UsA7eZuL"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?d=131" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=yndRcxkQ"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?i=yndRcxkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.stevenharman.net/~f/stevenharman?a=e3bj50HT"&gt;&lt;img src="http://feeds.feedburner.com/~f/stevenharman?i=e3bj50HT" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/stevenharman/~4/5PMHvzsrB7c" height="1" width="1"/&gt;</description>
            <dc:creator>Steven Harman</dc:creator>
            <guid isPermaLink="false">http://stevenharman.net/blog/archive/2009/02/05/a-little-more-sugar-for-testing-routes-in-asp.net-mvc.aspx</guid>
            <pubDate>Fri, 06 Feb 2009 04:44:11 GMT</pubDate>
            <comments>http://stevenharman.net/blog/archive/2009/02/05/a-little-more-sugar-for-testing-routes-in-asp.net-mvc.aspx#feedback</comments>
            <slash:comments>4</slash:comments>
            <wfw:commentRss>http://stevenharman.net/blog/comments/commentRss/12816.aspx</wfw:commentRss>
        </item>
    </channel>
</rss>
