<?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:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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:dc="http://purl.org/dc/elements/1.1/" xmlns:pingback="http://madskills.com/public/xml/rss/module/pingback/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
  <channel>
    <title>Nervoustych</title>
    <link>http://www.nervoustych.com/blog/</link>
    <description>Code, art and other things that make me tych</description>
    <language>en-us</language>
    <copyright>Jim Burger</copyright>
    <lastBuildDate>Wed, 11 Mar 2009 08:33:46 GMT</lastBuildDate>
    <generator>newtelligence dasBlog 1.9.6264.0</generator>
    <managingEditor>jim@nervoustych.com</managingEditor>
    <webMaster>jim@nervoustych.com</webMaster>
    <geo:lat>-35.136469</geo:lat><geo:long>138.5118</geo:long><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/Nervoustych" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=2bef4dc3-0ea9-4c55-b77f-846c54431fca</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,2bef4dc3-0ea9-4c55-b77f-846c54431fca.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,2bef4dc3-0ea9-4c55-b77f-846c54431fca.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=2bef4dc3-0ea9-4c55-b77f-846c54431fca</wfw:commentRss>
      
      <title>What me, cheap?</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,2bef4dc3-0ea9-4c55-b77f-846c54431fca.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/GJNQNBiGF6c/PermaLink,guid,2bef4dc3-0ea9-4c55-b77f-846c54431fca.aspx</link>
      <pubDate>Wed, 11 Mar 2009 08:33:46 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/archive/2009/03/08/why-are-we-so-cheap-with-software.aspx"&gt;In&#xD;
a recent post,&lt;/a&gt;  &lt;a href="http://www.lostechies.com/blogs/jimmy_bogard/default.aspx"&gt;Jimmy&#xD;
Bogard&lt;/a&gt; goes on the offensive and asks why are we, as developers so cheap when&#xD;
it comes to buying  tools for software development? &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Jimmy points out as soon as a dev wants to use a productivity tool, the requisition&#xD;
department seems to kick in and find a reason why not to spend money on it. Sometimes&#xD;
that department is the developers LHS of their brain kicking in, other times its a&#xD;
whole team of accountants waving their bottom lines at the dev team in dismay.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’m going to defend my apparent frugality. And the LHS of my brain.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;I’m not cheap&lt;/strong&gt;, I just have a &lt;a href="http://www.secretgeek.net/lft.asp"&gt;low&#xD;
tolerance for frustration&lt;/a&gt;, &lt;a href="http://blogoscoped.com/archive/2005-08-24-n14.html"&gt;am&#xD;
lazy &amp;amp; dumb&lt;/a&gt;, and have a surplus of free stuff &lt;a href="http://sourceforge.net/"&gt;available&lt;/a&gt;&lt;a href="http://code.google.com/"&gt;to&lt;/a&gt;&lt;a href="http://codeplex.com"&gt;me&lt;/a&gt;. &lt;a href="http://ayende.com/Blog/archive/2009/02/06/closing-the-xheo-saga.aspx"&gt;Like&#xD;
many others,&lt;/a&gt; I’ve also been burned by snake oil merchants more times than I care&#xD;
to remember. If that makes me cheap then chuck me in the deep fryer and throw me to&#xD;
the capitalists.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;img style="margin: 0px; display: inline" title="Alfred E Neuman on the face of a US three dollar bill" alt="Alfred E Neuman on the face of a US three dollar bill" src="http://farm1.static.flickr.com/218/469212512_907d717827.jpg" width="640" height="426"&gt;&lt;/img&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Jimmy is completely correct though, the issue lies with the people setting the budgets&#xD;
for tooling in the first place. They are conditioned to purchase software in bulk,&#xD;
so when asked for a diff tool, they automatically extrapolate that cost over every&#xD;
desktop and come up with some scary figure. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
This is the wrong approach. Give each developer control over the tools they are going&#xD;
to need to automate their daily work. They are as power tools are to a tradesperson.&#xD;
Each developer will need different tools. Let them sort out the overlap and find the&#xD;
bulk deals if they exist.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’ll tell you what I consider cheap: &#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
Employers who expect developers to ‘just do it’. Serious development requires serious&#xD;
power tools. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Employers who don’t allow developers to augment their own toolset. ‘You will use the&#xD;
standard toolkit and NOT deviate from it.’&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Developers who think that their employers should fork out for every tool that their&#xD;
heart desires. Go augment your own toolkit FFS.&lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;p&gt;&#xD;
I know point three is going to put some noses out of joint. I don’t care. I’ve long&#xD;
been a believer that a developer should be in charge of their own toolkit. In a very&#xD;
real sense, this means you are in charge of your own productivity.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I also believe that a developer should be afforded a regular tool allowance by their&#xD;
employer. Tools break or become obsolete; they need replacing or upgrading. The best&#xD;
person to decide when and what, is the developer. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Finally, in the case of a dispute, a developer should be encouraged to purchase the&#xD;
tool of their dreams, and upon proving its worth to the employer, be reimbursed.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Oh…and besides all that…. I don’t personally see what’s wrong with being cheap anyhow&#xD;
;) &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=2bef4dc3-0ea9-4c55-b77f-846c54431fca"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=GJNQNBiGF6c:vg38EvY_k0A:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=GJNQNBiGF6c:vg38EvY_k0A:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?i=GJNQNBiGF6c:vg38EvY_k0A:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=GJNQNBiGF6c:vg38EvY_k0A:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?i=GJNQNBiGF6c:vg38EvY_k0A:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=GJNQNBiGF6c:vg38EvY_k0A:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=GJNQNBiGF6c:vg38EvY_k0A:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?i=GJNQNBiGF6c:vg38EvY_k0A:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/GJNQNBiGF6c" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,2bef4dc3-0ea9-4c55-b77f-846c54431fca.aspx</comments>
      <category>Coding;Community;Computing</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,2bef4dc3-0ea9-4c55-b77f-846c54431fca.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=5a5293b4-5f66-4d09-92b0-875777cdf0d8</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,5a5293b4-5f66-4d09-92b0-875777cdf0d8.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,5a5293b4-5f66-4d09-92b0-875777cdf0d8.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=5a5293b4-5f66-4d09-92b0-875777cdf0d8</wfw:commentRss>
      
      <title>for the REST of us</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,5a5293b4-5f66-4d09-92b0-875777cdf0d8.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/b_wOIZ1ZUSw/PermaLink,guid,5a5293b4-5f66-4d09-92b0-875777cdf0d8.aspx</link>
      <pubDate>Thu, 05 Mar 2009 01:13:20 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Probably the only POST about REST that I GET that PUTs everything in simple terms&#xD;
so that I don’t feel compelled to DELETE it from my blog reader.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://tomayko.com/writings/rest-to-my-wife"&gt;http://tomayko.com/writings/rest-to-my-wife&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=5a5293b4-5f66-4d09-92b0-875777cdf0d8"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=b_wOIZ1ZUSw:P87qmZd3KXI:yIl2AUoC8zA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?d=yIl2AUoC8zA" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=b_wOIZ1ZUSw:P87qmZd3KXI:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?i=b_wOIZ1ZUSw:P87qmZd3KXI:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=b_wOIZ1ZUSw:P87qmZd3KXI:F7zBnMyn0Lo"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?i=b_wOIZ1ZUSw:P87qmZd3KXI:F7zBnMyn0Lo" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=b_wOIZ1ZUSw:P87qmZd3KXI:G79ilh31hkQ"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?d=G79ilh31hkQ" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/Nervoustych?a=b_wOIZ1ZUSw:P87qmZd3KXI:D7DqB2pKExk"&gt;&lt;img src="http://feeds.feedburner.com/~ff/Nervoustych?i=b_wOIZ1ZUSw:P87qmZd3KXI:D7DqB2pKExk" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/b_wOIZ1ZUSw" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,5a5293b4-5f66-4d09-92b0-875777cdf0d8.aspx</comments>
      <category>Computing;Random thoughts</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,5a5293b4-5f66-4d09-92b0-875777cdf0d8.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=826827b3-3f22-47cf-a034-5c127578977c</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,826827b3-3f22-47cf-a034-5c127578977c.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,826827b3-3f22-47cf-a034-5c127578977c.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=826827b3-3f22-47cf-a034-5c127578977c</wfw:commentRss>
      
      <title>My &amp;ndash;isms</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,826827b3-3f22-47cf-a034-5c127578977c.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/13vV-OfGIEo/PermaLink,guid,826827b3-3f22-47cf-a034-5c127578977c.aspx</link>
      <pubDate>Tue, 10 Feb 2009 02:06:02 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;h3&gt; &#xD;
&lt;/h3&gt;&#xD;
        &lt;h3&gt;I AM&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
Dogmatic about &lt;a href="http://www.pragprog.com/"&gt;pragmatism&lt;/a&gt;.  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Cynical of &lt;a href="http://www.i-cynic.com/whatis.asp"&gt;cynicism&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Prone to &lt;a href="http://imgs.xkcd.com/comics/conspiracy_theories.png"&gt;scepticism&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Attracted to &lt;a href="http://en.wikipedia.org/wiki/Absurdism"&gt;absurdism&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Suspicious of &lt;a href="http://www.imdb.com/title/tt0094291/"&gt;capitalism&lt;/a&gt;. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
My feeble attempt at a blog meme. Go &lt;a href="http://www.morewords.com/ends-with/ism/"&gt;here&lt;/a&gt; and&#xD;
pick 5 of your –isms. Its poetry made easy :P&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you’ve read this and have a blog of your own - consider yourself tagged!&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=826827b3-3f22-47cf-a034-5c127578977c"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=hXUXHLUk"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=rcaYTjqF"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=rcaYTjqF" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=Jt6wz26S"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=Jt6wz26S" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=khI6BSKb"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=khI6BSKb" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/13vV-OfGIEo" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,826827b3-3f22-47cf-a034-5c127578977c.aspx</comments>
      <category>Community</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,826827b3-3f22-47cf-a034-5c127578977c.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=cfae6577-d301-42bb-a4bc-7952586c7249</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,cfae6577-d301-42bb-a4bc-7952586c7249.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,cfae6577-d301-42bb-a4bc-7952586c7249.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cfae6577-d301-42bb-a4bc-7952586c7249</wfw:commentRss>
      
      <title>Giving a damn about the broken windows</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,cfae6577-d301-42bb-a4bc-7952586c7249.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/3O6oQ-CWIKM/PermaLink,guid,cfae6577-d301-42bb-a4bc-7952586c7249.aspx</link>
      <pubDate>Mon, 09 Feb 2009 08:28:27 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Leon Bambrick has been writing some great posts lately, and two things have really&#xD;
struck a chord with me.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Firstly, in 6 ways to become a better programmer in 8 minutes &lt;a href="http://www.secretgeek.net/6min_program.asp"&gt;(or&#xD;
was it the other way around)&lt;/a&gt; he drives home the point that attempting to increase&#xD;
code coverage in your project by 1% is a Good Thing. Especially given the fact that&#xD;
its likely that your code coverage is 0% hmmm? The biggest gain in unit testing probably&#xD;
arises from that initial attempt to bring your code base under some semblance of control.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Secondly, &lt;a href="http://www.secretgeek.net/give_take.asp"&gt;in an earlier post&lt;/a&gt; he&#xD;
finishes up by espousing the importance of passion. &#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
You've got to give a shit about the code you write and the people who use it. If you&#xD;
don't care about it, you're never going to enjoy it properly.&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
“Give a shit” about your code – otherwise coming to work is pointless. Go home and&#xD;
find out how to care about the project before coming back.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I give a damn about unit testing, because I give a damn about my code. It saddens&#xD;
me to think that the majority of code bases out there have a code coverage of 0%. &lt;strong&gt;More&#xD;
so, it saddens me that there are people who don’t even try to understand unit testing&#xD;
and how it can work for you, rather than against you.&lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
IMNSHO if you haven’t wrapped your head around unit testing by now, then &lt;a href="http://www.codinghorror.com/blog/archives/000640.html"&gt;you’re&#xD;
are not doing your job properly&lt;/a&gt;. &lt;strong&gt;You can’t possibly remember all the permutations&#xD;
of a complex problem, nor can you verify them all. So when you figure one out, you&#xD;
should verify it, code it and check it in. &lt;/strong&gt;It is also a shame that &lt;a href="http://www.joelonsoftware.com/items/2009/01/31.html"&gt;prominent&#xD;
members&lt;/a&gt; of the coding community can’t get their story straight. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
There are still plenty of people out there who just don’t seem to get it. Even with&#xD;
a test suite in place, it may become neglected. Progressively it too, falls into the&#xD;
category of legacy code. So how do we improve the efficacy of our test suite if we&#xD;
have one? I find the following to be advantageous, in no particular order.&#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
Have tests run as part of the build, and fail the build if the tests do not pass. &#xD;
&lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;p&gt;&#xD;
This should be a no brainer. There are so many benefits to having tests and automating&#xD;
them that I cannot begin to summarize them here.  &lt;a href="http://martinfowler.com/articles/continuousIntegration.html#MakeYourBuildSelf-testing"&gt;Just&lt;/a&gt;&lt;a href="http://www.codeproject.com/KB/architecture/onunittesting.aspx"&gt;do&lt;/a&gt;&lt;a href="http://www.codeproject.com/KB/architecture/onunittesting.aspx"&gt;it.&lt;/a&gt; &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Of course this is no good, if other team members aren’t compelled to fix the build.&#xD;
Which lead Leon to the conclusion that some form of build monitor that everyone can&#xD;
see to be a further improvement.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If you don’t have a &lt;a href="http://www.thinkgeek.com/geektoys/warfare/8bc4/?cpg=ab"&gt;laser&#xD;
guided USB missile launcher&lt;/a&gt; pointed at the person who broke the build, then your&#xD;
still fighting an uphill battle to &lt;strong&gt;make people care&lt;/strong&gt;. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
So, failing office warfare, you can try lowering the cognitive effort of understanding&#xD;
unit testing in the first place. The testing newbie usually finds the combination&#xD;
of mock objects, test fakes, test runners and testing frameworks all a bit too much&#xD;
to bare. Besides, test code should be as neat as production code, after all, it defines&#xD;
it. I like to impose the following rules on myself.&#xD;
&lt;/p&gt;&#xD;
        &lt;ol&gt;&#xD;
          &lt;li&gt;&#xD;
Use plain English when naming test classes, methods and variables &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Avoid obnoxious acronyms &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Clearly name test fakes and mocks &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Differentiate between the ‘expected’ and the ‘actual’ value &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Minimize the asserts in your tests &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Use language features to full effect in order to improve readability &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Refactor your tests as ruthlessly as your code &#xD;
&lt;/li&gt;&#xD;
        &lt;/ol&gt;&#xD;
        &lt;h3&gt; &#xD;
&lt;/h3&gt;&#xD;
        &lt;h3&gt;Use plain English when naming&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
Testing should be about specification, and should read as such. Having a class called&#xD;
FooFixture makes sense to some, but everybody understands WhenEmailingACustomer.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Similarly, a test named ShouldThrowWhenNullParm(), is too obscure. Should throw what&#xD;
exception? Which ‘parm’… schnitzel or olive parm? Avoid such cryptograms and defer&#xD;
to a more English style. ShouldThrowANullReferenceExceptionWhenProvidedANullFooParameter&#xD;
might be a little long, but at least it doesn’t need to be deciphered to understand&#xD;
it. Hell, we are all coding on &lt;a href="http://www.codinghorror.com/blog/archives/000012.html"&gt;24”&#xD;
widescreens and better&lt;/a&gt; right? :P&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Some people say that the code should document the test and the method name is a little&#xD;
superfluous. Sorry, but I say: &lt;strong&gt;nuts&lt;/strong&gt;. I should be able to skim a list&#xD;
of test methods and fixtures and determine how a program works, as well as what it&#xD;
does, without reading the code, and so should my team members.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I also advocate the use of underscores, to further improve readability, however I&#xD;
realise this to be a personal preference. For example: &#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;[TestClass]  &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; Concerning_the_person_controller &#xD;
&lt;br&gt;&#xD;
{  &#xD;
&lt;br&gt;&#xD;
    [TestMethod]  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; It_should_retrieve_the_tallest_person_from_the_person_model() &#xD;
&lt;br&gt;&#xD;
    {  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: green"&gt;//TODO: Write&#xD;
a READABLE test &lt;/span&gt;&lt;br&gt;&#xD;
    }  &#xD;
&lt;br&gt;&#xD;
}&#xD;
&lt;/div&gt;&#xD;
        &lt;h3&gt;Avoid acronyms&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
I’m a fan of marking the “system under test” and I used to be a user of the acronym,&#xD;
SUT to do so. However, I’ve come full circle and realized that having a CreateSUT&#xD;
method is taking it all too far. You will only serve to confuse the masses who aren’t&#xD;
up to speed on the latest BDD TLA.&#xD;
&lt;/p&gt;&#xD;
        &lt;h3&gt;Clearly name fakes and mocks&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;em&gt;You&lt;/em&gt; might remember that you faked out the FooService in the TestInitialize&#xD;
(Setup) method, but by the 5th test, I can guarantee you that the testing newbie will&#xD;
have forgotten. Keep reminding yourself and others by sticking ‘fake’ in the name&#xD;
of the variable somewhere. Please do name the actual fake class as such also. If you&#xD;
are going to hide behind an interface, call it out explicitly. Remember, you are coding&#xD;
a specification.&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;[TestClass]  &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; Concerning_the_person_controller &#xD;
&lt;br&gt;&#xD;
{  &#xD;
&lt;br&gt;&#xD;
    [TestMethod]  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; It_should_retrieve_the_tallest_person_from_the_person_model() &#xD;
&lt;br&gt;&#xD;
    {  &#xD;
&lt;br&gt;&#xD;
        IPersonModel fakePersonModel = &lt;span style="color: blue"&gt;new&lt;/span&gt; FakePersonModel();  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: green"&gt;//... &lt;/span&gt;&lt;br&gt;&#xD;
    }  &#xD;
&lt;br&gt;&#xD;
}&#xD;
&lt;/div&gt;&#xD;
        &lt;h3&gt;Differentiate the expected and actual value&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
Similarly, if you are going to cache an expected or actual value, make it clear as&#xD;
to what its purpose is. People who haven’t memorized every overload of Assert.AreEqual&#xD;
will quickly forget where what goes where. Keep reminding them with verbose naming.&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;    [TestClass]  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; Concerning_the_person_controller &#xD;
&lt;br&gt;&#xD;
    {  &#xD;
&lt;br&gt;&#xD;
        [testmethod]  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; It_should_retrieve_the_tallest_person_from_the_person_model() &#xD;
&lt;br&gt;&#xD;
        {  &#xD;
&lt;br&gt;&#xD;
            IPersonModel fakePersonModel&#xD;
= &lt;span style="color: blue"&gt;new&lt;/span&gt; fakePersonModel(); &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
            var expectedPerson&#xD;
= &lt;span style="color: blue"&gt;new&lt;/span&gt; Person();  &#xD;
&lt;br&gt;&#xD;
            expectedPerson.FirstName&#xD;
= &lt;span style="color: maroon"&gt;"Joe"&lt;/span&gt;;  &#xD;
&lt;br&gt;&#xD;
            expectedPerson.LastName&#xD;
= &lt;span style="color: maroon"&gt;"Hill"&lt;/span&gt;;  &#xD;
&lt;br&gt;&#xD;
            expectedperson.height&#xD;
= &lt;span style="color: maroon"&gt;203&lt;/span&gt;&lt;span style="color: maroon"&gt;.00&lt;/span&gt;; &#xD;
&lt;br&gt;&#xD;
              &#xD;
&lt;br&gt;&#xD;
            fakePersonModel.Persons.Add(expectedPerson);  &#xD;
&lt;br&gt;&#xD;
            &lt;span style="color: green"&gt;//...&lt;/span&gt;&lt;/div&gt;&#xD;
        &lt;h3&gt;Minimize your asserts&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
I’m no ‘1 assert per test’ nazi; sometimes it makes sense to group asserts. however,&#xD;
aiming to keep them to a minimum will further help the readability. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Newbie's (and refactoring tools) don’t always realise that Asserts are really potential&#xD;
method exit points so keeping them close to the bottom of the test helps a lot too.&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;    [TestClass]  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; Concerning_the_person_controller &#xD;
&lt;br&gt;&#xD;
    {  &#xD;
&lt;br&gt;&#xD;
        [TestMethod]  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; it_should_retrieve_the_tallest_person_from_the_person_model() &#xD;
&lt;br&gt;&#xD;
        {  &#xD;
&lt;br&gt;&#xD;
            IPersonModel fakePersonModel&#xD;
= &lt;span style="color: blue"&gt;new&lt;/span&gt; FakePersonModel(); &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
            var expectedPerson&#xD;
= &lt;span style="color: blue"&gt;new&lt;/span&gt; Person();  &#xD;
&lt;br&gt;&#xD;
            expectedPerson.Firstname&#xD;
= &lt;span style="color: maroon"&gt;"Joe"&lt;/span&gt;;  &#xD;
&lt;br&gt;&#xD;
            expectedPerson.Lastname&#xD;
= &lt;span style="color: maroon"&gt;"Hill"&lt;/span&gt;;  &#xD;
&lt;br&gt;&#xD;
            expectedPerson.Height&#xD;
= &lt;span style="color: maroon"&gt;203&lt;/span&gt;&lt;span style="color: maroon"&gt;.00&lt;/span&gt;; &#xD;
&lt;br&gt;&#xD;
              &#xD;
&lt;br&gt;&#xD;
            fakePersonModel.Persons.Add(expectedpPrson);  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
            var personController&#xD;
= &lt;span style="color: blue"&gt;new&lt;/span&gt; PersonController(fakePersonModel); &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
            Assert.AreSame(expectedPerson,&#xD;
personController.RetrieveTallestPerson());  &#xD;
&lt;br&gt;&#xD;
        }  &#xD;
&lt;br&gt;&#xD;
    }&#xD;
&lt;/div&gt;&#xD;
        &lt;h3&gt;Use language features to improve readability&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
Extension methods are a boon to readable tests. Practice a little language oriented&#xD;
programming and write a more readable testing interface for your colleagues to grok&#xD;
quicker. Or use a test framework that has done some of the work for you. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
For instance I have been putting together a library for internal use that has extension&#xD;
methods for common assertions to make them more English Readable®. Every time I come&#xD;
up with a new sentence, the test drives out development of my internal library, which&#xD;
has a nice side benefit of being useful in other projects. &#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;[TestClass]  &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; Concerning_the_person_controller &#xD;
&lt;br&gt;&#xD;
{  &#xD;
&lt;br&gt;&#xD;
  [TestMethod]  &#xD;
&lt;br&gt;&#xD;
  &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; It_should_retrieve_the_tallest_person_from_the_person_model() &#xD;
&lt;br&gt;&#xD;
  {  &#xD;
&lt;br&gt;&#xD;
    IPersonModel fakePersonModel = &lt;span style="color: blue"&gt;new&lt;/span&gt; FakePersonModel(); &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    var expectedPerson = &lt;span style="color: blue"&gt;new&lt;/span&gt; Person&#xD;
{ &#xD;
&lt;br&gt;&#xD;
      FirstName = &lt;span style="color: maroon"&gt;"Joe"&lt;/span&gt;, &#xD;
&lt;br&gt;&#xD;
      LastName = &lt;span style="color: maroon"&gt;"Hill"&lt;/span&gt;, &#xD;
&lt;br&gt;&#xD;
      Height = &lt;span style="color: maroon"&gt;203&lt;/span&gt;&lt;span style="color: maroon"&gt;.00&lt;/span&gt;&lt;br&gt;&#xD;
    }; &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    fakePersonModel.Persons.Add(expectedPerson);  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    var personController = &lt;span style="color: blue"&gt;new&lt;/span&gt; PersonController(fakePersonModel); &#xD;
&lt;br&gt;&#xD;
    var actualPerson = personController.RetrieveTallestPerson();  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    actualPerson.should().be_the_same_as_the(expectedPerson);  &#xD;
&lt;br&gt;&#xD;
  }  &#xD;
&lt;br&gt;&#xD;
} &#xD;
&lt;br&gt;&lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
You might even consider going one step further and providing a project specific DSL&#xD;
to really capture your intent. However the further you go down this route, the further&#xD;
you might obscure things, so be cautious.&#xD;
&lt;/p&gt;&#xD;
        &lt;h3&gt;Refactor your tests as ruthlessly as your code&#xD;
&lt;/h3&gt;&#xD;
        &lt;p&gt;&#xD;
Don’t repeat yourself, and refactor your tests when you see opportunity. By all means,&#xD;
take full advantage of the testing framework - as long as it works to your advantage.&#xD;
[TestInitialize/TestCleanup] or [SetUp/TearDown]routines will get missed, but explicit&#xD;
calls to a function will not. Furthermore, allowing for reading ‘top-down’ will win&#xD;
you extra brownie points.&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;[TestClass]  &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; Concerning_the_person_controller &#xD;
&lt;br&gt;&#xD;
{  &#xD;
&lt;br&gt;&#xD;
  &lt;span style="color: blue"&gt;private&lt;/span&gt; Person TallestPerson;  &#xD;
&lt;br&gt;&#xD;
  &lt;span style="color: blue"&gt;private&lt;/span&gt; Person FirstPerson;  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
  &lt;span style="color: blue"&gt;private&lt;/span&gt; PersonController CreatePersonControllerWithDependencies() &#xD;
&lt;br&gt;&#xD;
  {  &#xD;
&lt;br&gt;&#xD;
    IPersonModel fakePersonModel = &lt;span style="color: blue"&gt;new&lt;/span&gt; FakePersonModel(); &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    var person = &lt;span style="color: blue"&gt;new&lt;/span&gt; Person { &#xD;
&lt;br&gt;&#xD;
      FirstName = &lt;span style="color: maroon"&gt;"Joe"&lt;/span&gt;,  &#xD;
&lt;br&gt;&#xD;
      LastName = &lt;span style="color: maroon"&gt;"Hill"&lt;/span&gt;, &#xD;
&lt;br&gt;&#xD;
      Height = &lt;span style="color: maroon"&gt;203&lt;/span&gt;&lt;span style="color: maroon"&gt;.00&lt;/span&gt;&lt;br&gt;&#xD;
    }; &#xD;
&lt;br&gt;&#xD;
    TallestPerson = person;  &#xD;
&lt;br&gt;&#xD;
    fakePersonModel.Persons.Add(person);  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    person = &lt;span style="color: blue"&gt;new&lt;/span&gt; Person { &#xD;
&lt;br&gt;&#xD;
      FirstName = &lt;span style="color: maroon"&gt;"John"&lt;/span&gt;, &#xD;
&lt;br&gt;&#xD;
      LastName = &lt;span style="color: maroon"&gt;"Alfred"&lt;/span&gt;, &#xD;
&lt;br&gt;&#xD;
      Height = &lt;span style="color: maroon"&gt;200&lt;/span&gt;&lt;span style="color: maroon"&gt;.00&lt;/span&gt;&lt;br&gt;&#xD;
    }; &#xD;
&lt;br&gt;&#xD;
    FirstPerson = person;  &#xD;
&lt;br&gt;&#xD;
    fakePersonModel.Persons.Add(person);  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;new&lt;/span&gt; PersonController(fakePersonModel); &#xD;
&lt;br&gt;&#xD;
  }  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
  [TestMethod]  &#xD;
&lt;br&gt;&#xD;
  &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; It_should_retrieve_the_tallest_person_from_the_person_model() &#xD;
&lt;br&gt;&#xD;
  {  &#xD;
&lt;br&gt;&#xD;
    var personController = CreatePersonControllerWithDependencies();  &#xD;
&lt;br&gt;&#xD;
    var actualPerson = personController.RetrieveTallestPerson();  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    actualPerson.should().be_the_same_as_the(TallestPerson);  &#xD;
&lt;br&gt;&#xD;
  }  &#xD;
&lt;br&gt;&#xD;
          &#xD;
&lt;br&gt;&#xD;
  [TestMethod]  &#xD;
&lt;br&gt;&#xD;
  &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;void&lt;/span&gt; It_should_retrieve_all_people_in_alphabetical_order_of_last_name() &#xD;
&lt;br&gt;&#xD;
  {  &#xD;
&lt;br&gt;&#xD;
    var personController = CreatePersonControllerWithDependencies();  &#xD;
&lt;br&gt;&#xD;
    var allPeople = personController.RetrieveAllPeople();  &#xD;
&lt;br&gt;&lt;br&gt;&#xD;
    allPeople.Count.should().equal(&lt;span style="color: maroon"&gt;2&lt;/span&gt;);  &#xD;
&lt;br&gt;&#xD;
    allPeople[&lt;span style="color: maroon"&gt;0&lt;/span&gt;].should().be_the_same_as_the(FirstPerson); &#xD;
&lt;br&gt;&#xD;
  }  &#xD;
&lt;br&gt;&#xD;
}&#xD;
&lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
If you haven’t figured it out already, then what all these suggestions amount to,&#xD;
is this: Treat your tests as well as your production code if you want people to bother&#xD;
keeping them up to date. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
It is simply the &lt;a href="http://www.artima.com/intv/fixit.html"&gt;broken windows idea&#xD;
from pragmatic programmer&lt;/a&gt;.  If you haven’t got some sort of mechanism to&#xD;
hold people accountable for build breakages, then simply getting in there and caring&#xD;
enough to fix the broken windows might be all you have left. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Broken windows? Don’t live with them. Give a damn.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
UPDATE: Apologies to those who have read this in Google Reader, I have updated the&#xD;
code snippets to be more readable. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=cfae6577-d301-42bb-a4bc-7952586c7249"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=sCY8EkIQ"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=f5VmVzpW"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=f5VmVzpW" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=sMT25slr"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=sMT25slr" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=KwVw224Q"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=KwVw224Q" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/3O6oQ-CWIKM" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,cfae6577-d301-42bb-a4bc-7952586c7249.aspx</comments>
      <category>Coding;Coding/.NET;Coding/.NET/C#;Coding/Unit Testing</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,cfae6577-d301-42bb-a4bc-7952586c7249.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=b2b27296-2333-4dec-9456-db58dafe4b5d</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,b2b27296-2333-4dec-9456-db58dafe4b5d.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,b2b27296-2333-4dec-9456-db58dafe4b5d.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=b2b27296-2333-4dec-9456-db58dafe4b5d</wfw:commentRss>
      
      <title>Visual Studio Fonts &amp;amp; Colours</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,b2b27296-2333-4dec-9456-db58dafe4b5d.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/ZadCi8zjbGI/PermaLink,guid,b2b27296-2333-4dec-9456-db58dafe4b5d.aspx</link>
      <pubDate>Sun, 08 Feb 2009 07:53:00 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
I’m a customizing junky at heart. I’ve always liked to tinker with things. It’s not&#xD;
that I don’t believe in the saying, “if it ain’t broke, don’t fix it.”, its just that&#xD;
my definition of “broke” is broader than others. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Besides, if by tinkering with something breaks the object, then the object was probably&#xD;
broken anyhow. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Some people like their IDE to be as pristinely untouched as a neatly folded pair of&#xD;
freshly starched underpants, and I am not one of them. Much like my own pants, my&#xD;
IDE(s) have an earthy, lived in quality about them.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/pristine-jocks_4.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; margin-left: 0px; border-top: 0px; margin-right: 0px; border-right: 0px" title="Cant stand courier new? Neither can I." border="0" alt="Cant stand courier new? Neither can I." align="left" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/pristine-jocks_thumb_1.png" width="240" height="89"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I’m also a mind changer. One of those annoying people who decide they want their coffee&#xD;
with 2 sugars today, and tomorrow it will be black and none. The part of my brain&#xD;
that decides what I like and dislike seems to be attached to a seriously good random&#xD;
number generator.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
As such, I have a backlog of Visual Studio 2008 themes that I thought I would share.&#xD;
I know its a bit of a bore* to do, so please forgive me. I also don’t claim them to&#xD;
be necessarily complete for the types of coding that you do – especially web development.&#xD;
Use with caution if you choose to do so.&#xD;
&lt;/p&gt;&#xD;
        &lt;h1&gt;&#xD;
        &lt;/h1&gt;&#xD;
        &lt;h1&gt;&#xD;
        &lt;/h1&gt;&#xD;
        &lt;h2&gt;Anemic&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/anemic-csharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="C#" border="0" alt="C#" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/anemic-csharp-example_thumb.png" width="118" height="126"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/anemic-fsharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="F#" border="0" alt="F#" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/anemic-fsharp-example_thumb.png" width="127" height="126"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/anemic-vb-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="VB" border="0" alt="VB" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/anemic-vb-example_thumb.png" width="134" height="124"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
This was inspired by &lt;a href="http://damieng.com/blog/2007/10/14/colour-schemes-for-visual-studio"&gt;Damien&#xD;
Guard’s Humane theme&lt;/a&gt;. I’ve softened it further, hence the name. I love his font&#xD;
face Envy Code R and I used this for almost 6 months which was a record for me. A&#xD;
very low contrast theme.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://nervoustych.com/assets/anemic.zip"&gt;download&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;h2&gt;Neon&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/neon-csharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="C#" border="0" alt="C#" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/neon-csharp-example_thumb.png" width="142" height="122"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/neon-fsharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="F#" border="0" alt="F#" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/neon-fsharp-example_thumb.png" width="120" height="120"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/neon-vb-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="VB" border="0" alt="VB" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/neon-vb-example_thumb.png" width="144" height="119"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
After using Anemic for a long time, I decided to go in the opposite direction. I have&#xD;
always liked coding on old UNIX terminals, so I decided to capture the look and feel.&#xD;
It uses the &lt;a href="http://www.webdevkungfu.com/textmate-envy-aka-monaco-font-for-windows/"&gt;Monaco&#xD;
font face&lt;/a&gt; which is still quite a nice font for developing.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://nervoustych.com/assets/neon.zip"&gt;download&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;h2&gt;Fantanic&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/fantanic-csharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="fantanic-csharp-example" border="0" alt="fantanic-csharp-example" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/fantanic-csharp-example_thumb.png" width="155" height="128"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/fantanic-fsharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="fantanic-fsharp-example" border="0" alt="fantanic-fsharp-example" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/fantanic-fsharp-example_thumb.png" width="150" height="129"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/fantanic-vb-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="fantanic-vb-example" border="0" alt="fantanic-vb-example" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/fantanic-vb-example_thumb.png" width="137" height="129"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Much like a pendulum, I swung back towards a pale background, however the high contrast&#xD;
was kept for fantanic. I have decided I prefer earthy colors, using blues and purples&#xD;
to highlight, rather than using it for keywords. I tried the &lt;a href="http://damieng.com/blog/2007/11/14/droid-sans-mono-great-coding-font"&gt;Droid&#xD;
Sans Mono&lt;/a&gt; typeface and went for larger fonts (I think I needed my eyes checked)&#xD;
and I’ve stuck with it since. Works great on the projectors and large screens. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://nervoustych.com/assets/fantanic.zip"&gt;download&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;h2&gt;Hart&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/hart-csharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="C#" border="0" alt="C#" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/hart-csharp-example_thumb.png" width="130" height="129"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/hart-fsharp-example_2.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="F#" border="0" alt="F#" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/hart-fsharp-example_thumb.png" width="152" height="129"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/hart-vb-example.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; display: inline; border-top: 0px; border-right: 0px" title="VB" border="0" alt="VB" src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/VisualStudioFontsColours_BC27/hart-vb-example_thumb.png" width="167" height="126"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
My current theme leans toward a darker, lower contrast theme in colours I don’t see&#xD;
used often, giving it a distinctive look. Having my eyes checked and rectified, I&#xD;
reduced the font size. I’ve been coding at night lately and its quite easy on bleary&#xD;
eyes.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://nervoustych.com/assets/hart.zip"&gt;download&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Feel free to download and adjust to your whim. If you like or dislike these themes,&#xD;
I encourage you to leave a review on &lt;a href="http://idehotornot.ning.com/index.php?user=2kt5bz5ggr7ak"&gt;IDE&#xD;
Hot or Not.&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
* Personally, since X is the new Y; I think that labelling something as “that is so&#xD;
[1|2][0-9]{3}” is the new (annoying|uncool|stupid).&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=b2b27296-2333-4dec-9456-db58dafe4b5d"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=l49urAMZ"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=xIErxxkB"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=xIErxxkB" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=qTJnHn2o"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=qTJnHn2o" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=C1AkYzOz"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=C1AkYzOz" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/ZadCi8zjbGI" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,b2b27296-2333-4dec-9456-db58dafe4b5d.aspx</comments>
      <category>Coding;Coding/.NET;Coding/Visual Studio</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,b2b27296-2333-4dec-9456-db58dafe4b5d.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=cb9eace6-83e5-452e-b847-a46ca09dda0b</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,cb9eace6-83e5-452e-b847-a46ca09dda0b.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,cb9eace6-83e5-452e-b847-a46ca09dda0b.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=cb9eace6-83e5-452e-b847-a46ca09dda0b</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>Software changes</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,cb9eace6-83e5-452e-b847-a46ca09dda0b.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/kAD2MFbN0Rs/PermaLink,guid,cb9eace6-83e5-452e-b847-a46ca09dda0b.aspx</link>
      <pubDate>Thu, 05 Feb 2009 07:48:51 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
How you react and prepare for change is very important; it can make or break a project.&#xD;
Allow for changes that wont come and you’ve written too much code. Forget to allow&#xD;
for other types of change and your application becomes either brittle or unwieldy&#xD;
in the face of change.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Software change &lt;a href="http://www.comp.lancs.ac.uk/computing/resources/IanS/SE7/ElectronicSupplements/SWChange.pdf"&gt;has&#xD;
been divided into 3 flavours in the past:&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;h2&gt;Re-architecture&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
Re-architecture is a more ruthless variety of change that involves changing the very&#xD;
foundations of the software to cope with new requirements. A classic move would be&#xD;
from a single tier application to an n-tier design in order to allow for multiple&#xD;
users.&#xD;
&lt;/p&gt;&#xD;
        &lt;h2&gt;Re-engineering&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
Re-engineering is essentially refactoring; the process of re-writing software to make&#xD;
it easier to understand, without adding new functionality. Its the type of change&#xD;
developers love, but project managers hate, and architects put up with. Simplification,&#xD;
removal of duplication, consistency etc. All the good stuff. &#xD;
&lt;/p&gt;&#xD;
        &lt;h2&gt;Software Maintenance&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
Maintenance is the act of reacting to a change in software requirements, however the&#xD;
fundamental software structure is not changed. This is the change we tend to deal&#xD;
with the most as developers, requirements are forever changing from the end user,&#xD;
to the very platforms we work on. I’m mainly picking on this kind of change, however&#xD;
I’m going to split hairs even further.&#xD;
&lt;/p&gt;&#xD;
        &lt;h2&gt;2 Kinds of Requirements Change&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
There are possibly more, but I’m thinking of two types in particular:&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
Changes that are unilateral&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Changes that… aren’t&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
What I mean is this. &lt;strong&gt;If you cannot avoid changing something in all layers&#xD;
of your software in order to accommodate a new or updated requirement, then you have&#xD;
a unilateral change.&lt;/strong&gt; An example would be in a typical line of business application.&#xD;
The product owner would like you to add support for a second telephone number. The&#xD;
software currently supports one. No matter how many layers you have, you will likely&#xD;
need to change all of them to support this change. &lt;strong&gt;Having a PersonDTOFactoryServiceFactory&#xD;
class might get in the way of a good time here.&lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In this same application, the user now informs you that the business rules for the&#xD;
concept of “Deferred” has changed. This is a localizable change – handled properly.&#xD;
Good apps will have this sort of logic tucked away in its own layer, and will not&#xD;
need to be replicated in either the UI or the DB. &lt;strong&gt;Badly written, tightly coupled&#xD;
apps will have you writing code in UI event handlers and SQL change scripts.&lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Localizable changes happen daily and they cost developers time by the bucket load.&#xD;
I expect them to occur and I lovingly call reacting to these changes as ‘my job’.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Unilateral changes on the other hand, tend to come en masse with deadlines attached. &lt;strong&gt;They&#xD;
can be mistakenly given too much weight in the design process as a result.&lt;/strong&gt; It’s&#xD;
these changes that can cause a developer to contract a phobia of layers. Personally,&#xD;
I expect these changes to occur almost as often as the former, however I like to call&#xD;
these changes ‘version next’ where at all possible.&#xD;
&lt;/p&gt;&#xD;
        &lt;h2&gt;Defence&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;The real issue is defending oneself from change and how much defence to put&#xD;
up, and how much that defence costs you.&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The method of protecting yourself from unilateral change, is to minimize the amount&#xD;
of layers you have to deal with when unilateral changes occur. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Defending yourself against localizable changes, is often done by increasing the number&#xD;
of layer in your application, mainly to improve the chances of changes only effecting&#xD;
one layer at a time. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
“Layer” is a difficult term, and I use it in the sense that they to one another via&#xD;
an interface. They do not depend on one another in order to perform their function.&#xD;
Think ‘abstraction layer’. &#xD;
&lt;/p&gt;&#xD;
        &lt;h2&gt;Conflict&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
The tension between these two types of change could be seen as a manifestation of &lt;a href="http://en.wikipedia.org/wiki/Conway's_Law"&gt;Conway’s&#xD;
Law&lt;/a&gt;. I also believe that this tension is why n-tier applications tend towards&#xD;
a &lt;a href="http://en.wikipedia.org/wiki/Multitier_architecture"&gt;layer count of 3 and&#xD;
above&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Adding layers can be the simplest way to turn what appears to be a horrible sweeping&#xD;
change. For instance you can use the &lt;a href="http://en.wikipedia.org/wiki/Multitier_architecture#Comparison_with_the_MVC_architecture"&gt;MVC&#xD;
pattern&lt;/a&gt; to separate the UI from the DAL. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The danger now is that you now have more work to do when a change comes along that&#xD;
will effect the endpoints of your application. If the user demands that second address,&#xD;
then the PersonView, the PersonController, the PersonModel, the PersonService, the&#xD;
AddressRepository, the AddressAdapter and the Address and Person Table will need to&#xD;
be changed. Oh I wish we had only 2 layers again.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
However, the moment that the Address needs to be formatted differently, depending&#xD;
on which view the user is using, you will thank yourself for having that PersonController&#xD;
there.&#xD;
&lt;/p&gt;&#xD;
        &lt;h2&gt;Conclusion&#xD;
&lt;/h2&gt;&#xD;
        &lt;p&gt;&#xD;
It is clear to me that, both types of maintenance changes occur and both need to be&#xD;
allowed for. Dismissing one type over the other is a mistake. Favouring less layers&#xD;
to account for the 50 columns you know the user is going to add is as foolish as over&#xD;
engineering a solution to protect oneself from imaginary gremlins. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Another point is that there are already so many layers in an application, and that&#xD;
can be seen from two perspectives: that one more layer wont hurt, or that one more&#xD;
will be the straw that breaks the camels back. Its up to you.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
However, a pragmatist will employ rigorous application of &lt;a href="http://en.wikipedia.org/wiki/YAGNI"&gt;YAGNI&lt;/a&gt;.&#xD;
Don’t create more layers until you absolutely need them, but do not shy away from&#xD;
creating layers when change is on the horizon. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.codinghorror.com/blog/archives/000705.html"&gt;Leaving design decisions&#xD;
as late as possible&lt;/a&gt; will ensure you learn to Say No to frivolous layers of abstraction. &lt;a href="http://en.wikipedia.org/wiki/Test-driven_development"&gt;TDD&lt;/a&gt; (When&#xD;
Used Correctly™), &lt;a href="http://en.wikipedia.org/wiki/Single_responsibility_principle"&gt;SRP&lt;/a&gt; and &lt;a href="http://en.wikipedia.org/wiki/Inversion_of_Control"&gt;IOC&lt;/a&gt;,&#xD;
will guide the developer to produce code that will cope better with change without&#xD;
over engineering it. Oh, and you’ll be able to join the &lt;a href="http://en.wikipedia.org/wiki/Three-letter_abbreviation"&gt;TLA&lt;/a&gt; club&#xD;
too.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=cb9eace6-83e5-452e-b847-a46ca09dda0b"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=SOvHh1dr"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=mwV2iLQw"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=mwV2iLQw" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=Zo82zXKw"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=Zo82zXKw" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=RR0bJG3d"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=RR0bJG3d" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/kAD2MFbN0Rs" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,cb9eace6-83e5-452e-b847-a46ca09dda0b.aspx</comments>
      <category>Coding;Coding/Design Patterns;Random thoughts</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,cb9eace6-83e5-452e-b847-a46ca09dda0b.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b</wfw:commentRss>
      
      <title>Languages are tools, use them.</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/vT4Ykv7djXE/PermaLink,guid,ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b.aspx</link>
      <pubDate>Fri, 17 Oct 2008 04:38:15 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
While I think its great that I can use C# to express functional concepts, I also think&#xD;
that for anything more than the odd lambda expression, that I'm using the wrong tool&#xD;
for the job.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
If large portions of your code begin with &amp;lt;Expression&amp;lt;Func&amp;lt;T, ... then &#xD;
step back and have a look at what you are trying to achieve. Sure, the usage may look&#xD;
fine, the fact remains that you're trying to express concepts at a level of abstraction&#xD;
that C style languages aren't equipped to cope with. Personally I think the well rounded&#xD;
coder would feel more comfortable writing an F# library.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Why bang your head against C# to write DSL's when Boo will go out of its way to make&#xD;
it easy for you?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Found yourself falling in love with AOP techniques and have consumed 3rd party libraries&#xD;
to get it done? Did you provide an interface layer to decouple that dependency? Why&#xD;
aren't we just naturally breaking out into IronRuby here?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The only reason I use C# 3 to write unit tests these days is there isn't really a&#xD;
viable testing language created yet.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
A few years ago and beyond we had an excuse. Each language usually had its chosen&#xD;
platform and it didn't play well with others. Using Erlang made sense for telecommunication&#xD;
work, but it would be considered counter productive to write a windows GUI in that&#xD;
language. Similarly, you simply wouldn't bother using VB to write code for massively&#xD;
multithreaded environments.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Today, we have no excuse. The fact is that the Common Language Runtime provides us&#xD;
a mechanism to use the right language for the task at hand, and not only that, compile&#xD;
in a cross language solution, such that the net result is completely seamless to the&#xD;
untrained eye. The 'core strengths' that the average business application developer&#xD;
is available for &lt;a href="http://en.wikipedia.org/wiki/List_of_CLI_Languages"&gt;any&#xD;
CLI language&lt;/a&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Today, we are only restricted by those who refuse to learn new languages, when in&#xD;
fact, learning has never been simpler. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=E1SDZ4OO"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=sjBlfWaM"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=sjBlfWaM" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=WbbOhU3f"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=WbbOhU3f" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=WA8wBYrz"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=WA8wBYrz" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/vT4Ykv7djXE" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b.aspx</comments>
      <category>Coding;Coding/.NET</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,ab0fa2bd-62eb-4f3d-ae1b-e004a0f0528b.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=05e20a7f-f726-4ea4-bc12-3d69fd860cf4</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,05e20a7f-f726-4ea4-bc12-3d69fd860cf4.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,05e20a7f-f726-4ea4-bc12-3d69fd860cf4.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=05e20a7f-f726-4ea4-bc12-3d69fd860cf4</wfw:commentRss>
      
      <title>Strongly Typed Data Binding in F#</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,05e20a7f-f726-4ea4-bc12-3d69fd860cf4.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/EB0PKRZmw00/PermaLink,guid,05e20a7f-f726-4ea4-bc12-3d69fd860cf4.aspx</link>
      <pubDate>Thu, 16 Oct 2008 01:31:06 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Jason recently produced &lt;a href="http://www.codeassassin.com/blog/PermaLink,guid,41a7b075-4ae8-4742-a3b1-0df55577fb00.aspx"&gt;this&#xD;
post&lt;/a&gt; where he demonstrates some lambda expression tree parsing and extension methods&#xD;
in C# 3.0 to do windows forms data binding &lt;strong&gt;sans strings:&lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;nameTextBox.Bind(t =&amp;gt; t.Text, aBindingSource,&#xD;
(Customer c) =&amp;gt; c.FirstName);&#xD;
&lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
I happen to like the idea so much that I thought about how this might look in F#.&#xD;
There are some juicy language features in F# sharp that lap this stuff up. Take Jason's&#xD;
C# implementation:&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;&#xD;
          &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; ControlExtensions &#xD;
&lt;br&gt;&#xD;
{  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; Binding&#xD;
Bind&amp;lt;TControl, TDataSourceItem&amp;gt; &#xD;
&lt;br&gt;&#xD;
        (&lt;span style="color: blue"&gt;this&lt;/span&gt; TControl&#xD;
control,   &#xD;
&lt;br&gt;&#xD;
        Expression&amp;lt;Func&amp;lt;TControl, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;&amp;gt;&#xD;
controlProperty,  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;object&lt;/span&gt; dataSource,   &#xD;
&lt;br&gt;&#xD;
        Expression&amp;lt;Func&amp;lt;TDataSourceItem, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;&amp;gt;&#xD;
dataSourceProperty) where TControl: Control &#xD;
&lt;br&gt;&#xD;
    {  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;return&lt;/span&gt; control.DataBindings.Add(  &#xD;
&lt;br&gt;&#xD;
            PropertyName.For(controlProperty),   &#xD;
&lt;br&gt;&#xD;
            dataSource,   &#xD;
&lt;br&gt;&#xD;
            PropertyName.For(dataSourceProperty));  &#xD;
&lt;br&gt;&#xD;
    }  &#xD;
&lt;br&gt;&#xD;
}  &#xD;
&lt;br&gt;&lt;br&gt;&lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; &lt;span style="color: blue"&gt;class&lt;/span&gt; PropertyName &#xD;
&lt;br&gt;&#xD;
{  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;public&lt;/span&gt; &lt;span style="color: blue"&gt;static&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt; For&amp;lt;T&amp;gt;(Expression&amp;lt;Func&amp;lt;T, &lt;span style="color: blue"&gt;object&lt;/span&gt;&amp;gt;&amp;gt;&#xD;
property) &#xD;
&lt;br&gt;&#xD;
    {  &#xD;
&lt;br&gt;&#xD;
        var member = property.Body &lt;span style="color: blue"&gt;as&lt;/span&gt; MemberExpression;  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: blue"&gt;null&lt;/span&gt; ==&#xD;
member) &#xD;
&lt;br&gt;&#xD;
        {  &#xD;
&lt;br&gt;&#xD;
            var unary = property.Body &lt;span style="color: blue"&gt;as&lt;/span&gt; UnaryExpression;  &#xD;
&lt;br&gt;&#xD;
            &lt;span style="color: blue"&gt;if&lt;/span&gt; (&lt;span style="color: blue"&gt;null&lt;/span&gt; !=&#xD;
unary) member = unary.Operand &lt;span style="color: blue"&gt;as&lt;/span&gt; MemberExpression; &#xD;
&lt;br&gt;&#xD;
        }  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;return&lt;/span&gt; &lt;span style="color: blue"&gt;null&lt;/span&gt; !=&#xD;
member ? member.Member.Name : &lt;span style="color: blue"&gt;string&lt;/span&gt;.Empty;  &#xD;
&lt;br&gt;&#xD;
    }  &#xD;
&lt;br&gt;&#xD;
}&#xD;
&lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
While this gets the job done, the fact that &lt;strong&gt;every last type&lt;/strong&gt; needs&#xD;
explicit declaration gets in the way of some otherwise damn elegant thinking. The&#xD;
signature for the Bind extension is crazy long, and the phrase "angle bracket&#xD;
tax" comes to mind.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
What if our compiler would infer these types for us while preserving compile time&#xD;
type checking? I still want to provide some generic type constraints but beyond that,&#xD;
I don't care.  Using F# we can have these all of these things to give us readable&#xD;
solutions to difficult problems. Also note the extension method syntax:&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;&#xD;
          &lt;span style="color: blue"&gt;#light&lt;/span&gt;  &#xD;
&lt;br&gt;&lt;br&gt;&lt;span style="color: blue"&gt;open&lt;/span&gt; System&lt;span style="color: blue"&gt;.&lt;/span&gt;Windows&lt;span style="color: blue"&gt;.&lt;/span&gt;Forms &#xD;
&lt;br&gt;&#xD;
      &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;type&lt;/span&gt; Control &lt;span style="color: blue"&gt;with&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;member&lt;/span&gt; this&lt;span style="color: blue"&gt;.&lt;/span&gt;Bind &lt;span style="color: blue"&gt;(&lt;/span&gt;control_property &lt;span style="color: blue"&gt;:&lt;/span&gt; &lt;span style="color: blue"&gt;#&lt;/span&gt;Control&lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt;'b&lt;span style="color: blue"&gt;)&lt;/span&gt; datasource&#xD;
datasource_property =  &#xD;
&lt;br&gt;&#xD;
        this&lt;span style="color: blue"&gt;.&lt;/span&gt;DataBindings&lt;span style="color: blue"&gt;.&lt;/span&gt;Add&lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;br&gt;&#xD;
            property_name_for&#xD;
control_property,   &#xD;
&lt;br&gt;&#xD;
            datasource,   &#xD;
&lt;br&gt;&#xD;
            property_name_for&#xD;
datasource_property  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;|&lt;/span&gt;&amp;gt;&#xD;
ignore&#xD;
&lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
I've deliberately left the implementation to property_name_for till now because it&#xD;
uses some little known constructs. Quotations in F# allow the developer to inform&#xD;
the compiler that a particular piece of code is to be dealt with as an expression&#xD;
tree. To quote code we use the &amp;lt;@ &lt;strong&gt;expression&lt;/strong&gt; @&amp;gt; construct.&#xD;
Being a functional language (amongst other paradigms) F# also allows us to pass lambdas&#xD;
around as variables and parameters unevaluated without any ceremony, thus yielding&#xD;
a readable approach to finding the name of a property in a lambda expression body:&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;&#xD;
          &lt;span style="color: blue"&gt;#light&lt;/span&gt;  &#xD;
&lt;br&gt;&lt;br&gt;&lt;span style="color: blue"&gt;open&lt;/span&gt; Microsoft&lt;span style="color: blue"&gt;.&lt;/span&gt;FSharp&lt;span style="color: blue"&gt;.&lt;/span&gt;Quotations&lt;span style="color: blue"&gt;.&lt;/span&gt;Patterns &#xD;
&lt;br&gt;&#xD;
      &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;let&lt;/span&gt; property_name_for &lt;span style="color: blue"&gt;(&lt;/span&gt;p&lt;span style="color: blue"&gt;:&lt;/span&gt;'x&lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt;'y&lt;span style="color: blue"&gt;)&lt;/span&gt; =   &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;let&lt;/span&gt; &lt;span style="color: blue"&gt;rec&lt;/span&gt; parse_expression&#xD;
e = &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;match&lt;/span&gt; e &lt;span style="color: blue"&gt;with&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; Lambda&lt;span style="color: blue"&gt;(&lt;/span&gt;var,&#xD;
body&lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; parse_expression&#xD;
body  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; Let&lt;span style="color: blue"&gt;(&lt;/span&gt;var,&#xD;
lhs, rhs&lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; parse_expression&#xD;
rhs  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; PropGet&lt;span style="color: blue"&gt;(&lt;/span&gt;opt,&#xD;
info,  expr&lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; info&lt;span style="color: blue"&gt;.&lt;/span&gt;Name  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; _ &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color: maroon"&gt;""&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
    parse_expression &amp;lt;@ p @&amp;gt;&#xD;
&lt;/div&gt;&#xD;
        &lt;p&gt;&#xD;
Note the usage of active patterns &lt;strong&gt;Lambda, Let &amp;amp;  PropGet&lt;/strong&gt; provided&#xD;
by the latest CTP of F# in Microsoft.FSharp.Quotations.Patterns we can analyse the&#xD;
expression p to recursively hunt property gets in the lambda body. The Quotations.Expr&#xD;
class conversely, allows us to construct these patterns. The latest CTP has simplified&#xD;
the Quotations namespace dramatically and now utilizes the standard .NET reflection&#xD;
libraries consistently. The list of patterns and constructors is extensive so rather&#xD;
than going through them all here, &lt;a href="http://research.microsoft.com/fsharp/manual/FSharp.Core/Microsoft.FSharp.Quotations.html"&gt;here's&#xD;
the link to the docs.&lt;/a&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Full listing with example usage:&#xD;
&lt;/p&gt;&#xD;
        &lt;div style="font-family: courier new"&gt;&#xD;
          &lt;span style="color: blue"&gt;#light&lt;/span&gt;  &#xD;
&lt;br&gt;&lt;br&gt;&lt;span style="color: blue"&gt;open&lt;/span&gt; System&lt;span style="color: blue"&gt;.&lt;/span&gt;Windows&lt;span style="color: blue"&gt;.&lt;/span&gt;Forms &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;open&lt;/span&gt; Microsoft&lt;span style="color: blue"&gt;.&lt;/span&gt;FSharp&lt;span style="color: blue"&gt;.&lt;/span&gt;Quotations&lt;span style="color: blue"&gt;.&lt;/span&gt;Patterns &#xD;
&lt;br&gt;&#xD;
      &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;let&lt;/span&gt; property_name_for &lt;span style="color: blue"&gt;(&lt;/span&gt;p&lt;span style="color: blue"&gt;:&lt;/span&gt;'x&lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt;'y&lt;span style="color: blue"&gt;)&lt;/span&gt; =   &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;let&lt;/span&gt; &lt;span style="color: blue"&gt;rec&lt;/span&gt; parse_expression&#xD;
e = &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;match&lt;/span&gt; e &lt;span style="color: blue"&gt;with&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; Lambda&lt;span style="color: blue"&gt;(&lt;/span&gt;var,&#xD;
body&lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; parse_expression&#xD;
body  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; Let&lt;span style="color: blue"&gt;(&lt;/span&gt;var,&#xD;
lhs, rhs&lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; parse_expression&#xD;
rhs  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; PropGet&lt;span style="color: blue"&gt;(&lt;/span&gt;opt,&#xD;
info,  expr&lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; info&lt;span style="color: blue"&gt;.&lt;/span&gt;Name  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;|&lt;/span&gt; _ &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; &lt;span style="color: maroon"&gt;""&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
    parse_expression &amp;lt;@ p @&amp;gt;  &#xD;
&lt;br&gt;&#xD;
        &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;type&lt;/span&gt; Control &lt;span style="color: blue"&gt;with&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
    &lt;span style="color: blue"&gt;member&lt;/span&gt; this&lt;span style="color: blue"&gt;.&lt;/span&gt;Bind &lt;span style="color: blue"&gt;(&lt;/span&gt;control_property &lt;span style="color: blue"&gt;:&lt;/span&gt; &lt;span style="color: blue"&gt;#&lt;/span&gt;Control&lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt;'b&lt;span style="color: blue"&gt;)&lt;/span&gt; datasource&#xD;
datasource_property =  &#xD;
&lt;br&gt;&#xD;
        this&lt;span style="color: blue"&gt;.&lt;/span&gt;DataBindings&lt;span style="color: blue"&gt;.&lt;/span&gt;Add&lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;br&gt;&#xD;
            property_name_for&#xD;
control_property,   &#xD;
&lt;br&gt;&#xD;
            datasource,   &#xD;
&lt;br&gt;&#xD;
            property_name_for&#xD;
datasource_property  &#xD;
&lt;br&gt;&#xD;
        &lt;span style="color: blue"&gt;)&lt;/span&gt; &lt;span style="color: blue"&gt;|&lt;/span&gt;&amp;gt;&#xD;
ignore  &#xD;
&lt;br&gt;&lt;br&gt;&lt;span style="color: green"&gt;(* EXAMPLE ONLY *)&lt;/span&gt;  &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;type&lt;/span&gt; Customer = &lt;span style="color: blue"&gt;{&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
    FirstName   &lt;span style="color: blue"&gt;:&lt;/span&gt; &lt;span style="color: blue"&gt;string&lt;/span&gt;;  &#xD;
&lt;br&gt;&#xD;
    Age         &lt;span style="color: blue"&gt;:&lt;/span&gt; &lt;span style="color: blue"&gt;int&lt;/span&gt;;  &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;}&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
              &#xD;
&lt;br&gt;&lt;span style="color: blue"&gt;let&lt;/span&gt; nameTextBox = &lt;span style="color: blue"&gt;new&lt;/span&gt; TextBox&lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;)&lt;/span&gt;&lt;br&gt;&lt;span style="color: blue"&gt;let&lt;/span&gt; ageSelect = &lt;span style="color: blue"&gt;new&lt;/span&gt; NumericUpDown&lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;)&lt;/span&gt;&lt;br&gt;&lt;span style="color: blue"&gt;let&lt;/span&gt; bs = &lt;span style="color: blue"&gt;new&lt;/span&gt; BindingSource&lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;)&lt;/span&gt;&lt;br&gt;&#xD;
bs&lt;span style="color: blue"&gt;.&lt;/span&gt;DataSource &lt;span style="color: blue"&gt;&amp;lt;-&lt;/span&gt; &lt;span style="color: blue"&gt;{&lt;/span&gt; FirstName&#xD;
= &lt;span style="color: maroon"&gt;"Jim"&lt;/span&gt;; Age = &lt;span style="color: maroon"&gt;29&lt;/span&gt; &lt;span style="color: blue"&gt;}&lt;/span&gt;&lt;br&gt;&lt;br&gt;&#xD;
nameTextBox&lt;span style="color: blue"&gt;.&lt;/span&gt;Bind &lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;fun&lt;/span&gt; ctrl &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; ctrl&lt;span style="color: blue"&gt;.&lt;/span&gt;Text&lt;span style="color: blue"&gt;)&lt;/span&gt; bs &lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;fun&lt;/span&gt; c &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; c&lt;span style="color: blue"&gt;.&lt;/span&gt;FirstName&lt;span style="color: blue"&gt;)&lt;/span&gt;  &#xD;
&lt;br&gt;&#xD;
ageSelect&lt;span style="color: blue"&gt;.&lt;/span&gt;Bind &lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;fun&lt;/span&gt; ctrl &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; ctrl&lt;span style="color: blue"&gt;.&lt;/span&gt;Text&lt;span style="color: blue"&gt;)&lt;/span&gt; bs &lt;span style="color: blue"&gt;(&lt;/span&gt;&lt;span style="color: blue"&gt;fun&lt;/span&gt; c &lt;span style="color: blue"&gt;-&amp;gt;&lt;/span&gt; c&lt;span style="color: blue"&gt;.&lt;/span&gt;Age&lt;span style="color: blue"&gt;)&lt;/span&gt;&lt;/div&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=05e20a7f-f726-4ea4-bc12-3d69fd860cf4"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=2gJOLebA"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=hn1Ha8oN"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=hn1Ha8oN" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=rEWj1P1C"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=rEWj1P1C" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=TBf4frJY"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=TBf4frJY" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/EB0PKRZmw00" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,05e20a7f-f726-4ea4-bc12-3d69fd860cf4.aspx</comments>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,05e20a7f-f726-4ea4-bc12-3d69fd860cf4.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=ac323066-814e-4ae8-a81f-02d25a4dc648</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,ac323066-814e-4ae8-a81f-02d25a4dc648.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,ac323066-814e-4ae8-a81f-02d25a4dc648.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=ac323066-814e-4ae8-a81f-02d25a4dc648</wfw:commentRss>
      
      <title>Seriously, Why Test First?</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,ac323066-814e-4ae8-a81f-02d25a4dc648.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/5N59kXspTCo/PermaLink,guid,ac323066-814e-4ae8-a81f-02d25a4dc648.aspx</link>
      <pubDate>Wed, 01 Oct 2008 07:34:17 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
Is &lt;a href="http://en.wikipedia.org/wiki/Test_Driven_Development"&gt;TDD&lt;/a&gt; over the&#xD;
top? Surely can I write my tests 'alongside' my code?&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Short answer: No.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Long answer:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
To borrow Michael Feathers, author of &lt;a href="http://www.objectmentor.com/resources/articles/WorkingEffectivelyWithLegacyCode.pdf"&gt;"Working&#xD;
effectively with Legacy Code"&lt;/a&gt; the definition of legacy code is code without&#xD;
tests. By writing a function without a test first, you've just banged out a whole&#xD;
bunch of legacy code. It might not feel like it, but you could have just wasted your&#xD;
precious time.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
OK, so lets pretend we have some of this legacy code in front of us. We begin writing&#xD;
some tests to cover it. What you'll find is that many programmers do one of a few&#xD;
things: &#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
Coder A will write four or five tests for every method and generally not have to change&#xD;
their implementation much, if at all. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Coder B writes less tests overall, but in order to get it there they had to change&#xD;
their code due to recognising some unnecessary coupling or logic. &#xD;
&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
The next few examples are people who would have used TDD or no tests at all...&#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
Coder C used TDD but strangely the end result looks like Coder A's code.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Coder D thinks unit testing is a waste of time, and has already deployed to production&#xD;
by now and is currently smugly sipping on Kool Aid.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Coder E only wrote a few tests, each test concerned with what the code should do,&#xD;
not what the code currently does, or how it goes about doing it. &#xD;
&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
Now that we have brutally put everybody in a box with rash generalizations and assumptions,&#xD;
lets come up with a way to throw a cat amongst the pigeons. Generally the best way&#xD;
to do this to a developer, is to ask them to add a new feature to their code. &#xD;
&lt;/p&gt;&#xD;
        &lt;ul&gt;&#xD;
          &lt;li&gt;&#xD;
Coder A when finished, finds that all the old tests wont even compile let alone pass&#xD;
because the new requirements severely altered the required architecture. Time is wasted&#xD;
rewriting all the tests to facilitate the new architectural requirements.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Coder B finds that only half of the old tests build or pass after implementing the&#xD;
new code. Because they removed some coupling it was easy enough to add, but they wasted&#xD;
time on some old tests that were obsolesced by the new architecture.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Coder C decides that the existing test suite isn't going to facilitate the new requirements.&#xD;
After they rewrite most of their tests they rewrite the code to satisfy them. Its&#xD;
like much Coder A's experience just in reverse.&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Coder D deploys the new code to production or QA, only to find that the new changes&#xD;
stomped all over old functionality. What do you mean it 'doesn't work'? &lt;em&gt;That's&#xD;
impossible! &lt;/em&gt;Time for a week long debugging session. &#xD;
&lt;/li&gt;&#xD;
          &lt;li&gt;&#xD;
Coder E on the other hand writes one more test to the test suite and adds as little&#xD;
code as necessary to make it pass, then brutally refactors anything possible. None&#xD;
of the tests needed rewriting in the process. All user requirements are met and the&#xD;
project is delivered on time and on budget. If your lucky that is...&lt;/li&gt;&#xD;
        &lt;/ul&gt;&#xD;
        &lt;p&gt;&#xD;
What some people fail to understand, is that using TDD doesn't prevent you from writing&#xD;
bad code. On the contrary, &lt;strong&gt;it can encourage you to over specify things&lt;/strong&gt;.&#xD;
When you over specify, you increase the places in your test suite that depend on how&#xD;
your implementation is structured. The very same thing happens when you write a function,&#xD;
and then a test or write tests 'alongside' your code. This is the mistake that Coder&#xD;
C makes, taking the bull by the tail, instead of the horns.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Coder E has no idea that he/she is in part practicing &lt;a href="http://en.wikipedia.org/wiki/Behavior_Driven_Development"&gt;BDD&lt;/a&gt;.&#xD;
Its a natural progression from blindly banging out tests to cover every feasible outcome.&#xD;
Eventually you get a feel for tests that give you maximum 'bang for buck'. These tests&#xD;
provide maximum (quality) coverage for the least effort. In other words, we aren't&#xD;
bothering with a test per function. We are writing one test per &lt;em&gt;desired behaviour&lt;/em&gt;. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
OK so every now and again, you head down the wrong track and tear up a few behavioural&#xD;
tests. Usually that's because you misunderstood the requirements, not how to code&#xD;
it, and that's where the value lies. &lt;strong&gt;If you cant write a behavioural test,&#xD;
then you haven't understood the problem fully&lt;/strong&gt;. If you don't understand the&#xD;
users problem, why are you coding? &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
That's why initially, its tempting to TDD blindly, you can ignore certain aspects&#xD;
of the users problem and just simply code until you think you got it right. Of course&#xD;
there are a few other aspects to BDD that I'm sure you're either aware of, or hopefully&#xD;
discover after reading this, but its important to remember: &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
BDD isn't something new and funky fresh. Its not the latest soda pop fad. At its heart&#xD;
its simply &lt;strong&gt;TDD&lt;/strong&gt;&lt;strong&gt;Done Well&lt;/strong&gt;. &#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=ac323066-814e-4ae8-a81f-02d25a4dc648"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=STYRyu63"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=uIMYlkj1"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=uIMYlkj1" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=AGuLV2m1"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=AGuLV2m1" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=f716HYNF"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=f716HYNF" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/5N59kXspTCo" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,ac323066-814e-4ae8-a81f-02d25a4dc648.aspx</comments>
      <category>Coding;Coding/Unit Testing</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,ac323066-814e-4ae8-a81f-02d25a4dc648.aspx</feedburner:origLink></item>
    <item>
      <trackback:ping>http://www.nervoustych.com/blog/Trackback.aspx?guid=fb530d56-fbb4-4bc5-a38d-1351540bae60</trackback:ping>
      <pingback:server>http://www.nervoustych.com/blog/pingback.aspx</pingback:server>
      <pingback:target>http://www.nervoustych.com/blog/PermaLink,guid,fb530d56-fbb4-4bc5-a38d-1351540bae60.aspx</pingback:target>
      <dc:creator>Jim Burger</dc:creator>
      <wfw:comment>http://www.nervoustych.com/blog/CommentView,guid,fb530d56-fbb4-4bc5-a38d-1351540bae60.aspx</wfw:comment>
      <wfw:commentRss>http://www.nervoustych.com/blog/SyndicationService.asmx/GetEntryCommentsRss?guid=fb530d56-fbb4-4bc5-a38d-1351540bae60</wfw:commentRss>
      <slash:comments>1</slash:comments>
      
      <title>Its great, but what is it for?</title>
      <guid isPermaLink="false">http://www.nervoustych.com/blog/PermaLink,guid,fb530d56-fbb4-4bc5-a38d-1351540bae60.aspx</guid>
      <link>http://feedproxy.google.com/~r/Nervoustych/~3/EeY8Ni6_L18/PermaLink,guid,fb530d56-fbb4-4bc5-a38d-1351540bae60.aspx</link>
      <pubDate>Mon, 29 Sep 2008 07:16:31 GMT</pubDate>
      <description>&lt;body xmlns="http://www.w3.org/1999/xhtml"&gt;&#xD;
        &lt;p&gt;&#xD;
In my previous post I espoused my latest love affair for &lt;a href="http://stackoverflow.com"&gt;Stackoverflow&lt;/a&gt;.&#xD;
I still think its an awesome site, however I recently got stung by the ever present&#xD;
reality that there are some people who think its for &lt;strong&gt;programming questions&#xD;
only&lt;/strong&gt;, and others who think its for all questions, as long as they relate&#xD;
to programming.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://stackoverflow.com/questions/147189/how-do-you-keep-a-balance-between-working-training-health-and-family"&gt;I&#xD;
asked this question.&lt;/a&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Sure its subjective, sure it can involve answers that apply to life in general. I&#xD;
even knew that it might yield answers that were opinions rather than fact. However,&#xD;
its firmly under the banner of questions that &lt;strong&gt;can be answered&lt;/strong&gt;. Your&#xD;
answer might work for you and not for me, but that doesn't mean we haven't answered&#xD;
the question, &lt;strong&gt;it means the question has more than one answer&lt;/strong&gt;. Much&#xD;
like the difference between a maze and a labyrinth. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I'm of the opinion that &lt;strong&gt;this site was created to&lt;/strong&gt;&lt;strong&gt;provide&#xD;
value&lt;/strong&gt; to its members. Clearly the response to the question indicates that&#xD;
many members found it to be a useful one. Unfortunately I'm at the mercy of editors&#xD;
who may or may not have a clear grasp of Venn Diagrams. I was told that my question&#xD;
is not about programming &lt;strong&gt;because its answers can be applied to any profession. &lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
            &lt;strong&gt;"&lt;/strong&gt;This is nothing to do with programming - it applies to all&#xD;
working people"&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
 &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;a href="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/Itsgreatbutwhatisitfor_E2E9/image_4.png"&gt;&#xD;
            &lt;img style="border-bottom: 0px; border-left: 0px; border-top: 0px; border-right: 0px" border="0" alt="Programming is a subset of the set: Professions." src="http://www.nervoustych.com/blog/content/binary/WindowsLiveWriter/Itsgreatbutwhatisitfor_E2E9/image_thumb_1.png" width="244" height="238"&gt;&lt;/img&gt;&#xD;
          &lt;/a&gt;  &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Given the above diagram we can posit that a question that applies to all professions&#xD;
also applies to the profession of programming. Especially since I'm a &lt;em&gt;programmer&#xD;
asking other programmers&lt;/em&gt;!&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
In another comment, emphasis mine:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
"It's like asking how to make a peanut butter and jelly sandwich suitable for&#xD;
eating while coding - &lt;strong&gt;just because it's valuable to many programmers does&#xD;
not make it a programming question&lt;/strong&gt;."&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
I'm concerned that semantics is more important to the commenter than good content&#xD;
when I see this. If peanut butter and jam sandwich recipes were truly useful to many&#xD;
programmers then why would we want to stop people from using the site to discuss it? &lt;strong&gt;If&#xD;
its useful, its a tool like any other. &lt;/strong&gt;Discussing techniques to combat lack&#xD;
of motivation are as important as techniques to combat code coupling.&lt;strong&gt; &lt;/strong&gt;&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Furthermore, in light of the fact that the site creators clearly condone &lt;a href="http://stackoverflow.com/questions/84556/whats-your-favorite-programmer-cartoon"&gt;this&#xD;
question&lt;/a&gt; I'd say that the FAQ was deliberately using soft terminology when guiding&#xD;
the end user what not to ask:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
"Avoid asking questions that are subjective, argumentative, or require extended&#xD;
discussion."&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
Blind adherence to the literal meaning to such a mantra is what gives us such wonderful&#xD;
things as &lt;a href="http://en.wikipedia.org/wiki/Fundamentalism"&gt;fundamentalism&lt;/a&gt;.&#xD;
The spirit of what is going on behind such a sentence is to prevent questions like&#xD;
"Which is better, C# or VB?", not potentially useful discussion. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The key here is that if you choose to take the FAQ literally then you should also&#xD;
take this literally:&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
As long as your question is:&#xD;
&lt;/p&gt;&#xD;
          &lt;ul&gt;&#xD;
            &lt;li&gt;&#xD;
detailed and specific &#xD;
&lt;/li&gt;&#xD;
            &lt;li&gt;&#xD;
written clearly and simply &#xD;
&lt;/li&gt;&#xD;
            &lt;li&gt;&#xD;
of interest to at least one other programmer somewhere &#xD;
&lt;/li&gt;&#xD;
          &lt;/ul&gt;&#xD;
          &lt;p&gt;&#xD;
... it is welcome here.&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
I realize that there is a worry about Signal to Noise ratio, but the site is tagged&#xD;
and searchable for heavens sake. Presumably in future releases we'll have the ability&#xD;
to filter out tags in your search results at whim and will anyway. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
The fact remains, subjective questions are some of the most popular on the site. Some&#xD;
see this as a scourge that needs to excommunicated. Personally I think it demonstrates&#xD;
that programmers on the whole :&#xD;
&lt;/p&gt;&#xD;
        &lt;blockquote&gt;&#xD;
          &lt;p&gt;&#xD;
a) Like to have a bit of fun from time to time, &#xD;
&lt;/p&gt;&#xD;
          &lt;p&gt;&#xD;
b) Recognize that there is more to programming than code.&#xD;
&lt;/p&gt;&#xD;
        &lt;/blockquote&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;All of this is moot however,&lt;/strong&gt; given that those people who think that&#xD;
all time management solutions in the profession of personal training necessarily applies&#xD;
to that of a surgeon and therefore programmers are &lt;strong&gt;clearly wrong&lt;/strong&gt;.&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Let me demonstrate with a small sample of the sorts of differences we are likely to&#xD;
find across two different professions:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;Q: When is it a good time to stop coding?&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;A: Whenever you feel tired and unmotivated. Get up and walk around, maybe&#xD;
get some exercise and get the blood flowing.&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
Now lets apply this to the profession of say, soldiering:&#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
          &lt;strong&gt;Q: When is it a good time to stop shooting at the enemy?&lt;/strong&gt;&#xD;
        &lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I think its clear that ceasing to fire upon the enemy and then getting up and having&#xD;
a walk around when you are simply tired and unmotivated, could result in the untimely&#xD;
cessation of your career as a soldier. &#xD;
&lt;/p&gt;&#xD;
        &lt;p&gt;&#xD;
I'm keen to hear others thoughts on the matter.&#xD;
&lt;/p&gt;&#xD;
        &lt;img width="0" height="0" src="http://www.nervoustych.com/blog/aggbug.ashx?id=fb530d56-fbb4-4bc5-a38d-1351540bae60"&gt;&lt;/img&gt;&#xD;
        &lt;br&gt;&#xD;
        &lt;hr&gt;&lt;/hr&gt;&#xD;
        &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;&#xD;
          &lt;img alt="Creative Commons License" style="border-width:0" src="http://creativecommons.org/images/public/somerights20.png"&gt;&lt;/img&gt;&#xD;
        &lt;/a&gt;&#xD;
        &lt;br&gt;&#xD;
Please use this content in any way you choose, all I ask of you is to &lt;a rel="license" href="http://creativecommons.org/licenses/by-sa/2.5/au/"&gt;pay&#xD;
it forward.&lt;/a&gt; Code snippets are licensed under the &lt;a href="http://www.gnu.org/licenses/lgpl.txt"&gt;LGPL&lt;/a&gt;&lt;/body&gt;&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=FgM7JCaZ"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?d=41" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=pcgMJp1e"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=pcgMJp1e" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=QIOKvxkh"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=QIOKvxkh" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~f/Nervoustych?a=m9YeXLBY"&gt;&lt;img src="http://feeds.feedburner.com/~f/Nervoustych?i=m9YeXLBY" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;&lt;img src="http://feeds.feedburner.com/~r/Nervoustych/~4/EeY8Ni6_L18" height="1" width="1"/&gt;</description>
      <comments>http://www.nervoustych.com/blog/CommentView,guid,fb530d56-fbb4-4bc5-a38d-1351540bae60.aspx</comments>
      <category>Coding;Community</category>
    <feedburner:origLink>http://www.nervoustych.com/blog/PermaLink,guid,fb530d56-fbb4-4bc5-a38d-1351540bae60.aspx</feedburner:origLink></item>
  </channel>
</rss>
