<?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:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Tim Barcz</title><link>http://devlicio.us/blogs/tim_barcz/default.aspx</link><description>Why use nails when a screw is the more reversible choice?  Have Twitter, follow the conversation there at @&lt;a href="http://www.twitter.com/timbarcz"&gt;timbarcz&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP1 (Build: 31106.3070)</generator><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/TimBarcz" /><feedburner:info uri="timbarcz" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item><title>Where Do You Want to Be In a Year?</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/aBY0FNbO3uo/where-do-you-want-to-be-in-a-year.aspx</link><pubDate>Thu, 31 Dec 2009 17:31:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:54848</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=54848</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/12/31/where-do-you-want-to-be-in-a-year.aspx#comments</comments><description>&lt;p&gt;This time of year is a time of resolutions and there certainly have been blog posts sprouting up about 2010 and what people are going to change about themselves.&amp;nbsp; I&amp;rsquo;m however going to approach it differently&amp;hellip;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.stephencovey.com/7habits/7habits-habit2.php"&gt;Habit #2&lt;/a&gt; of the &lt;a href="http://www.amazon.com/Habits-Highly-Effective-People/dp/0671708635"&gt;The 7 Habits of Highly Effective People&lt;/a&gt; is &amp;ldquo;&lt;b&gt;Begin with the end in mind&amp;rdquo;. &lt;/b&gt;Which has a key part I like:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;ldquo;&amp;hellip;If you don&amp;#39;t make a conscious effort to visualize who you are and what you want in life, then you empower other people and circumstances to shape you and your life by default&amp;hellip;.&amp;rdquo;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2 align="center"&gt;Where do you want to be in a year?&lt;/h2&gt;
&lt;h2&gt;My Answer:&lt;/h2&gt;
&lt;p&gt;By the end of 2010 I want&amp;hellip;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;to have learned more about the business. &lt;/li&gt;
&lt;li&gt;to understand lean manufacturing/processes and it&amp;rsquo;s adaptation to the software development world. &lt;/li&gt;
&lt;li&gt;to continue to read and learn more about marketing and the intersection of technology and marketing so that I can make more effective/informed decisions in my role at work. &lt;/li&gt;
&lt;li&gt;to continue exploring enterprise architecture both in book form but also in the often messy real-world. At work I&amp;rsquo;d like to use my knowledge of technology and architecture to continue to work to bring disparate systems together to reduce human involvement. &lt;/li&gt;
&lt;li&gt;to explore Ruby or F#, whichever seems to have real-world impact value to what I do.&lt;/li&gt;
&lt;li&gt;move to Git for source control at the enterprise level&lt;/li&gt;
&lt;li&gt;to be renewed as an Microsoft MVP&lt;/li&gt;
&lt;li&gt;to speak fewer times but with more authority/knowledge&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;That&amp;rsquo;s me, how about you? Where do you want to be in a year?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=54848" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/aBY0FNbO3uo" height="1" width="1"/&gt;</description><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/12/31/where-do-you-want-to-be-in-a-year.aspx</feedburner:origLink></item><item><title>Unit Testing Strategy: Hiding Out In the Open</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/3xkze6ngbgE/unit-testing-strategy-hiding-out-in-the-open.aspx</link><pubDate>Wed, 16 Dec 2009 15:38:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:54558</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>21</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=54558</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/12/16/unit-testing-strategy-hiding-out-in-the-open.aspx#comments</comments><description>&lt;p&gt;Sometimes there are pieces of code that you want to test but you just don&amp;rsquo;t quite see how you can unit test it easily.&amp;nbsp; I have illustrated one such example below where I am interacting with the file system.&lt;/p&gt;
&lt;p&gt;Take the following snippet for example:&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; FileRenamer : IFileRenamer&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; RenameFile(IList&amp;lt;DomainFile&amp;gt; files)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (files == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;         &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var file &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; files)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;             var newName = &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Concat(file.FullFileName, file.Client, file.Site, file.DesagilationCount, &lt;span style="color:#006080;"&gt;&amp;quot;.file&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt;             File.Copy(file.FullFileName, newName);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  12:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  13:&lt;/span&gt;     }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  14:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;I want to &amp;ldquo;unit test&amp;rdquo; that the correct file is created, but I really can&amp;rsquo;t.&amp;nbsp; The &amp;ldquo;File.Copy()&amp;rdquo; is going to hang me up a bit because in order to verify the method worked I am going to have to go visually verify that a file was copied to a certain location.&amp;nbsp; I could of course automate this but in either case I&amp;rsquo;m touching the file system, &lt;a href="http://codebetter.com/blogs/jeremy.miller/archive/2005/07/20/129552.aspx"&gt;which is not a quality of a good unit test&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;In reality, the only thing I really care about here is that the new file is named properly.&amp;nbsp; However, as it sits, the new name is really coupled to the copy process and the hard disk. Let&amp;rsquo;s change that&amp;hellip;&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; FileRenamer : IFileRenamer&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; RenameFile(IList&amp;lt;DomainFile&amp;gt; files)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;if&lt;/span&gt; (files == &lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;             &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;false&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;foreach&lt;/span&gt; (var file &lt;span style="color:#0000ff;"&gt;in&lt;/span&gt; files)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;         {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;             File.Copy(file.FullFileName, BuildNewFilename(file));&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt;         }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  12:&lt;/span&gt;     }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  13:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  14:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; BuildNewFilename(DomainFile file)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  15:&lt;/span&gt;     {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  16:&lt;/span&gt;         &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;.Concat(file.FullFileName,file.Client,file.Site,file.DesagilationCount,&lt;span style="color:#006080;"&gt;&amp;quot;.file&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  17:&lt;/span&gt;     }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  18:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What I&amp;rsquo;ve done here is move the logic of the new name creation to a new method.&amp;nbsp; By extracting that single line to its own method, we&amp;rsquo;ve made the &amp;ldquo;untestable&amp;rdquo;, testable.&lt;/p&gt;
&lt;p&gt;So at this point you may be asking yourself why this strategy is called &amp;ldquo;Hiding Out In the Open&amp;rdquo;? I call it that (is there another more formal name? possibly an xUnit test pattern name?) because we haven&amp;rsquo;t added the method to the interface (the &amp;ldquo;hiding&amp;rdquo; part) but we have made the method public so it&amp;rsquo;s visible to consumers (the &amp;ldquo;out in the open&amp;rdquo;).&lt;/p&gt;
&lt;h3&gt;Hiding&lt;/h3&gt;
&lt;p&gt;When I added the public method to the FileRenamer class, I *did not* add it to the interface IFileRenamer.&amp;nbsp; That means anywhere where this particular class is referenced as an IFileRenamer that the new method (BuildNewFilename) won&amp;rsquo;t be visible (see below). Hence the usage of the term &amp;ldquo;hiding&amp;rdquo;:&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/image_5F00_4E8173E1.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/image_5F00_thumb_5F00_74E3572C.png" width="597" border="0" height="190" /&gt;&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Out In the Open&lt;/h3&gt;
&lt;p&gt;The whole point of this exercise was to gain some testability aspects for this particular class.&amp;nbsp; Since the method is public, in our test method when we create an instance of our FileRenamer class, we now have the ability to test (see below):&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/image_5F00_149230F5.png"&gt;&lt;img style="border-right-width:0px;display:inline;border-top-width:0px;border-bottom-width:0px;border-left-width:0px;" title="image" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/image_5F00_thumb_5F00_3E0902E6.png" width="396" border="0" height="292" /&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;h3&gt;Some Caveats&lt;/h3&gt;
&lt;p&gt;Some will argue that the renaming of the file is a separate concern from the copy.&amp;nbsp; The separate concern would then be a separate class that is possibly used by the FileRenamer, in which case the new class would be testable.&amp;nbsp; This is a fair argument and at times it&amp;rsquo;s a good strategy.&amp;nbsp; I think it&amp;rsquo;s good to know the strategy so there are more tools in the bag when a curious situation arises.&lt;/p&gt;
&lt;p&gt;Some will argue that you&amp;rsquo;re increasing the surface area of your API when you make the method public.&amp;nbsp; Again, a fair argument however, in most cases when dealing with the abstraction (the interface) this doesn&amp;rsquo;t rear it&amp;rsquo;s head.&amp;nbsp; It&amp;rsquo;s a small insignificant side-effect.&amp;nbsp; If you don&amp;rsquo;t like it don&amp;rsquo;t use it.&amp;nbsp; Disclaimer: I strongly discourage this course of action if you&amp;rsquo;re building a public API that others will consume.&amp;nbsp; In my case, 99% of software I write is used in house. If making something &amp;ldquo;public&amp;rdquo; really bothers you, then make it internal and use the &amp;ldquo;InternalsVisibleTo&amp;rdquo; assembly attribute to give your test assembly visibility.&lt;/p&gt;
&lt;h3&gt;Conclusion:&lt;/h3&gt;
&lt;p&gt;The original snippet of code above had some pieces that were hard to properly unit test.&amp;nbsp; What we&amp;rsquo;ve done here employed a strategy I call &amp;ldquo;hiding out in the open&amp;rdquo; to the class under test to achieve a bit more testability. I think this is just another testing strategy to have in your back pocket.&amp;nbsp; There should be few times when you need this particular strategy, but when you need it it does come in handy.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=54558" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/3xkze6ngbgE" height="1" width="1"/&gt;</description><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/12/16/unit-testing-strategy-hiding-out-in-the-open.aspx</feedburner:origLink></item><item><title>Ralph Waldo Emerson Would’ve Been a Great Developer</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/Oab2QBtpuGA/ralph-waldo-emerson-would-ve-been-a-great-developer.aspx</link><pubDate>Mon, 14 Dec 2009 18:06:36 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:54505</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>4</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=54505</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/12/14/ralph-waldo-emerson-would-ve-been-a-great-developer.aspx#comments</comments><description>&lt;p&gt;A very short quote I came across to start your week off and get you thinking about technology with the correct frame of reference:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;“As to the methods there may be a million and then some, but principles are few. The man who grasps principles can successfully select his own methods. The man who tries methods, ignoring principles, is sure to have trouble.”&lt;/strong&gt;&lt;/p&gt;    &lt;p&gt;- Ralph Waldo Emerson (1803-1882)&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Mr. Emerson would surely have made a great developer. We need to heed his advice.&lt;/p&gt;  &lt;p&gt;As an exercise: think of how many different “methods” you can think of and then think of how many “principles” you can come up with.&lt;/p&gt;  &lt;p&gt;&lt;strong&gt;Principles&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Single Responsibility Principle&lt;/li&gt;    &lt;li&gt;Don’t Repeat Yourself&lt;/li&gt;    &lt;li&gt;Dependency Inversion Principle&lt;/li&gt;    &lt;li&gt;Liskov Substitution Principle&lt;/li&gt;    &lt;li&gt;Open Closed Principle&lt;/li&gt;    &lt;li&gt;Interface Segregation Principle&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&lt;strong&gt;Methods&lt;/strong&gt;:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;ASP.NET&lt;/li&gt;    &lt;li&gt;C# 2.0&lt;/li&gt;    &lt;li&gt;C# 3.0&lt;/li&gt;    &lt;li&gt;LINQ&lt;/li&gt;    &lt;li&gt;LINQ to SQL&lt;/li&gt;    &lt;li&gt;Entity Framework&lt;/li&gt;    &lt;li&gt;NHibernate&lt;/li&gt;    &lt;li&gt;SOA&lt;/li&gt;    &lt;li&gt;StructureMap&lt;/li&gt;    &lt;li&gt;Windsor/MicroKernel&lt;/li&gt;    &lt;li&gt;Ninject&lt;/li&gt;    &lt;li&gt;ASP.NET MVC&lt;/li&gt;    &lt;li&gt;Ruby&lt;/li&gt;    &lt;li&gt;IronRuby&lt;/li&gt;    &lt;li&gt;W*F&lt;/li&gt;    &lt;li&gt;Silverlight&lt;/li&gt;    &lt;li&gt;And on and on and on…&lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;“As to the methods there may be a million, but principles are few.”&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=54505" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/Oab2QBtpuGA" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Principles/default.aspx">Principles</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Quotes/default.aspx">Quotes</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/12/14/ralph-waldo-emerson-would-ve-been-a-great-developer.aspx</feedburner:origLink></item><item><title>Confessions of a First Time Manager</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/jsFoiPYZV1k/confessions-of-a-first-time-manager.aspx</link><pubDate>Sun, 13 Dec 2009 04:10:39 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:54463</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=54463</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/12/12/confessions-of-a-first-time-manager.aspx#comments</comments><description>&lt;p&gt;Many months ago I wrote &lt;a href="http://devlicio.us/blogs/tim_barcz/archive/2009/03/05/improving-software-process-a-letter-to-upper-management.aspx"&gt;a letter to upper management&lt;/a&gt; about principles of software development and the ways in which should build software.&amp;#160; Since that time my role has changed within the company and for the first time in my career I’m managing a significant number of people (at a previous company I was an R&amp;amp;D Manager but the team was much smaller).&lt;/p&gt;  &lt;p&gt;Below are a few observances/realizations I’ve had in the months since I’ve made the transition that I want to share with you:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;&lt;strong&gt;Just cause you’re the manager doesn’t mean you know everything&lt;/strong&gt; – Just because someone has tapped you to lead the team doesn’t mean “you’ve arrived”.&amp;#160; You don’t automatically go from individual contributor to all-knowing edict maker.&lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Don’t Relax/Stay involved&lt;/strong&gt; – Too many managers think because they’ve “arrived” they no longer need to keep pushing themselves. They think they are afforded some special privileges or don’t have to abide by the same rules others are held to. Not wise. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Rely on your team&lt;/strong&gt; – This one is often hard.&amp;#160; It was likely your contributions as in individual contributor that got you noticed for the management position and it’s often hard for an individual contributor accept the role change and not want to tackle challenges individually or continue to contribute.&amp;#160; As a manager you’ll have to rely on your team to see the same level of success as a manager as you presumably did as an individual contributor.&amp;#160; You’re no longer measured on what you do but rather how your entire team performs. This one is admittedly hard for me and I’m growing into this more and more every day. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Build your team &lt;/strong&gt;– As an individual contributor you were primarily responsible for just one person, yourself. As project lead or a team lead you’ll have more responsibility but likely you won’t have people reporting directly to you. As a manager you’re now responsible for everyone on your team and giving them the opportunity to be the best they can. Give people the freedom they need to do great things. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Be honest&lt;/strong&gt; - Don’t lie, shade the truth, or embellish. When you mess up, fess up, I believe the team will respect you more for it. ‘nuff said. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Never ask your team to do something you wouldn’t do yourself&lt;/strong&gt; – Managers who require/ask team members to do something they wouldn’t do themselves are being unfair.&amp;#160; Asking your team to work late while you get to leave every day at 5:00 is an amateur move. Asking the team to give up the weekend might be a necessity at times.&amp;#160; Just make sure if you ask, you’re right there alongside of them. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Don’t be a bottleneck to change&lt;/strong&gt; – The team shouldn’t always move at the speed of the manager. In general just because you don’t understand something doesn’t mean it shouldn’t be adopted. If you cut your teeth on VSS and were a ninja in VB.NET but now your team wants to move all projects to C# and this new thing called Git, don’t blindly say no. Technology moves fast, if you have a trustworthy team, you’re going to have to let go a bit and rely on the team (#3).&amp;#160; Remember, you don’t know everything (#1) and you need build your team (#4), sometimes that may mean doing or trying something you don’t quite understand. &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Don’t be afraid to push for change&lt;/strong&gt; – While you shouldn’t be a bottleneck to change you shouldn’t be afraid to push for it either. As a manager you typically have a greater visibility to the team or the process and if you see something that could be improved you shouldn’t necessarily wait for someone on your team to bring it forward. You’re still part of the team &lt;/li&gt;    &lt;li&gt;&lt;strong&gt;Hiring/Firing Sucks&lt;/strong&gt; – Movies make firing seem like an easy thing to do and an ego-boosting power-trip. It couldn’t be further from the truth. The days I’ve had to let people go I’ve rarely slept the night before. There’s nothing enjoyable about the process of taking away someone’s livelihood. Hiring can be fun, but most often it’s time consuming and all the time you spend interviewing is wasted except on the one person you hire. &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;You’ll notice that many are intertwined and I think at the heart of many of these is pride.&amp;#160; Pride is a dangerous beast, avoid it at all costs. Whether it means you have a trusted friend or colleague keep you in-check or you do frequent self-assessments, don’t let pride seep it.&lt;/p&gt;  &lt;p&gt;Please note that these are my personal observances that I’ve taken mental note of while on this journey. Your mileage may vary.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=54463" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/jsFoiPYZV1k" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Opinion/default.aspx">Opinion</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Improvement/default.aspx">Improvement</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Musings/default.aspx">Musings</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/12/12/confessions-of-a-first-time-manager.aspx</feedburner:origLink></item><item><title>I Just Cloned, Why Did Git Change My Files?</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/skU3G0DX7LA/i-just-cloned-why-did-git-change-my-files.aspx</link><pubDate>Mon, 30 Nov 2009 04:35:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:54252</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=54252</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/11/29/i-just-cloned-why-did-git-change-my-files.aspx#comments</comments><description>&lt;p&gt;Being new to Git I got thrown off a few weeks ago when cloning a remote repository and immediately seeing changes after the clone completed.&amp;nbsp; Scratching my head a bit, I reached out on &lt;a href="http://www.twitter.com/timbarcz"&gt;Twitter&lt;/a&gt; and &lt;a href="http://www.lostechies.com/blogs/jagregory/"&gt;James Gregory&lt;/a&gt; came to the rescue.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;How is it that right after a git clone &amp;lt;url&amp;gt;, git status shows modified files? (&lt;a title="http://twitter.com/TimBarcz/status/5920294511" href="http://twitter.com/TimBarcz/status/5920294511"&gt;http://twitter.com/TimBarcz/status/5920294511&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;What James showed me was that there is a setting &lt;b&gt;core.autocrlf &lt;/b&gt;on your system which needs to match the remote repository.&amp;nbsp; If it does not match, when you clone the directory files will be changed.&lt;/p&gt;
&lt;p&gt;After experiencing this myself and coming across it again the other day, I thought I&amp;rsquo;d put a quick video together showing the problem and the fix, since I suspect others will have it at some point as well.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;div style="padding-bottom:0px;margin:0px;padding-left:0px;padding-right:0px;display:inline;float:none;padding-top:0px;" id="scid:5737277B-5D6D-4f48-ABFC-DD9C333F4C5D:e4bb851d-5e2d-4d67-befc-f1fa30be9ea8" class="wlWriterEditableSmartContent"&gt;
&lt;div&gt;
&lt;object width="400" height="300"&gt;
&lt;param name="allowfullscreen" value="true" /&gt;
&lt;param name="allowscriptaccess" value="always" /&gt;
&lt;param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=7889569&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" /&gt;&lt;embed src="http://vimeo.com/moogaloop.swf?clip_id=7889569&amp;amp;server=vimeo.com&amp;amp;show_title=1&amp;amp;show_byline=1&amp;amp;show_portrait=0&amp;amp;color=&amp;amp;fullscreen=1" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="always" width="400" height="300"&gt;&lt;/embed&gt;
&lt;/object&gt;
&lt;p&gt;&lt;a href="http://vimeo.com/7889569"&gt;Git - Core.AutoCrlf Setting&lt;/a&gt; from &lt;a href="http://vimeo.com/user2178893"&gt;Tim Barcz&lt;/a&gt; on &lt;a href="http://vimeo.com"&gt;Vimeo&lt;/a&gt;.&lt;/p&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To recap: when cloning a new repository, always perform a &amp;ldquo;git status&amp;rdquo; command right after the clone.&amp;nbsp; If you see modified files, a core.autocrlf mismatch is likely the culprit.&amp;nbsp; Change your setting, clone again, and you should be good to go.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=54252" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/skU3G0DX7LA" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Tips+And+Tricks/default.aspx">Tips And Tricks</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Git/default.aspx">Git</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/11/29/i-just-cloned-why-did-git-change-my-files.aspx</feedburner:origLink></item><item><title>Devlicio.us Lands Another - Rob Reynolds</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/yleyRCD6oRM/devlicio-us-lands-another-rob-reynolds.aspx</link><pubDate>Mon, 23 Nov 2009 04:05:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:54026</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=54026</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/11/22/devlicio-us-lands-another-rob-reynolds.aspx#comments</comments><description>&lt;p&gt;One of the goals of the devlicio.us community is to bring you some of the best developers and content in the developer community. Over the past few months Devlicious has added a few new people to it&amp;#39;s growing blogging community.&amp;nbsp; If you haven&amp;#39;t noticed already, we&amp;#39;ve added another, Rob Reynolds.&lt;br /&gt;&lt;br /&gt;Rob is from the Kansas City area where he works at a bank where he says, &amp;quot;The doors are always locked and there is no money inside.&amp;quot; I met Rob about a year ago at the Alt.NET Open Spaces conference in Seattle. Rob and I hit it off immediately as we share a lot of same passions for IOC, SOLID, DI, and other neat acronyms.&lt;br /&gt;&lt;br /&gt;Rob is an automation expert and is continually looking for ways to use automation so he can focus on more interesting things. &amp;quot;Automate your life&amp;quot; is his mantra. He automates everything from his bills and retirement to computer backups, database restores and everything code.&lt;br /&gt;&lt;br /&gt;Rob is also heavily involved with the open source projects and manages a number of projects including UppercuT, RoundhousE and Bombali.&amp;nbsp; He&amp;#39;s contributed to other OSS projects (MSBuild Community Tasks, Tarantino) and is also a committer for AutoTest.NET.&lt;br /&gt;&lt;br /&gt;When it comes to continuous integration and automation Rob is your guy. I&amp;#39;m thrilled to be blogging alongside him and have the opportunity to learn with and from him. Please join me in welcoming Rob to the Devlicio.us community.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=54026" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/yleyRCD6oRM" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Announcement/default.aspx">Announcement</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/11/22/devlicio-us-lands-another-rob-reynolds.aspx</feedburner:origLink></item><item><title>Resharper 5.0 - Bookmarks</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/uTcFDFK8xLU/reshaper-5-0-bookmarks.aspx</link><pubDate>Fri, 09 Oct 2009 18:35:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:52509</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>8</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=52509</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/10/09/reshaper-5-0-bookmarks.aspx#comments</comments><description>&lt;p&gt;Today it was announced that &lt;a href="http://blogs.jetbrains.com/dotnet/2009/10/resharper-50-intro/"&gt;Resharper 5.0 will soon be introduced as part of the public EAP (Early Access Program)&lt;/a&gt;.&amp;nbsp; As one on &lt;a href="http://www.jetbrains.com/devnet/academy/experts/index.html"&gt;JetBrains .NET Academy Experts&lt;/a&gt; I&amp;rsquo;ve had access to Resharper 5.0 for a few weeks. While in the coming weeks and months you&amp;rsquo;ll hear quite a bit from developers who are trying out Resharper 5.0 I wanted to alert you to one of my favorite features at this point.&lt;/p&gt;
&lt;h3&gt;Bookmarks&lt;/h3&gt;
&lt;p&gt;I read a lot more code than I write. When exploring new projects, doing code reviews, tracking down a bug, I like to mark different paths the flow of execution may take.&amp;nbsp; Most often to keep track of call stacks and what goes where, I usually end up using a piece of paper with a pencil drawing lines to various methods and interfaces. I could use Visual Studio which has had the concept of bookmarks for some time.&amp;nbsp; You can put a bookmark in code which creates a bit of a mark in your file that you can come back to later.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/oldbookmarks_5F00_5B657C78.png"&gt;&lt;img title="oldbookmarks" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" alt="oldbookmarks" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/oldbookmarks_5F00_thumb_5F00_6D44A0F6.png" width="600" border="0" height="122" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;The problem with these bookmarks is that they&amp;rsquo;re flat and don&amp;rsquo;t and you get options of previous or next, but never the opportunity to define what &amp;ldquo;next&amp;rdquo; means? Hopping from bookmark to bookmark may not actually follow any intended path you meant to take when you placed the bookmark.&lt;/p&gt;
&lt;p&gt;Resharper 5.0 introduces the concept of bookmarks where you can set order.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/bookmarks_5F00_61AEE3B7.png"&gt;&lt;img title="bookmarks" style="border-right:0px;border-top:0px;display:inline;border-left:0px;border-bottom:0px;" alt="bookmarks" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/bookmarks_5F00_thumb_5F00_0F30037B.png" width="600" border="0" height="135" /&gt;&lt;/a&gt; &lt;/p&gt;
&lt;p&gt;Now I can happily bounce around code and easily inspect different control flows in a much more controlled fashion.&lt;/p&gt;
&lt;p&gt;ReSharper has been part of my toolset now for several years and I think what they&amp;rsquo;re doing is great.&amp;nbsp; While ReSharper 5.0 is a bit buggy at times I like it and the improvements it brings. I am looking forward to further EAP releases of ReSharper and encourage you to check them out as well. Should be coming by the end of this month.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=52509" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/uTcFDFK8xLU" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Announcement/default.aspx">Announcement</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/ReSharper/default.aspx">ReSharper</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/10/09/reshaper-5-0-bookmarks.aspx</feedburner:origLink></item><item><title>Git…Command-line or GUI?</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/RYNFs-LkfYM/git-command-line-or-gui.aspx</link><pubDate>Wed, 07 Oct 2009 19:15:02 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:52378</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>22</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=52378</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/10/07/git-command-line-or-gui.aspx#comments</comments><description>&lt;p&gt;A short quick post to get some feedback from you, the reader.&lt;/p&gt;  &lt;p&gt;I’m working to learn and transition to Git (using &lt;a href="http://www.lostechies.com/blogs/jason_meridth/archive/2009/06/01/git-for-windows-developers-git-series-part-1.aspx"&gt;Jason Meridth’s great series on Git&lt;/a&gt;).&amp;#160; Up to this point I’ve been using the command-line only, working to learn Git on the command-line before I rely on a tool or GUI abstraction. Recently I’ve been going through some refactoring on a project where I’m using Git. Right now I’m slow, really slow. Renaming files/classes for example is cumbersome to say the least.&lt;/p&gt;  &lt;p&gt;I got to wondering if knowing the command-line is even useful anymore or it just a geek badge of honor that a few developers like to point to proudly when talking about skill sets? Some part of me feels like using a tool like GitGUI or TortoiseGit is “cheating”.&amp;#160; Ironically I admire Git because it seems to let me work the way I want to work; branch often, local commits, easier merging and yet right now the command-line use of Git is my primary roadblock. It is at this point that I start thinking I should give up on the command-line since an SCM tool shouldn’t be intrusive and move to a GUI tool and give up my chances at fifth degree black belt geek.&lt;/p&gt;  &lt;p&gt;So what do you think?&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Use command-line go slow now but know the tool very well.&lt;/li&gt;    &lt;li&gt;Use GUI and go faster, however always be reliant on the GUI abstraction&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;Is using a GUI “cheating”?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=52378" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/RYNFs-LkfYM" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Git/default.aspx">Git</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/10/07/git-command-line-or-gui.aspx</feedburner:origLink></item><item><title>Ship Software With Value</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/zPvs_sJSwGM/ship-software-with-value.aspx</link><pubDate>Tue, 29 Sep 2009 18:49:24 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:51874</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>5</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=51874</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/09/29/ship-software-with-value.aspx#comments</comments><description>&lt;p&gt;The blogosphere has gone a bit crazy the last few days with posts responding to &lt;a title="The Duct Tape Programmer By Joel Spolsky" href="http://www.joelonsoftware.com/items/2009/09/23.html"&gt;Joel Spolsky’s latest article about &amp;quot;The Duct Tape Programmer&amp;quot;&lt;/a&gt;. Bloggers everywhere are tossing their two cents in and saying what parts of Joel&amp;#39;s post was good and what wasn&amp;#39;t good. Once noticeable trend is that many have jumped on the &amp;quot;just ship it&amp;quot; bandwagon.&lt;/p&gt;  &lt;p&gt;There’s a quote mentioned by Jamie Zawinski in the article:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;“Yeah,” he says, “At the end of the day, ship the f---ing thing! It’s great to rewrite your code and make it cleaner and by the third time it’ll actually be pretty. But that’s not the point—you’re not here to write code; you’re here to ship products.”&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;I don&amp;#39;t know Jamie and I imagine the context that the comment was made in was based around some pre-existing level of candor with the person he was speaking. We really don’t know what “…ship the f---ing thing” means in the context of that conversation and what level of quality is expected in that scenario. I would agree with Joel/Jamie that shipping products is important and that often developers (myself included) run the risk of becoming too entrenched in a design or beauty and all too easily miss the point of developing software...which is to ship a product that adds value.&amp;#160; However...”shipping” is only part of the picture. As someone responsible for the value of the product my team ships, I’m keenly aware of what affects shipping early can do (both the positive and negative).&lt;/p&gt;  &lt;p&gt;I&amp;#39;m reading a lot where people say &amp;quot;just ship it&amp;quot; but I&amp;#39;ve been part of teams where shipping too soon costs more money in the long run (and sometimes not even “the long run” but a few days/weeks down the road). These pro “ship it” bloggers surely must be talking about non-critical business systems when we say &amp;quot;just ship it&amp;quot;; would you want to ride on a plane where the flight control systems were sent out with bugs? Even a measly 1% failure rate of airplane system is unacceptable and is enormously expensive both in dollars and reputation for an airline.&lt;/p&gt;  &lt;p&gt;The point is that shipping is the point but not the whole point, it&amp;#39;s only one aspect of a well delivered software product. &lt;strong&gt;Shipping software with value is the point.&lt;/strong&gt;&amp;#160; Ship too soon with bugs and the value gained by shipping is potentially lost.&amp;#160; Conversely shipping late provides no value at all.&amp;#160; Neither lobbing a piece of crap over the wall at your customers early, nor refactoring your code till it shines is the point, neither should be considered a success. There’s a sweet spot that you need to find.&amp;#160; Keep in close contact with your customer, if you pay attention they’ll let you know when you’ve crossed into either extreme.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=51874" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/zPvs_sJSwGM" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Rant/default.aspx">Rant</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Agile/default.aspx">Agile</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Testing/default.aspx">Testing</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Opinion/default.aspx">Opinion</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/09/29/ship-software-with-value.aspx</feedburner:origLink></item><item><title>Testing URL Generation on Routes in MVC Framework</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/5oivg5Rri2o/testing-url-generation-on-routes-in-mvc-framework.aspx</link><pubDate>Thu, 27 Aug 2009 05:15:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:50767</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>16</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=50767</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/08/27/testing-url-generation-on-routes-in-mvc-framework.aspx#comments</comments><description>&lt;p&gt;Today I wrote some code to output URLs in a certain manner in an &lt;a href="http://www.asp.net/mvc"&gt;ASP.NET MVC&lt;/a&gt; project.&amp;nbsp; The code I wrote was extremely simple, but I struggled, I mean S-T-R-U-G-G-L-E-D, to write tests against the new code and ensure correctness. I could easily very visually that it was working but the amount of setup and kludge around ViewContext, RequestContext and ControllerContext was causing me to pull my hair out.&lt;/p&gt;
&lt;p&gt;I tweeted my frustrations as I packed up and left work for the day and got the following responses soon thereafter:&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&lt;a title="Tim Barcz on Twitter" href="http://www.twitter.com/timbarcz"&gt;@TimBarcz&lt;/a&gt; outbound routing is still hard, sadly (from &lt;a href="http://www.twitter.com/subdigital"&gt;@subdigital&lt;/a&gt;)&lt;/p&gt;
&lt;p&gt;&lt;a title="Tim Barcz on Twitter" href="http://www.twitter.com/timbarcz"&gt;@TimBarcz&lt;/a&gt; &amp;hellip;a way to test #aspnetmvc a helper to reduce the ridiculous noise/setup would be helpful (from &lt;a href="http://www.twitter.com/ehexter"&gt;@ehexter&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Determined to not give up I pulled down the &lt;a href="http://mvccontrib.codeplex.com/"&gt;MVCContrib&lt;/a&gt; source and started to peck away. I&amp;rsquo;m working on committing and finalizing the code but here is a sneak peak of the changes.&amp;nbsp; Hopefully you agree that it is an improvement.&lt;/p&gt;
&lt;p&gt;Before:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; [Test]&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Should_correctly_generate_session_url()&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RouteConfigurator().RegisterRoutes();&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;     var builder = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; TestControllerBuilder();&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;     var context = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RequestContext(builder.HttpContext, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; RouteData());&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;     context.HttpContext.Response.Expect(x =&amp;gt; x.ApplyAppPathModifier(&lt;span style="color:#0000ff;"&gt;null&lt;/span&gt;)).IgnoreArguments().Do(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Func&amp;lt;&lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt;&amp;gt;(s =&amp;gt; s)).Repeat.Any();&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;     var urlhelper = &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; UrlHelper(context);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;string&lt;/span&gt; url = urlhelper.RouteUrl(&lt;span style="color:#006080;"&gt;&amp;quot;session&amp;quot;&lt;/span&gt;, &lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; { sessionKey = &lt;span style="color:#006080;"&gt;&amp;quot;this-is-the-session&amp;quot;&lt;/span&gt;, conferenceKey = &lt;span style="color:#006080;"&gt;&amp;quot;austincodecamp&amp;quot;&lt;/span&gt; });&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;     url.ShouldEqual(&lt;span style="color:#006080;"&gt;&amp;quot;/austincodecamp/sessions/this-is-the-session&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;After:&lt;/p&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; [Test]&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; should_be_able_to_generate_url_from_named_route()&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     OutBoundUrl.OfRouteNamed(&lt;span style="color:#006080;"&gt;&amp;quot;session&amp;quot;&lt;/span&gt;).ShouldMapToUrl(&lt;span style="color:#006080;"&gt;&amp;quot;/sessions&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;p&gt;And&lt;/p&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; [Test]&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; should_be_able_to_generate_url_from_controller_action()&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:#f4f4f4;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     OutBoundUrl.Of&amp;lt;FunkyController&amp;gt;(x =&amp;gt; x.New()).ShouldMapToUrl(&lt;span style="color:#006080;"&gt;&amp;quot;/Funky/New&amp;quot;&lt;/span&gt;);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;line-height:12pt;background-color:white;width:100%;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;color:black;font-size:8pt;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;p&gt;Much, much cleaner and easier on the eyes.&lt;/p&gt;
&lt;p&gt;It&amp;rsquo;s not quite done yet and has some holes (accepting additional route values, etc) but it&amp;rsquo;s worthy of discussion and once completed should make one very frustrating aspect of testing in MVC even easier.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=50767" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/5oivg5Rri2o" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/ASP.NET+MVC+Framework/default.aspx">ASP.NET MVC Framework</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Open+Source+Software/default.aspx">Open Source Software</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/MVCContrib/default.aspx">MVCContrib</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/08/27/testing-url-generation-on-routes-in-mvc-framework.aspx</feedburner:origLink></item><item><title>Zero Defects In Software, Setting a Higher Bar</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/C5AtI1Nlc_g/zero-defects-in-software-setting-a-higher-bar.aspx</link><pubDate>Wed, 26 Aug 2009 18:04:37 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:50751</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>9</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=50751</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/08/26/zero-defects-in-software-setting-a-higher-bar.aspx#comments</comments><description>&lt;p&gt;Several months ago &lt;a href="http://devlicio.us/blogs/tim_barcz/archive/2009/03/05/improving-software-process-a-letter-to-upper-management.aspx"&gt;I published a letter to upper management about improving software processes&lt;/a&gt;.&amp;#160; In that post I laid out what our team needed to do to be more effective at our jobs. Since that letter nearly five months ago, I have been promoted to management myself and now manage the team. While some might say I’ve gone to the dark side, I would vehemently disagree.&amp;#160; The role certainly has changed me but I like my role because I still am a developer and know that high quality solutions do mean dollars in our pockets because we’re able to adjust/react more quickly. &lt;/p&gt;  &lt;p&gt;I just got done reading an article over my lunch break and it caused me to shake my head in one key spot (emphasis mine):&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;&lt;strong&gt;It’s very difficult, if not impossible, to build and maintain a dynamic web site that works flawlessly every moment of every day for every customer&lt;/strong&gt;. Between implementing new content, changing technology,&amp;#160; managing internal stakeholders, and designing for customers who have different objectives, learning styles, and backgrounds, you could never produce a 100 percent error-free site. &lt;strong&gt;After all, to err is human&lt;/strong&gt;.&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;Have we really set the bar that low with quality in software? I think we need to raise the bar.&amp;#160; A few months ago I took a stand with my letter to management, here is a similar email I wrote to my team recently which works to combat the thought process and acceptance of poor quality so rampant in our industry:&lt;/p&gt;  &lt;blockquote&gt;   &lt;p&gt;All, &lt;/p&gt;    &lt;p&gt;As a developer I&amp;#39;ve worked on systems and rarely, if ever, have we set the bar so high as to have zero known bugs in the system.&amp;#160; I think often this is looked at as &amp;quot;too lofty&amp;quot; or &amp;quot;impossible&amp;quot;.&amp;#160; Well, the development team here currently has one bug and is fast approaching zero.&amp;#160; It IS possible. &lt;/p&gt;    &lt;p&gt;In our department we often talk of &amp;quot;demonstrating competency and expertise&amp;quot;.&amp;#160; The flip-side of setting such high expectation is that we can shatter our reputation quickly with even a few small issues or bugs.&amp;#160; Chris has said that developers are like airline pilots and that you only hear about them when something goes wrong.&amp;#160; There&amp;#39;s a lot of truth in that.&amp;#160; You expect a pilot to get you somewhere safely - people expect our software to work. &lt;/p&gt;    &lt;p&gt;I think we should not shy away from holding ourselves to an excessively high standard.&amp;#160; Frankly, I&amp;#39;m more familiar with how to do it as a developer having years of building software to gain knowledge and experience from.&amp;#160; I don&amp;#39;t have all the answers on how do this from the other aspects but I don&amp;#39;t think this means we stop trying.&amp;#160; I think quality should be the first and highest goal.&amp;#160; Speed should follow quality.&amp;#160; If you&amp;#39;re keeping a high quality standard and feel overwhelmed that the work is backing up behind you and you can&amp;#39;t ensure the highest quality, please don&amp;#39;t hesitate to talk to me about it and we&amp;#39;ll see if priorities can be reworked. &lt;/p&gt;    &lt;p&gt;As a team we&amp;#39;re setting a positive direction for our department and its future. As we continue to refine our processes and expectations within each subgroup be aware of the lasting impact of the work we do.&amp;#160; Be vigilant about improvements in the process we can make.&amp;#160;&amp;#160; If you see areas where you see quality slipping, pull the &amp;quot;red cord&amp;quot; and stop the process from going further until the quality is fixed.&amp;#160; We want anything that leaves this department to be of the highest quality, whether a proofing round or a final product build.&amp;#160; Don’t rely on other departments to back us up.&amp;#160; If we operate in this manner we&amp;#39;ll only build further credibility and reputation within the company. &lt;/p&gt;    &lt;p&gt;Tim&lt;/p&gt; &lt;/blockquote&gt;  &lt;p&gt;What about you? What’s your stance towards bugs? Think zero defect is too lofty?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=50751" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/C5AtI1Nlc_g" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Testing/default.aspx">Testing</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Project+Management/default.aspx">Project Management</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/08/26/zero-defects-in-software-setting-a-higher-bar.aspx</feedburner:origLink></item><item><title>RhinoMocks Exploration : RhinoMocks “Caching” Values?</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/TGYpOcCc84c/rhinomocks-exploration-rhinomocks-caching-values.aspx</link><pubDate>Fri, 21 Aug 2009 22:26:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:50171</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=50171</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/08/21/rhinomocks-exploration-rhinomocks-caching-values.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/RhinoExploration_5F00_75614801.jpg"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/RhinoExploration_5F00_75614801.jpg"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" alt="RhinoExploration" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/RhinoExploration_5F00_thumb_5F00_22E267C5.jpg" align="right" border="0" height="209" width="329" /&gt;&lt;/a&gt;Occasionally on the &lt;a href="http://groups.google.com/group/RhinoMocks/"&gt;RhinoMocks mailing list&lt;/a&gt; a question pops up about various pieces of the framework that people struggle with. This post is the first in hopefully an ongoing series where I address specific underpinnings of RhinoMocks to you, the reader.&amp;nbsp; I&amp;rsquo;ll do my best to explain the inner workings of the code and what is going on under the covers while trying to keep it &amp;ldquo;real&amp;rdquo;.&amp;nbsp; If you have specific things you want to see, let me know and I will do my best to put together the tutorial.&lt;/p&gt;
&lt;p&gt;That said, let&amp;rsquo;s get started&amp;hellip;&lt;/p&gt;
&lt;p&gt;Occasionally a question will come in about RhinoMocks caching a value and that something must be a bug in the framework.&amp;nbsp; Consider the following very simple test where we want to return the current date/time from a property getter.&amp;nbsp; You have a component with a gettable time but no setter.&amp;nbsp; In order to fake this out we use the Stub() method return a &amp;quot;known&amp;quot; value.&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; [TestFixture]&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;class&lt;/span&gt; TimTests&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     [Test]&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; DateTimeDive()&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;     {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;         var stub = MockRepository.GenerateStub&amp;lt;IFoo&amp;gt;();&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;         stub.Stub(x =&amp;gt; x.Current).Return(DateTime.Now);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;         &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt;         Thread.Sleep(5000);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;  12:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;  13:&lt;/span&gt;         Console.WriteLine(stub.Current);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;  14:&lt;/span&gt;     }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;  15:&lt;/span&gt; }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;  16:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;  17:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;interface&lt;/span&gt; IFoo&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;  18:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;  19:&lt;/span&gt;     DateTime Current { get; }&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;  20:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;What time do you suppose is written out the console given the Thread.Sleep cal? The common thinking is that the Stub() method stores a method to be called to return the value at the time of execution when in reality what is happening is that the stub.Stub(x =&amp;gt; x.Current).Return(DateTime.Now) line is evaluated at runtime at the time the Stub is set.&amp;nbsp; Therefore, in the above code, the Console.WriteLine(stub.Current) will actually write the time from 5 seconds (5000 milliseconds prior) when the stub call was made. In other words, when Stub() is called, the resulting value is calculated and ready to be returned, it&amp;#39;s not deferred for execution. &lt;/p&gt;
&lt;p&gt;What is going on is that deep in the bowels of RhinoMocks there are things called Expectations, MockStates, and Recorders.&amp;nbsp; In the code above, when Stub() is called, what happens is a two step process (but appears as one, given the fluency, or dot-dot notation, of the call). &lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1. An expectation is created with a null return value (stub.Stub(x=&amp;gt;x.Current)) 
  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2. The expectation is updated with the known return value (.Return(DateTime.Now)) 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Note that if you try to write code without the second piece, you will get an InvalidOperationException when you try to use the stubbed property stating: 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; failed: Method &amp;#39;IFoo.get_Current();&amp;#39; requires a return value or an exception to throw. 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; System.InvalidOperationException: Method &amp;#39;IFoo.get_Current();&amp;#39; requires a return value or an exception to throw. 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\dev\OSS\rhino-tools\mocks\Rhino.Mocks\Expectations\AbstractExpectation.cs(342,0): at Rhino.Mocks.Expectations.AbstractExpectation.ReturnOrThrow(IInvocation invocation, Object[] args) 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\dev\OSS\rhino-tools\mocks\Rhino.Mocks\Impl\StubReplayMockState.cs(63,0): at Rhino.Mocks.Impl.StubReplayMockState.DoMethodCall(IInvocation invocation, MethodInfo method, Object[] args) 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\dev\OSS\rhino-tools\mocks\Rhino.Mocks\Impl\ReplayMockState.cs(118,0): at Rhino.Mocks.Impl.ReplayMockState.MethodCall(IInvocation invocation, MethodInfo method, Object[] args) 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\dev\OSS\rhino-tools\mocks\Rhino.Mocks\MockRepository.cs(678,0): at Rhino.Mocks.MockRepository.MethodCall(IInvocation invocation, Object proxy, MethodInfo method, Object[] args) 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\dev\OSS\rhino-tools\mocks\Rhino.Mocks\Impl\RhinoInterceptor.cs(96,0): at Rhino.Mocks.Impl.RhinoInterceptor.Intercept(IInvocation invocation) 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; c:\OSS\Castle\Tools\Castle.DynamicProxy2\Castle.DynamicProxy\AbstractInvocation.cs(202,0): at Castle.DynamicProxy.AbstractInvocation.Proceed() 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; at IFooProxybc98a6ed8f1b4aa3b9ea36d89f80e6af.get_Current() 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; C:\dev\OSS\rhino-tools\mocks\Rhino.Mocks.Tests\TimTests.cs(43,0): at Rhino.Mocks.Tests.TimTests.err() 

  &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; There is an &amp;quot;expectation&amp;quot; created when the call is made and that expectation is added to a recorder (There are ordered and unordered method recorders, by default (the most common scenario) you will be using unordered recorders). These recorders record the mocked object (our stub object here), the method being called, and the &amp;quot;expectation&amp;quot;. The call to .Return(DateTime.Now) updates the expectation with the desired return value.&amp;nbsp; In the RhinoMocks framework this code is very simple but it&amp;#39;s important to note this value is executed at the point this code is run.&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; IMethodOptions&amp;lt;T&amp;gt; Return(T objToReturn)&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt;     expectation.ReturnValue = objToReturn;&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     &lt;span style="color:#0000ff;"&gt;return&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;this&lt;/span&gt;;&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;You can see from the code above that setting up a return value simply updated the expectation&amp;#39;s return value. 
  &lt;br /&gt;I hope you&amp;#39;ve followed the above code.&amp;nbsp; The RhinoMocks codebase is not simple per se and you do not need to understand it in depth to use it but I think in this case it help (as I see it often pop up on the mailing list). &lt;/p&gt;
&lt;p&gt;So what do you do if you want something to be called in a delayed fashion?&amp;nbsp; In our example I want the call to IFoo.Current to represent the DateTime.Now when I call it (as opposed to when I set it up). To do that, simply use the &amp;quot;Do()&amp;quot; method.&amp;nbsp; Here is an example that provides the same functionality as above, only the return value of the Stub is deferred until the stub is actually called.&lt;/p&gt;
&lt;div&gt;
&lt;div style="border-style:none;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   1:&lt;/span&gt; [Test]&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   2:&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;public&lt;/span&gt; &lt;span style="color:#0000ff;"&gt;void&lt;/span&gt; Realtime_results_with_Do()&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   3:&lt;/span&gt; {&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   4:&lt;/span&gt;     var stub = MockRepository.GenerateStub&amp;lt;IFoo&amp;gt;();&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   5:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   6:&lt;/span&gt;     stub.Stub(x =&amp;gt; x.Current).Do(&lt;span style="color:#0000ff;"&gt;new&lt;/span&gt; Func&amp;lt;DateTime&amp;gt;(() =&amp;gt; DateTime.Now));&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   7:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;   8:&lt;/span&gt;     Thread.Sleep(5000);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;   9:&lt;/span&gt;&amp;nbsp; &lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:#f4f4f4;"&gt;&lt;span style="color:#606060;"&gt;  10:&lt;/span&gt;     Console.WriteLine(stub.Current);&lt;/pre&gt;
&lt;pre style="border-style:none;margin:0em;padding:0px;overflow:visible;font-size:8pt;width:100%;color:black;line-height:12pt;font-family:consolas,&amp;#39;Courier New&amp;#39;,courier,monospace;background-color:white;"&gt;&lt;span style="color:#606060;"&gt;  11:&lt;/span&gt; }&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;
I hope this helps a bit with the confusion around RhinoMocks and perceived &amp;quot;caching&amp;quot; of values.&amp;nbsp; If you have questions about this or other areas of RhinoMocks, I would love to tear into them for you, just ask!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=50171" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/TGYpOcCc84c" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Rhino+Mocks/default.aspx">Rhino Mocks</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/08/21/rhinomocks-exploration-rhinomocks-caching-values.aspx</feedburner:origLink></item><item><title>Invoke.CallFor(()=&gt; Speakers).For(IowaCodeCamp.Version(4))</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/WBjvIv5waZw/invoke-callfor-gt-speakers-for-iowacodecamp-version-4.aspx</link><pubDate>Fri, 21 Aug 2009 03:48:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:50149</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=50149</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/08/20/invoke-callfor-gt-speakers-for-iowacodecamp-version-4.aspx#comments</comments><description>&lt;p&gt;&lt;img style="border-bottom:0px;border-left:0px;display:inline;margin-left:0px;border-top:0px;margin-right:0px;border-right:0px;" title="Iowa Code Camp, Des Moines Iowa, November 7, 2009" alt="Iowa Code Camp, Des Moines Iowa, November 7, 2009" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/ICC_5F00_77303164.jpg" width="240" align="right" border="0" height="146" /&gt;Not too long ago Iowan developers had to travel to other states to get to a code camp.&amp;nbsp; Now, a few short years later, Iowa, on &lt;b&gt;November 7th, is having it&amp;#39;s fourth Iowa Code Camp in Des Moines.&amp;nbsp; &lt;/b&gt;I&amp;#39;m writing today to officially announce that we are now accepting speaker submissions for the event. I encourage you to think about what excites you about .NET and software development and how you can impact software developers in the Midwest with your topic.&amp;nbsp; Code camp attendees are typically talented developers who demonstrate their dedication to their craft by coming to a learning event on a weekend.&amp;nbsp; High quality content, such as that topic that just popped into your head or that topic you&amp;#39;ve been waiting to speak on, are the kinds of sessions our attendees are looking for.&lt;/p&gt;
&lt;p&gt;To submit a session or three, simply go to &lt;a href="http://iowacodecamp.com/Speakers.aspx"&gt;http://iowacodecamp.com/Speakers.aspx&lt;/a&gt; and follow the instructions there.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;The deadline to submit is September 23&lt;/b&gt;&lt;/p&gt;
&lt;p&gt;A few quick notes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Speaker and session selection is done by the Iowa Code Camp leadership. We&amp;#39;ll accept as many sessions as we can hold and will work to balance between advanced and beginner level topics &lt;/li&gt;
&lt;li&gt;You may (and are encouraged) to submit more than one abstract &lt;/li&gt;
&lt;/ul&gt;
&lt;div style="border-bottom:#c0c0c0 1px solid;border-left:#c0c0c0 1px solid;padding-bottom:5px;background-color:#e0e0e0;padding-left:5px;padding-right:5px;border-top:#c0c0c0 1px solid;border-right:#c0c0c0 1px solid;padding-top:5px;"&gt;&lt;b&gt;Special note to new speakers or people interested in speaking at a code camp for the first time:&lt;/b&gt;     &lt;br /&gt;Code camps are a great way to enter the world of speaking and &amp;quot;dip your toe in the water&amp;quot;.&amp;nbsp; If you&amp;#39;ve thought about speaking before and have a topic you&amp;#39;re knowledgeable about, consider taking the next step and submitting a session.&amp;nbsp; Iowa Code Camp welcomes new speakers and works hard to provide a very friendly environment to present for the first-time presenter.&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=50149" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/WBjvIv5waZw" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Announcement/default.aspx">Announcement</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Code+Camps/default.aspx">Code Camps</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/08/20/invoke-callfor-gt-speakers-for-iowacodecamp-version-4.aspx</feedburner:origLink></item><item><title>Moving to Kanban : A Mentoring Session</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/hd0axa-4Two/moving-to-kanban-a-mentoring-session.aspx</link><pubDate>Thu, 20 Aug 2009 03:49:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:50135</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>1</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=50135</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/08/19/moving-to-kanban-a-mentoring-session.aspx#comments</comments><description>&lt;p&gt;After &lt;a href="http://devlicio.us/blogs/tim_barcz/archive/2009/08/06/moving-to-kanban-did-scrum-fail.aspx"&gt;my recent post about our software team moving to Kanban&lt;/a&gt; I got an email from &lt;a href="http://www.lostechies.com/blogs/derickbailey/"&gt;Derick Bailey&lt;/a&gt; asking how he could help with our transition.&amp;nbsp; Derick graciously offered to meet with our team and help with any questions we may have and provide guidance as someone who has traveled this path before.&lt;/p&gt;
&lt;p&gt;We met for a little over two hours on Monday and recorded the discussion.&amp;nbsp; You&amp;#39;ll find that we bounce around a little bit which is because what you&amp;#39;re hearing is a team working in Scrum learning about Kanban.&amp;nbsp; This wasn&amp;#39;t scripted.&amp;nbsp; It is a teams honest questions about how one would go to Kanban and how to put the right pieces in place to make it succeed.&lt;/p&gt;
&lt;p&gt;Derick and the guys at &lt;a href="http://www.lostechies.com"&gt;LosTechies&lt;/a&gt; have set up the hosting for this on &lt;a href="http://pablotv.lostechies.com"&gt;PabloTv&lt;/a&gt;: &lt;a href="http://pablotv.lostechies.com/screencasts/dbailey/Adopting%20Kanban%201/Adopting%20Kanban%201.html"&gt;&lt;b&gt;Check out the first Adopting Kanban video&lt;/b&gt;&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=50135" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/hd0axa-4Two" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Agile/default.aspx">Agile</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Kanban/default.aspx">Kanban</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Methodology/default.aspx">Methodology</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/08/19/moving-to-kanban-a-mentoring-session.aspx</feedburner:origLink></item><item><title>Book Review: Web Design for ROI</title><link>http://feedproxy.google.com/~r/TimBarcz/~3/Gv6L3-IGF98/book-review-web-design-for-roi.aspx</link><pubDate>Fri, 14 Aug 2009 13:19:00 GMT</pubDate><guid isPermaLink="false">40756a8b-6212-4073-9d98-6c26781577de:50064</guid><dc:creator>Tim Barcz</dc:creator><slash:comments>3</slash:comments><wfw:commentRss>http://devlicio.us/blogs/tim_barcz/rsscomments.aspx?PostID=50064</wfw:commentRss><comments>http://devlicio.us/blogs/tim_barcz/archive/2009/08/14/book-review-web-design-for-roi.aspx#comments</comments><description>&lt;p&gt;&lt;a href="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/image_5F00_2.png"&gt;&lt;img style="border-top-width:0px;border-left-width:0px;border-bottom-width:0px;border-right-width:0px;" alt="image" src="http://devlicio.us/cfs-file.ashx/__key/CommunityServer.Blogs.Components.WeblogFiles/tim_5F00_barcz/image_5F00_thumb.png" width="197" align="right" border="0" height="240" /&gt;&lt;/a&gt; So I&amp;#39;ve been on a kick lately to publish book reviews of books I&amp;#39;ve been reading.&amp;nbsp; I hesitated at writing this review given the nature of the book tends to be more around design than it does around code.&amp;nbsp; I decided to write the review for a few reasons:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Designers, who also code, may read this blog&lt;/li&gt;
&lt;li&gt;If you work on a web site you &lt;b&gt;&lt;i&gt;should&lt;/i&gt;&lt;/b&gt; care about the design since it will affect the success of your site as well the way you code&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;I wouldn&amp;#39;t normally have picked up this book, instead favoring usability books by &lt;a href="http://www.useit.com"&gt;Jakob Nielsen&lt;/a&gt; or &lt;a href="http://www.sensible.com"&gt;Steven Krug&lt;/a&gt; or other well known usability personalities.&amp;nbsp; However, back in May I went to the &lt;a href="http://www.accmshow.com/ACCM2009/public/enter.aspx"&gt;ACCM Conference&lt;/a&gt; (Annual Conference of Catalog and Multichannel Merchants) and sat in a day long seminar by the authors of this book, &lt;a href="http://www.closed-loop-marketing.com/lance-loveday.php"&gt;Lance Loveday&lt;/a&gt; and &lt;a href="http://www.closed-loop-marketing.com/sandra-niehaus.php"&gt;Sandra Niehaus&lt;/a&gt;.&amp;nbsp; Both were very knowledgeable and presented their material well and as such I was interested in the print version of the seminar, this book, &lt;a href="http://www.wd4roi.com/home.html"&gt;Web Design for ROI&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;Part I - The Big Picture&lt;/h2&gt;
&lt;p&gt;The first part of this book talks about some of the principles of what design can do and the state of web site design as a whole.&amp;nbsp; If you&amp;#39;re reading this page chances are good that you have worked for sites that pay little attention to design.&amp;nbsp; If you have not worked for such a company, you can easily think of one in which you are a customer.&lt;/p&gt;
&lt;p&gt;There is a good case made for revisiting design aspects of the site as an investment in future profitability. Quite often a site that is &amp;quot;up&amp;quot; is considered done and work soon begins on the next set of features without really watching to see how a page or set of pages is performing.&amp;nbsp; Are people finding what they are looking for? Is it clear on a page what someone should do next? This book presents the idea that web design is never done and really it&amp;#39;s a constant effort to tweak pages to see changes in the analytics.&lt;/p&gt;
&lt;p&gt;Chapter four introduces the idea of user testing which, after being exposed to it a several years ago has been a closet interest of mine.&amp;nbsp; Analytics are brought into the picture here too but again all stuff that is pretty basic if you&amp;#39;re already in the web space and are actively tracking users and patterns.&amp;nbsp; &lt;b&gt;If there is one thing I learned from this section is that even the most minor changes to a web page, things most developers would scoff at, can have a dramatic effect on the performance (ROI) of a page&lt;/b&gt;.&lt;/p&gt;
&lt;h2&gt;Part II - Design Guidelines&lt;/h2&gt;
&lt;p&gt;This section of the book goes through different pages on an e-commerce site, landing pages, checkout, product detail pages, and of course the home page.&amp;nbsp; I liked how each of these pages were featured in their own chapter.&amp;nbsp; Throughout this section I appreciated the full color screen shots of examples.&amp;nbsp; My only issue was with the softness of some of the advice.&amp;nbsp; Granted it may be presented this way because design is really a case-by-case basis and there is really no one-size-fits-all.&amp;nbsp; Or it could be that the authors feared putting concrete advice in the book only to see their advice (and book) quickly become outdated.&amp;nbsp; I&amp;#39;m not sure.&lt;/p&gt;
&lt;h2&gt;Conclusion and Final Thoughts&lt;/h2&gt;
&lt;p&gt;This book was a very quick read and did add to my knowledge a bit but more importantly got me thinking about design and usability, which is always a good thing.&amp;nbsp; If you&amp;#39;re looking for a few ideas and conversation starters with your design staff then I would pick it up.&amp;nbsp; If you&amp;#39;re new design and analytics this book can be a good primer as the various terms and definitions are given in the sidebar at times and inline.&amp;nbsp; If you&amp;#39;re in the e-Commerce space already and have been doing design for some time, I think you may be disappointed in the book because many concepts are things you would probably already know.&amp;nbsp; The problem for me may lie in the intro where the authors talk about who this book is for &lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;&amp;quot;These days it takes a village of people to inspire, envision, create, and maintain a web site. This book is for everyone in that village. We&amp;#39;ve attempted to make the book useful and accessible to people with a range of experience levels&amp;quot;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;In my opinion they cast their net so wide they missed the mark.&amp;nbsp; Having sat in on a seminar with Lance and Sandra, I can confidently say they know their stuff and some of that came through in the book.&amp;nbsp; The problem ultimately lies in the quote above.&amp;nbsp; With making this book appeal to everyone it appeals to very few because it never achieves the depth that I&amp;#39;ve seen that both Lance and Sandra have.&amp;nbsp; Ultimately Lance and Sandra have a wealth of information and quite honestly I would have liked to have seen possibly two books which go into much deeper depth than this single book which scratches the surface.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://devlicio.us/aggbug.aspx?PostID=50064" width="1" height="1"&gt;&lt;img src="http://feeds.feedburner.com/~r/TimBarcz/~4/Gv6L3-IGF98" height="1" width="1"/&gt;</description><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Book+Reviews/default.aspx">Book Reviews</category><category domain="http://devlicio.us/blogs/tim_barcz/archive/tags/Web+Design/default.aspx">Web Design</category><feedburner:origLink>http://devlicio.us/blogs/tim_barcz/archive/2009/08/14/book-review-web-design-for-roi.aspx</feedburner:origLink></item></channel></rss>
