<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>EscApologist</title>
	<atom:link href="http://escapologist.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://escapologist.wordpress.com</link>
	<description>Geeky Techy Shiny Toys</description>
	<lastBuildDate>Sun, 20 Nov 2011 08:38:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='escapologist.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>EscApologist</title>
		<link>http://escapologist.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://escapologist.wordpress.com/osd.xml" title="EscApologist" />
	<atom:link rel='hub' href='http://escapologist.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Unit testing Expressions with Moq</title>
		<link>http://escapologist.wordpress.com/2011/11/20/unit-testing-expressions-with-moq/</link>
		<comments>http://escapologist.wordpress.com/2011/11/20/unit-testing-expressions-with-moq/#comments</comments>
		<pubDate>Sun, 20 Nov 2011 08:38:37 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[C#]]></category>
		<category><![CDATA[expression]]></category>
		<category><![CDATA[lambda]]></category>
		<category><![CDATA[moq]]></category>
		<category><![CDATA[repository pattern]]></category>
		<category><![CDATA[unit test]]></category>

		<guid isPermaLink="false">http://escapologist.wordpress.com/?p=338</guid>
		<description><![CDATA[When unit testing and setting up a mock object with the Moq framework you can't pass an expression to an optional parameter. You can test the expression in the Returns() callback but you will need to partially evaluate the expression to get rid of unevaluated references to closed variables. You will then be able to check that the expression passed to your mocked object was what you expected given the parameters you pass into your item under test.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=338&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>When setting up a mock object with the Moq framework you can specify what parameters may be passed to the mock and thus what to return when the mock encounters those specific parameters. </p>
<p>This falls down in the odd instance when you&#8217;re trying to pass a lambda expression to an optional parameter. This occurs, for example, on IRepository Find() as the where: and the orderby: are both optional. You can&#8217;t pass an expression tree to an optional parameter as it&#8217;s not compiled yet. </p>
<p>Moq gets around this by allowing It.IsAny() so at least we can specify the type of the expression to accept. How do we know, though, whether our mocked interface was called correctly? Quite different expressions, and any parameters, could have been used. </p>
<p>Fortunately, you can access the actual expression used in the .Returns() callback on the mock. Here you can create an anonymous function that will test the signature, the parameters used and still return the object mothers you&#8217;ve specified. </p>
<p>Here&#8217;s what we&#8217;ve got so far.</p>
<p><pre class="brush: csharp; gutter: false;">   
       [TestMethod]
       public void ShouldFindUser()
       {
           Expression&lt;Func&gt; expected = 
               x =&gt; 
               x.Name == this.sut.Name &amp;&amp; 
               x.Memberships[0].Password == 
                   this.sut.Memberships[0].Password;
           // note: optional parameters that are passed 
           // expression trees can't be compiled in .NET 4.0 
           // but Moq's It.IsAny saves the day.
           repository.Setup(
               r =&gt;
               r.Find(
                   It.IsAny&lt;Expression&lt;Func&gt;&gt;(),
                   It.IsAny&lt;IOrderByClause[]&gt;()))
                .Returns(
                       (Expression&lt;Func&gt; where, 
                        IOrderByClause[] order) =&gt;
                           {
                               // note: before the expressions can be 
                               // compared they must
                               // be partially evaluated.
                               this.ExpressionMatch(
                                   Evaluator.PartialEval(where), 
                                   Evaluator.PartialEval(expected));
                               return suts;
                           });

           service = new UserService(repository.Object);

           bool isValidUser = 
               this.service.ValidateUser(
                   this.sut.Name, 
                   this.sut.Memberships[0].Password);

           Assert.IsTrue(isValidUser, &quot;Expected to find user.&quot;);
       }
</pre></p>
<p>Comparing the expressions, however, introduces more problems. The expressions have not been compiled yet so they have unevaluated references to closed variables. The expressions will differ between the actual expression and any expected expression you may have defined using your object mother for the parameters. </p>
<p>You need to partially evaluate the expressions to create constants from the references before you can compare them (the comparison is essentially comparing the two .ToString() products). Finally, you can wrap an unit test assertion around the equality comparison. </p>
<p><pre class="brush: csharp; gutter: false;">
       private void ExpressionMatch(Expression actual, Expression expected)
       {
           var isEqual = 
               ExpressionEqualityComparer.ExpressionEqual(actual, expected);

           Assert.IsTrue(isEqual, &quot;Expected the expressions to match.&quot;);
       }
</pre></p>
<p>Now if someone alters the code that calls to the interface the test will fail. Otherwise it would have been joyfully returning object mothers for any old query passed to the interface.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/338/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/338/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/338/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=338&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2011/11/20/unit-testing-expressions-with-moq/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>Technical Debt</title>
		<link>http://escapologist.wordpress.com/2011/10/21/technical-debt/</link>
		<comments>http://escapologist.wordpress.com/2011/10/21/technical-debt/#comments</comments>
		<pubDate>Fri, 21 Oct 2011 08:04:00 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Agile Estimation]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[scrum]]></category>
		<category><![CDATA[technical debt]]></category>

		<guid isPermaLink="false">https://escapologist.wordpress.com/2011/10/21/technical-debt/</guid>
		<description><![CDATA[We need to start recording our technical debt, I think. For example, if Identity Server was a packaged third party product we&#8217;d be okay but it&#8217;s actually quite rough demonstration code with only a small integration test harness. It should be brought up to the same standard as the rest of the code base (eventually). [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=336&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We need to start recording our technical debt, I think.</p>
<p>For example, if Identity Server was a packaged third party product we&#8217;d be okay but it&#8217;s actually quite rough demonstration code with only a small integration test harness. It should be brought up to the same standard as the rest of the code base (eventually). So it works but we have a fair amount of technical debt that we need to record.</p>
<p>Note that we can&#8217;t use stories for technical debt. The debt accrued from getting a story to &#8216;done&#8217; and the points have already been earned.</p>
<p>Also, as we are developing, there will be times we add TODO/HACK into the code but the story still meets its acceptance tests. This extra work should be recorded as tasks in the backlog and then ordered. A rough estimate in hours added to each task will reveal our technical debt.</p>
<p>There will be times when we deliberately let the code quality slip, usually by choosing to ignore some of our metrics going into the red, in order to make a release available. That technical debt needs to be recorded, too.</p>
<p>How we pay down the technical debt is another matter. Preferably we wait until we are revisiting that piece of work and have a need to refactor. If we have so much cruft in a piece of code that adding a new feature is risky then that&#8217;s another time when the debt needs to be paid down. Otherwise, let it accrue, debt is a useful resource in the project budget.</p>
<p>Easy to say, harder to do. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/336/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/336/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/336/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=336&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2011/10/21/technical-debt/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>Mercurial with a Subversion central repository</title>
		<link>http://escapologist.wordpress.com/2010/11/24/mercurial-with-a-subversion-central-repository/</link>
		<comments>http://escapologist.wordpress.com/2010/11/24/mercurial-with-a-subversion-central-repository/#comments</comments>
		<pubDate>Wed, 24 Nov 2010 14:21:53 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[Subversion]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[best practice]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Hg]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[SVN]]></category>

		<guid isPermaLink="false">http://escapologist.wordpress.com/?p=318</guid>
		<description><![CDATA[This How-To is for developers wishing to use Mercurial for local development work on their Windows boxes when the source code is in a central Subversion repository.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=318&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This How-To is for developers wishing to use Mercurial (Hg) on their Windows development boxes when the source code is in a central Subversion (SVN) repository.</p>
<h3>Install TortoiseHg.</h3>
<p>In a Windows development environment the easiest way to get started with Hg is to install <a href="http://tortoisehg.bitbucket.org/">TortoiseHg</a>. The Windows Explorer extension not only makes it easy to work with files by using icon overlays and context menus but also packages up Python, the SVN bindings and a large number of Hg extensions that will prove very useful.</p>
<p>If you are behind a proxy you must first configure Hg with the proxy settings. Use the TortoiseHg context menu and Global Settings &gt; Proxy.</p>
<h3>Working with SVN.</h3>
<p>Given that you are working against a central SVN repository then Hg has a number of extensions that can talk to the SVN repo. I use HgSubversion. To install this extension you need to clone the hgsubversion repo:<br />
<code><br />
hg clone http://bitbucket.org/durin42/hgsubversion c:\hgsvn<br />
</code><br />
Use the TortoiseHg context menu and Global Settings &gt; Edit File.<br />
<code><br />
[extensions]<br />
hgsubversion = c:\hgsvn<br />
</code><br />
Start with a single project. It&#8217;s better to clone the whole repo, the trunk, branches and tags, rather than just a branch. This way you only need to do the clone once &#8211; clones can take a while. Create a project folder, <em>i.e.</em> c:\development\local\myproject, change to it and then clone the SVN repo:<br />
<code><br />
hg clone sv://subversion/myproject/<br />
</code></p>
<h3>Ignore.</h3>
<p>It&#8217;s best to set up the ignore list for Hg now. Save this as .hgignore and copy it to the root of your local Hg clone (next to .hg).<br />
<code><br />
# Mercurial .hgignore file template by Abdullin.com<br />
# For syntax see: http://linux.die.net/man/5/hgignore<br />
# Source: http://bitbucket.org/abdullin/snippets/</p>
<p># Visual Studio<br />
glob:*.user<br />
glob:*.suo<br />
glob:*.cache<br />
glob:_ReSharper.*/<br />
relre:/obj/<br />
relre:/bin/<br />
relre:/Bin/</p>
<p># Subversion<br />
glob:.svn/<br />
glob:_svn/</p>
<p># Build structure<br />
relre:^Build/</p>
<p># Misc<br />
glob:Thumbs.db<br />
glob:*.bak<br />
glob:*.log<br />
</code></p>
<h3>Local Development.</h3>
<p>If you use local branches and merge them in your local Hg repo you won&#8217;t be able to push changes to SVN.</p>
<p>If you commit often then you will end up with lots of changesets to push to SVN that will make it harder to see what the intention of your update was.</p>
<p>A good way to solve both problems is to submit patches to the central repo. Hg has an extension for patch management called Mercurial Queues (MQ).</p>
<h4>Mercurial Queues.</h4>
<p>Mercurial Queues (MQ) provides patch management integrated with Hg. This is incredibly useful for packaging up a lot of small changes that you record as you work locally into a single submission to the central repo. You can also work on a number of patches concurrently.</p>
<p>Enable the MQ extension in Hg, TortoiseHg &gt; Global Settings &gt; Extensions and check &#8216;mq&#8217;. In the mercurial.ini set diffs to use the git format.<br />
<code><br />
[diff]<br />
git = True<br />
</code><br />
In the Hg Repository Explorer you can create a new patch from the latest revision. This means you will need to commit something you want to go into a patch before you can create the patch. The other way is to use the command line.<br />
<code><br />
hg qnew mylatestpatch<br />
</code><br />
qnew will include the latest changes found in the working directory.</p>
<h5>qfold</h5>
<p>One way to work with plenty of local commits but to have a single, tidy submission to the central repo is to use MQ&#8217;s qfold to create a patch.</p>
<p>Once you have some changesets you wish to publish you convert them into patches. In Hg Repository Explorer use the context menu on the latest changeset first: Mercurial Queues &gt; Import Revision to MQ. Repeat for each of the changesets. Next, unapply the latest patches until just the earliest is still applied. Now at the command line use qfold. When you refresh Hg Repository Explorer you will see a single patch. Use the patch context menu&#8217;s &#8216;Finish Applied&#8217; to change the patch into a single changeset you can push to the central repo.</p>
<p>For example, you have three changesets: 16; 17 and 18. You then create three patches: 16.diff; 17.diff and 18.diff. You unapply 17.diff and 18.diff then go to the command line:<br />
<code><br />
hg qfold 17<br />
hg qfold 18<br />
</code><br />
Now you have a single patch, 16.diff, that contains all the work commited in the original three changesets.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/318/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/318/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/318/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=318&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2010/11/24/mercurial-with-a-subversion-central-repository/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>SpecFlow</title>
		<link>http://escapologist.wordpress.com/2010/03/16/specflow/</link>
		<comments>http://escapologist.wordpress.com/2010/03/16/specflow/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 10:28:24 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Agile]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Acceptance Test]]></category>
		<category><![CDATA[BDD]]></category>
		<category><![CDATA[Cucumber]]></category>
		<category><![CDATA[NUnit]]></category>
		<category><![CDATA[SpecFlow]]></category>
		<category><![CDATA[TDD]]></category>
		<category><![CDATA[unit test]]></category>
		<category><![CDATA[User Story]]></category>
		<category><![CDATA[VS.NET 2008]]></category>

		<guid isPermaLink="false">http://escapologist.wordpress.com/?p=302</guid>
		<description><![CDATA[Acceptance Tests for User Stories allow the Product Owner to more easily say whether or not they accept a Story as &#8216;Done&#8217;. Also, Acceptance Tests can be used in Behaviour Driven Development (BDD) to provide an &#8220;outside in&#8221; development process that complements the &#8220;inside out&#8221; coding style of Test Driven Development (TDD). SpecFlow brings Cucumber [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=302&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Acceptance Tests for User Stories allow the Product Owner to more easily say whether or not they accept a Story as &#8216;Done&#8217;. Also, Acceptance Tests can be used in Behaviour Driven Development (BDD) to provide an &#8220;outside in&#8221; development process that complements the &#8220;inside out&#8221; coding style of Test Driven Development (TDD).</p>
<p><a href="http://www.specflow.org/">SpecFlow</a> brings <a href="http://wiki.github.com/aslakhellesoy/cucumber/">Cucumber</a> BDD to .NET without the need for a Ruby intermediary like IronRuby.</p>
<p>In your Tests project add a Features folder. SpecFlow installs some templates into VS.NET so add a new SpecFlowFeature and fill it out like the following example, InterestRatings.feature :</p>
<p><pre class="brush: plain;">
Feature: Interest Ratings
	In order to manage the Interest Ratings
	As a Trader
	I want an Interest Ratings screen

@view
Scenario: View the Interest Ratings
	Given a repository of Interest Rating records
	When I view the Interest Rating screen 
	Then the full list is created

@create
Scenario: Create an Interest Ratings record
	Given a repository of Interest Rating records
	When I create an Interest Rating with name Test 
	And Interest Rating code 4
	Then the Interest Rating is saved to the repository with 
                 name Test and code 4
</pre></p>
<p>The scenarios are the tests. The format is a clear Given-When-Then description. As you create the scenario the .feature.cs will be updated for you. </p>
<p>Now you need to link up the statements in your scenario to steps that the unit test framework can execute. Create a Steps folder under Features and add a SpecFlowStepDefinition. You&#8217;ll find the generated file has some useful placeholders to get you started. Here, for example, is InterestSteps.cs :</p>
<p><pre class="brush: csharp; collapse: true; light: false; toolbar: true;">
    [Binding]
    public class InterestSteps
    {
        private IInterestRatingService interestService;
        private InterestRatingViewModel interestRatingViewModel;
        private InterestRating rating;
        private Mock&lt;IValidationService&gt; validationService 
                      = new Mock&lt;IValidationService&gt;();
        private Mock&lt;ILoadScreen&gt; loadScreen 
                      = new Mock&lt;ILoadScreen&gt;();
        private Mock&lt;IServiceLocator&gt; serviceLocator 
                      = new Mock&lt;IServiceLocator&gt;();
        private Mock&lt;IRepository&lt;InterestRating&gt;&gt; interestRepository 
                      = new Mock&lt;IRepository&lt;InterestRating&gt;&gt;();
        private List&lt;InterestRating&gt; interestRatings;

        [Given(&quot;a repository of Interest Rating records&quot;)]
        public void GivenARepositoryOfInterestRatingRecords()
        {
            Mock&lt;IValidator&gt; validator = new Mock&lt;IValidator&gt;();
            this.serviceLocator
                     .Setup(s =&gt; s.GetInstance&lt;IValidationService&gt;())
                     .Returns(this.validationService.Object);
            this.validationService
                     .Setup(v =&gt; v.GetValidator(
                         It.IsAny&lt;InterestRating&gt;()))
                     .Returns(validator.Object);
            this.serviceLocator
                     .Setup(s =&gt; s.GetInstance&lt;IEventAggregator&gt;())
                     .Returns(new EventAggregator());
            this.serviceLocator
                     .Setup(s =&gt; s.GetInstance&lt;ILoadScreen&gt;())
                     .Returns(this.loadScreen.Object);
            ServiceLocator.SetLocatorProvider(() =&gt; this.serviceLocator.Object);
            this.interestRatings = 
                      InterestRatingMother
                          .CreateGoodInterestRatingMother()
                          .InterestRatings
                          .Cast&lt;InterestRating&gt;().ToList();
            this.interestRepository
                     .Setup(s =&gt; s.GetAll())
                     .Returns(this.interestRatings);
            this.interestService 
                  =  new InterestRatingService(
                                this.interestRepository.Object);
        }


        [When(&quot;I view the Interest Rating screen&quot;)]
        public void WhenIViewTheInterestRatingScreen()
        {
            this.interestRatingViewModel 
                  = new InterestRatingViewModel(this.interestService);
            this.interestRatingViewModel.Load();
        }

        [When(&quot;I create an Interest Rating with name (.*)&quot;)]
        public void WhenICreateAnInterestRatingWithName(string name)
        {
            this.interestRatingViewModel 
                  = new InterestRatingViewModel(this.interestService);
            this.interestRatingViewModel.Load();
            this.interestRatingViewModel.Add();
            this.rating 
                  = this.interestRatingViewModel
                              .InterestRatings[
                                   this.interestRatingViewModel
                                        .InterestRatings.Count - 1];
            this.rating.InterestRatingName = name;
        }

        [When(&quot;Interest Rating code (.*)&quot;)]
        public void AndInterestRatingCode(int code)
        {
            this.rating.InterestRatingCode = code;
            this.interestRatingViewModel.Save();
        }

        [Then(&quot;the full list is created&quot;)]
        public void ThenTheFullListIsCreated()
        {
            Assert.That(
                this.interestRatings.Count 
                      == this.interestRatingViewModel
                               .InterestRatings.Count);  
        }


        [Then(&quot;the Interest Rating is saved to the repository 
         with name (.*) and code (.*)&quot;)]
        public void ThenTheInterestRatingIsSavedToTheRepository(
                           string name, int code)
        {
            InterestRating rating 
                = (from m in this.interestRatingViewModel.InterestRatings
                   where m.InterestRatingName.Equals(name)
                   select m).Single();

            Assert.That(
                rating.InterestRatingName.Equals(name),
                &quot;The interest rating name was not saved.&quot;);

            Assert.That(
                rating.InterestRatingCode == code,
                &quot;The interest rating code was not saved.&quot;);
        }
    }
</pre></p>
<p>In particular, notice the reuse of steps, for example GivenARepositoryOfInterestRatingRecords(), and the use of variable placeholders like (.*) to allow the passing of variables into the tests.</p>
<p>BDD wraps TDD. A reasonable flow would be to start with the Story, write up the Acceptance Tests and sketch out some of the steps. As you sketch out the steps you can see what unit tests you need so you go and develop the code using TDD. Once your code is ready and all the unit tests are passing you can integrate the layers with the BDD tests and when those are passing you have fulfilled your Acceptance Test.</p>
<p><a href="http://wiki.github.com/aslakhellesoy/cucumber/gherkin">Gherkin</a> parsers for SpecFlow are on the way as are VS.NET language plugins (Cuke4VS &#8211; currently this crashes my VS.NET 2008).</p>
<p><a href="http://wiki.github.com/richardlawrence/Cuke4Nuke/">Cuke4Nuke</a> is another Cucumber port that is worth looking at.</p>
<p>The readability of the Features makes it easy to take Acceptance Tests from User Stories so that the Product Owner and Stakeholders can see what the system is doing. The &#8220;outside in&#8221; nature of the creating the code gives focus to fulfilling the User Story.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/302/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/302/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/302/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=302&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2010/03/16/specflow/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>Improve XAML Editor Performance in Visual Studio</title>
		<link>http://escapologist.wordpress.com/2010/03/16/improve-xaml-editor-performance-in-visual-studio/</link>
		<comments>http://escapologist.wordpress.com/2010/03/16/improve-xaml-editor-performance-in-visual-studio/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 10:24:00 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VS.NET 2008]]></category>

		<guid isPermaLink="false">http://escapologist.wordpress.com/?p=299</guid>
		<description><![CDATA[Tools Menu &#62; Options &#62; Text Editor &#62; Xaml &#62; Misc Check &#8220;Always open documents in full XAML view&#8221; Also, If you have the ToolBox Tab on screen, close it. Don&#8217;t leave it as a closed tab. It will still load up all the controls even if your in XAML view. Closing it should speed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=299&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Tools Menu &gt; Options &gt; Text Editor &gt; Xaml &gt; Misc<br />
Check &#8220;Always open documents in full XAML view&#8221;</p>
<p>Also, If you have the ToolBox Tab on screen, close it. Don&#8217;t leave it as a closed tab. It will still load up all the controls even if your in XAML view. Closing it should speed up XAML view loading significantly.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/299/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/299/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/299/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=299&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2010/03/16/improve-xaml-editor-performance-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>VsSettings</title>
		<link>http://escapologist.wordpress.com/2010/03/16/vssettings/</link>
		<comments>http://escapologist.wordpress.com/2010/03/16/vssettings/#comments</comments>
		<pubDate>Tue, 16 Mar 2010 10:16:49 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VS.NET 2008]]></category>

		<guid isPermaLink="false">http://escapologist.wordpress.com/?p=290</guid>
		<description><![CDATA[I’ve created a dark scheme for VS.NET as I was finding the white screen was too bright (yes, I did also turn down the brightness on my screen). It’s based on the Aloha scheme. I’ve saved the .vssettings. You’ll also need the Consolas and Dina fonts (Consolas is probably already installed). To use these settings [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=290&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’ve created a dark scheme for VS.NET as I was finding the white screen was too bright (yes, I did also turn down the brightness on my screen). It’s based on the Aloha scheme.</p>
<p>I’ve saved the <a href="http://www.box.net/shared/kog6sptrzb">.vssettings</a>. You’ll also need the Consolas and Dina fonts (Consolas is probably already installed). </p>
<p>To use these settings go to Tools &gt; Import and Export Settings … .</p>
<p>I find this much more legible than the VS.NET defaults, especially for highlighting search results and for editing Xaml. You can port it to VS.NET 2010, too.</p>
<p>UPDATE</p>
<p>There&#8217;re a couple of downloads of these settings each month. I&#8217;d be interested in seeing any tweaks people may have so I&#8217;ve placed a copy on <a href="http://github.com/">GitHub</a> for folks to fork: http://github.com/Boggin/vssettings</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/290/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/290/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/290/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=290&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2010/03/16/vssettings/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>KeyboardShortcuts</title>
		<link>http://escapologist.wordpress.com/2010/02/18/keyboardshortcuts/</link>
		<comments>http://escapologist.wordpress.com/2010/02/18/keyboardshortcuts/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 10:22:17 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[VS.NET 2008]]></category>

		<guid isPermaLink="false">http://escapologist.wordpress.com/?p=296</guid>
		<description><![CDATA[I&#8217;ve put together a couple of scripts, poached from the interWebs, that will give those VS.NET keyboard ninjas some more shortcut-fu. Rather than relying on different, incomplete cheatsheets for each of your plugin&#8217;s keyboard shortcuts, this macro will find all of your current shortcuts and present them in a single table. From VS.NET 2008 open [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=296&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve put together a couple of scripts, poached from the interWebs, that will give those VS.NET keyboard ninjas some more shortcut-fu. Rather than relying on different, incomplete cheatsheets for each of your plugin&#8217;s keyboard shortcuts, this macro will find all of your current shortcuts and present them in a single table.</p>
<p>From VS.NET 2008 open the Macros IDE:<br />
<code>Tools &gt; Macros &gt; Macros IDE</code></p>
<p>Once in the Macros IDE, create a new Module:<br />
<code>Project Explorer &gt; My Macros (context menu) &gt; Add &gt; Add Module ("KeyboardShortcuts")</code></p>
<p>Copy the following over the file&#8217;s contents:</p>
<p><pre class="brush: vb;">
Imports EnvDTE
Imports System.Diagnostics

Public Module KeyboardShortcuts

    Sub ListKeyboardShortcuts()
        Dim i As Integer
        Dim j As Integer
        Dim pane As OutputWindowPane = GetOutputWindowPane(&quot;Commands&quot;)
        Dim keys As System.Array

        pane.Clear()
        pane.OutputString(&quot;&lt;font face=arial&gt;&quot;)
        pane.OutputString(&quot;&lt;table border=1 cellspacing=0 cellpadding=2 bgcolor=f0f0ff&gt;&quot; + Chr(10))
        pane.OutputString(&quot;&lt;tr&gt;&lt;th colspan=2 bgcolor=d0d0e0&gt;Keyboard Mappings&lt;/th&gt;&lt;/tr&gt;&quot; + Chr(10))
        pane.OutputString(&quot;&lt;tr&gt;&lt;th bgcolor=e0e0f0&gt;Action&lt;/th&gt;&quot;)
        pane.OutputString(&quot;&lt;th bgcolor=e0e0f0&gt;Key&lt;/th&gt;&lt;/tr&gt;&quot; + Chr(10))

        For i = 1 To DTE.Commands.Count
            keys = DTE.Commands.Item(i).Bindings
            If keys.Length &gt; 0 Then
                pane.OutputString(&quot;&lt;tr&gt;&quot;)

                'DTE.Commands.Item(i).Name() is sometimes blank.
                'We will print an m-dash in this case, as printing a blank table cell is visually
                'misleading, as such a cell has no borders, making it appear to be attached to
                'another cell.
                If DTE.Commands.Item(i).Name() &lt;&gt; &quot;&quot; Then
                    pane.OutputString(&quot;&lt;td valign=top&gt;&quot; + DTE.Commands.Item(i).Name())
                Else
                    pane.OutputString(&quot;&lt;td&gt;&lt;center&gt;&amp;mdash;&lt;/center&gt;&quot;)
                End If

                pane.OutputString(&quot;&lt;/td&gt;&lt;td&gt;&quot;)
                For j = 0 To keys.Length - 1
                    If j &gt; 0 Then
                        pane.OutputString(&quot;&lt;br/&gt;&quot;)
                    End If
                    pane.OutputString(keys(j))
                Next
                pane.OutputString(&quot;&lt;/td&gt;&lt;/tr&gt;&quot; + Chr(10))
            End If
        Next

        pane.OutputString(&quot;&lt;/table&gt;&lt;/font&gt;&quot;)

    End Sub

End Module
</pre></p>
<p>You&#8217;ll notice the error squiggle under the GetOutputWindowPane() call. We have to add that Utility in (it used to come with the Samples):<br />
<code>Project Explorer &gt; My Macros (context menu) &gt; Add &gt; Add Module ("Utilities")</code></p>
<p><pre class="brush: vb;">
Imports System
Imports EnvDTE
Imports EnvDTE80
Imports EnvDTE90
Imports System.Diagnostics

Public Module Utilities

    ' This function retrieves the output window pane
    Function GetOutputWindowPane(ByVal Name As String, Optional ByVal show As Boolean = True) As OutputWindowPane
        Dim window As Window
        Dim outputWindow As OutputWindow
        Dim outputWindowPane As OutputWindowPane

        window = DTE.Windows.Item(EnvDTE.Constants.vsWindowKindOutput)
        If show Then window.Visible = True
        outputWindow = window.Object
        Try
            outputWindowPane = outputWindow.OutputWindowPanes.Item(Name)
        Catch e As System.Exception
            outputWindowPane = outputWindow.OutputWindowPanes.Add(Name)
        End Try
        outputWindowPane.Activate()
        Return outputWindowPane
    End Function

End Module
</pre></p>
<p>To execute the macro go back to VS.NET:<br />
<code>Tools &gt; Macros &gt; Macros Explorer &gt; ListKeyboardShortcuts (context menu) &gt; Run</code></p>
<p>Yes, the output goes to the Output view and you have to cut-and-paste it into a .html but hey, if you want it to do more, update the script. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  HTH</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/296/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/296/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/296/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=296&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2010/02/18/keyboardshortcuts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>How to fit Scrum into a fixed contract?</title>
		<link>http://escapologist.wordpress.com/2010/02/16/how-to-fit-scrum-into-a-fixed-contract/</link>
		<comments>http://escapologist.wordpress.com/2010/02/16/how-to-fit-scrum-into-a-fixed-contract/#comments</comments>
		<pubDate>Tue, 16 Feb 2010 10:20:00 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Agile]]></category>

		<guid isPermaLink="false">http://wordpress.4sight.local/?p=216</guid>
		<description><![CDATA[We can&#8217;t bid on contracts on the basis of doing Scrum as Sales believe they won&#8217;t win any contracts. We&#8217;re doing Scrum, however, because we believe it increases our changes of delivering. So we&#8217;re doing Stealth Scrum in that we won&#8217;t explicitly tell the customers about it. We&#8217;ve identified a number of ways of creating [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=216&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We can&#8217;t bid on contracts on the basis of doing Scrum as Sales believe they won&#8217;t win any contracts. We&#8217;re doing Scrum, however, because we believe it increases our changes of delivering. So we&#8217;re doing Stealth Scrum in that we won&#8217;t explicitly tell the customers about it. We&#8217;ve identified a number of ways of creating a contract that can work with Scrum and will be acceptable to our customers. </p>
<p>Time and Materials (T&amp;M) in the terms, perhaps around the installation, can allow for some incremental releases. The bulk of the contract can still be fixed price and the T&amp;M can be budgeted. That way the customer can get sign-off on the budget and we have some room in which to be Agile. </p>
<p>Release points in the contract are so the customer gets early insight into the product. They&#8217;ll certainly have feedback and then the functionality may be renegotiated. Done on a capability in, capability out basis the budget need not be changed (which will save a lot of headaches for them as they don&#8217;t then need to go and talk to Accounts). If we release Minimum Marketable Features (MMF) early the customer has plenty of opportunity to get involved. </p>
<p>In the contract we talk about how we are going to work with the customer. If regular access to a customer representative can be negotiated then they can be regularly reviewing progress, both catching mis-steps early and also preventing the Team doing work that won&#8217;t be accepted or isn&#8217;t required. The better communication with the customer will improve the trust between us and them. </p>
<p>Change Requests (CRs) can be created that the customer may, or may not, pay for. Even though the contract will have the functional specification stapled onto the back it&#8217;s understood that change must be managed. Stating goals for the project will hopefully guide negotiations around scope creep. CRs are a tricky area as it can damage the trust between ourselves and our customer if not handled sensitively.</p>
<p>We do a Design Study before software construction commences. The customer is guided as to what a Design Study constitutes so that what they expect from it matches closely the coarse-grained estimates you&#8217;d expect at this stage. This will minimise the normal contract practices of cost padding and caveats.</p>
<p>Scrum handles what project risk it can through reprioritisation of the product backlog, raising riskier workitems to the top. This needn&#8217;t be raised to the customer unless we now suspect something is going all the way to the freezer [front-burner, back-burner, fridge, freezer]. Other project risk has to be addressed through standard project management techniques.</p>
<p>Scrum can manage risk through the trust that is built up between the customer and the team. The customer accepts that the team will do their absolute best to deliver business value as fast as they can and pays for the time required to make the delivery. The team does everything in their power to be transparent so that the customer knows exactly what to expect and can be comfortable that they are getting value. This trust can be difficult to achieve when attempting Stealth Scrum.</p>
<p>Additional Reading.<br />
<a href="http://agilesoftwaredevelopment.com/blog/peterstev/10-agile-contracts">10 Contracts for your next Agile Software Project</a><br />
<a href="http://nofixed.org/">NoFixed.org</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/216/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/216/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/216/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=216&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2010/02/16/how-to-fit-scrum-into-a-fixed-contract/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>Planning Poker cards</title>
		<link>http://escapologist.wordpress.com/2010/01/05/planning-poker-cards/</link>
		<comments>http://escapologist.wordpress.com/2010/01/05/planning-poker-cards/#comments</comments>
		<pubDate>Tue, 05 Jan 2010 14:46:52 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Agile Estimation]]></category>
		<category><![CDATA[Planning]]></category>
		<category><![CDATA[Planning Poker]]></category>

		<guid isPermaLink="false">http://wordpress.4sight.local/?p=245</guid>
		<description><![CDATA[We&#8217;ve been using ordinary playing cards for our Planning Poker game (Ace is one, King is thirteen) but it limited our range of story points so we&#8217;ve bought some cards from Mountain Goat Software that have everything from &#8220;?&#8221; to &#8220;&#8734;&#8221;. Of course, now I want to try Team Estimation to see if we can [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=245&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve been using ordinary playing cards for our Planning Poker game (Ace is one, King is thirteen) but it limited our range of story points so we&#8217;ve bought some cards from Mountain Goat Software that have everything from &#8220;?&#8221; to &#8220;&#8734;&#8221;. Of course, now I want to try <a href="http://www.netobjectives.com/files/TeamEstimationGame.pdf">Team Estimation</a> to see if we can speed up the Planning Meeting &#8230; </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/245/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/245/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/245/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=245&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2010/01/05/planning-poker-cards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
		<item>
		<title>Making babies</title>
		<link>http://escapologist.wordpress.com/2009/12/16/making-babies/</link>
		<comments>http://escapologist.wordpress.com/2009/12/16/making-babies/#comments</comments>
		<pubDate>Wed, 16 Dec 2009 17:20:14 +0000</pubDate>
		<dc:creator>boggin</dc:creator>
				<category><![CDATA[Agile Estimation]]></category>
		<category><![CDATA[Agile]]></category>
		<category><![CDATA[Mike Cohn]]></category>
		<category><![CDATA[Planning]]></category>

		<guid isPermaLink="false">http://wordpress.4sight.local/?p=219</guid>
		<description><![CDATA[If we keep metrics of how our Project Velocity changes as we add developers to the Team we can begin to get a rough estimate for how it will affect the Project Burndown. In this blog post Mike Cohn estimates that adding a seventh developer to a six man team will reduce the velocity by [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=222&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If we keep metrics of how our Project Velocity changes as we add developers to the Team we can begin to get a rough estimate for how it will affect the Project Burndown.</p>
<p>In <a href="http://blog.mountaingoatsoftware.com/predicting-velocity-when-team-membership-or-size-changes-frequently">this blog post</a> Mike Cohn estimates that adding a seventh developer to a six man team will <em>reduce</em> the velocity by approximately the amount you&#8217;d have expected it to rise by in the next iteration. In the second iteration following you will still be below your original velocity and it&#8217;s not until the third iteration following that you&#8217;ll gain your expected increase in velocity. Note also that the total gain in velocity will be less than &#8537;th.</p>
<p>Any developer or project manager instinctively knows this and the reasons have been described clearly. For instance, there are four stages a team goes through: forming; storming; norming and performing <span style="font-size:.7em;"><sup>[<a href="http://en.wikipedia.org/wiki/Forming-storming-norming-performing">1</a>]</sup></span> (<a href="http://en.wikipedia.org/wiki/Bruce_Tuckman">Bruce Tuckman</a> (1965)). More forcefully, there&#8217;s Brook&#8217;s Law: &#8220;Adding manpower to a late software project makes it later.&#8221; (or &#8220;Nine women can&#8217;t make a baby in one month.&#8221;).</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/escapologist.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/escapologist.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/escapologist.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/escapologist.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/escapologist.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/escapologist.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/escapologist.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/escapologist.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/escapologist.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/escapologist.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/escapologist.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/escapologist.wordpress.com/222/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/escapologist.wordpress.com/222/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/escapologist.wordpress.com/222/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=escapologist.wordpress.com&amp;blog=1258163&amp;post=222&amp;subd=escapologist&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://escapologist.wordpress.com/2009/12/16/making-babies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/209578f272a544554e637340a32816d0?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">boggin</media:title>
		</media:content>
	</item>
	</channel>
</rss>
