<?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>I C# People...</title>
	<atom:link href="http://koder.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://koder.wordpress.com</link>
	<description>walking around like regular people...</description>
	<lastBuildDate>Wed, 11 Jan 2012 17:44:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='koder.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>I C# People...</title>
		<link>http://koder.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://koder.wordpress.com/osd.xml" title="I C# People..." />
	<atom:link rel='hub' href='http://koder.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Permutations</title>
		<link>http://koder.wordpress.com/2012/01/11/permutations/</link>
		<comments>http://koder.wordpress.com/2012/01/11/permutations/#comments</comments>
		<pubDate>Wed, 11 Jan 2012 16:42:48 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/?p=206</guid>
		<description><![CDATA[Disclaimer: I know those of you who’ve done computer science or software engineering at university will already know how to do this, and know the name for the pattern, but in case we don’t use it I wanted to show it off somewhere. A colleague and I just had a code-off without realising it; we [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=206&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><em>Disclaimer: I know those of you who’ve done computer science or software engineering at university will already know how to do this, and know the name for the pattern, but in case we don’t use it I wanted to show it off somewhere. <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://koder.files.wordpress.com/2012/01/wlemoticon-smile.png" /></em></p>
<p>A colleague and I just had a code-off without realising it; we were both thinking about the same problem at the same time. That problem being a way to take a list of things, and get a list of the permutations of them.</p>
<p>So { “P1”, “P2”, “P3” } should result in: </p>
<p>{    <br />&#160;&#160;&#160; { “P1” },     <br />&#160;&#160;&#160; { “P2” },     <br />&#160;&#160;&#160; { “P3” },     <br />&#160;&#160;&#160; { “P1”, “P2” },     <br />&#160;&#160;&#160; { “P1”, “P3” },     <br />&#160;&#160;&#160; { “P2”, “P3” },     <br />&#160;&#160;&#160; { “P1”, “P2”, “P3” }     <br />}</p>
<p>I remembered an trick an old boss of mine taught me for finding combinations of items in a series, using bits. If you think of iterating a series of bytes you see the usual pattern:</p>
<ul>
<li>1 = 00000001 </li>
<li>2 = 00000010 </li>
<li>3 = 00000011 </li>
<li>4 = 00000100 </li>
</ul>
<p>So this means that iterating a numeric value (i.e. 1 to 256) and converting the loop variable to a sequence of bits on each iteration is basically going to generate all the combinations of true and false for a series of 8 boolean flags. That’s the behaviour we’re looking for. Of course, 8 is quite a limitation, but if we use Integer rather than byte we get 32, which is more than enough (in fact I get OutOfMemoryExceptions with a series of 23 items on my 8gig Quad-Xeon machine).</p>
<p>Here’s my implementation. Notice I’m using the trick, but I’m not iterating all the “powers of 2”, I’m iterating the items in a list, and only taking the ones where the bit representing their position in the list is set:</p>
<pre class="code"><span style="color:blue;">using </span><span style="color:#00008b;">System</span>;
<span style="color:blue;">using </span><span style="color:#00008b;">System</span>.<span style="color:#00008b;">Collections</span>.<span style="color:#00008b;">Generic</span>;

<span style="color:blue;">namespace </span><span style="color:#00008b;">ConsoleApplication13
</span>{
    <span style="color:blue;">public class </span><span style="color:#00008b;">Combinator
    </span>{
        <span style="color:blue;">public </span><span style="color:#00008b;">IList</span>&lt;<span style="color:#00008b;">List</span>&lt;<span style="color:#00008b;">T</span>&gt;&gt; <span style="color:#008b8b;">AllCombinationsOf</span>&lt;<span style="color:#00008b;">T</span>&gt;(<span style="color:#00008b;">IList</span>&lt;<span style="color:#00008b;">T</span>&gt; items)
        {
            <span style="color:blue;">if </span>(items == <span style="color:blue;">null</span>) <span style="color:blue;">throw new </span><span style="color:#00008b;">ArgumentNullException</span>(<span style="color:#a31515;">&quot;items&quot;</span>);
            <span style="color:blue;">if </span>(items.<span style="color:purple;">Count </span>&gt; 32) <span style="color:blue;">throw new </span><span style="color:#00008b;">ArgumentException</span>(<span style="color:#a31515;">&quot;Only 32 values are supported.&quot;</span>, <span style="color:#a31515;">&quot;items&quot;</span>);

            <span style="color:blue;">int </span>top = <span style="color:#008b8b;">GetTop</span>(items.<span style="color:purple;">Count</span>);

            <span style="color:blue;">var </span>permutations = <span style="color:blue;">new </span><span style="color:#00008b;">List</span>&lt;<span style="color:#00008b;">List</span>&lt;<span style="color:#00008b;">T</span>&gt;&gt;();
            <span style="color:blue;">for </span>(<span style="color:blue;">int </span>combinationId = 1; combinationId &lt;= top; combinationId++)
            {
                <span style="color:#008b8b;">AddPermutations</span>(permutations, combinationId, items);
            }

            <span style="color:blue;">return </span>permutations;
        }

        <span style="color:blue;">private static void </span><span style="color:#008b8b;">AddPermutations</span>&lt;<span style="color:#00008b;">T</span>&gt;(<span style="color:#00008b;">List</span>&lt;<span style="color:#00008b;">List</span>&lt;<span style="color:#00008b;">T</span>&gt;&gt; permutations, <span style="color:blue;">int </span>filter, <span style="color:#00008b;">IEnumerable</span>&lt;<span style="color:#00008b;">T</span>&gt; items)
        {
            <span style="color:blue;">var </span>permutation = <span style="color:blue;">new </span><span style="color:#00008b;">List</span>&lt;<span style="color:#00008b;">T</span>&gt;();

            <span style="color:blue;">int </span>i = 1;
            <span style="color:blue;">int </span>bitIndex = 1;
            <span style="color:blue;">foreach </span>(<span style="color:blue;">var </span>item <span style="color:blue;">in </span>items)
            {
                <span style="color:blue;">if </span>((filter &amp; bitIndex) == bitIndex)
                {
                    permutation.<span style="color:#008b8b;">Add</span>(item);
                }

                i++;
                bitIndex = (<span style="color:blue;">int</span>)<span style="color:#00008b;">Math</span>.<span style="color:#008b8b;">Pow</span>(2, i - 1);
            }

            permutations.<span style="color:#008b8b;">Add</span>(permutation);
        }

        <span style="color:blue;">private static int </span><span style="color:#008b8b;">GetTop</span>(<span style="color:blue;">int </span>count)
        {
            <span style="color:blue;">int </span>result = 0;
            <span style="color:blue;">for </span>(<span style="color:blue;">int </span>i = 0; i &lt; count; i++)
            {
                result = (result &lt;&lt; 1) + 1;
            }
            <span style="color:blue;">return </span>result;
        }
    }
}</pre>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/206/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/206/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/206/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=206&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2012/01/11/permutations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>

		<media:content url="http://koder.files.wordpress.com/2012/01/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Simplify string and path operations in FinalBuilder with PowerShell</title>
		<link>http://koder.wordpress.com/2011/07/05/simplify-string-and-path-operations-in-finalbuilder-with-powershell/</link>
		<comments>http://koder.wordpress.com/2011/07/05/simplify-string-and-path-operations-in-finalbuilder-with-powershell/#comments</comments>
		<pubDate>Tue, 05 Jul 2011 09:12:31 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2011/07/05/simplify-string-and-path-operations-in-finalbuilder-with-powershell/</guid>
		<description><![CDATA[At work we use FinalBuilder as our continuous integration server. Essentially it works like CruiseControl etc, but has software you use to build the project files rather than eating your XML raw. The basis of FinalBuilder is assembling “actions” into a build script that is executed either in the FinalBuilder software, or on a build [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=204&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>At work we use FinalBuilder as our continuous integration server. Essentially it works like CruiseControl etc, but has software you use to build the project files rather than eating your XML raw. The basis of FinalBuilder is assembling “actions” into a build script that is executed either in the FinalBuilder software, or on a build server running FinalBuilder Server.</p>
<p>Now typically, performing path and string manipulation is tricky, because you need to use FinalBuilder actions like “String Trimming”, “String Replace” and “String Pos”. All of which work on the basis that they take the value of a global variable defined in the project, and set the result to another global variable defined in the project. If you have a lot of string work to do, this can quickly become unwieldy.</p>
<p>So instead, <strong>I propose ignoring the built-in string and path manipulation actions, and swopping them all for one or two “Run Script” actions with PowerShell scripts.</strong> In my case, I have a URL to a Mercurial repository hosted on a Kiln server passed-in to my project, and I want to apply a convention to work out what the local repository path for me to clone to and build from should be. I do this by:</p>
<ol>
<li>Adding a single “Run Script” action at the top of my project</li>
<li>Selecting it</li>
<li>In the “Script Editor” window (View-&gt;Script Editor), select “PowerShell” as the scripting language</li>
<li>In the script editor window, add the following:</li>
</ol>
<p><font face="Courier New">$RepositoriesLocation&#160;&#160;&#160;&#160;&#160; = $FBVariables.GetVariable(&quot;_RepositoriesLocation&quot;) # Global variable configured on FB Server     <br />$RepositoryUrl&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = $FBVariables.GetVariable(&quot;RepositoryUrl&quot;) # Passed-in at runtime      <br />$uri&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = New-Object -type System.Uri -argumentlist $RepositoryUrl      </p>
<p></font><font face="Courier New">$repositoryName&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = $uri.Segments[$uri.Segments.Length - 1].Trim(&#8216;/&#8217;) # Parse the repo name     <br />$projectName&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160;&#160; = $uri.Segments[$uri.Segments.Length - 3].Trim(&#8216;/&#8217;) # Parse the Kiln project name      </p>
<p></font><font face="Courier New">$WorkingCopyRoot = [System.IO.Path]::Combine($WorkingCopiesLocation, $projectName)     <br />$WorkingCopyRoot = [System.IO.Path]::Combine($workingCopyRoot, $repositoryName)      </p>
<p></font><font face="Courier New">$FBVariables.SetVariable(&quot;WorkingCopyRoot&quot;, $workingCopyRoot) # The the global variable for subsequent actions to use</font></p>
<p>As you can see, this obtains the value passed-in to the project from the HgUrl variable, breaks it up and re-arranges it to produce a local path for the URL. There’s some other stuff about the location of the working copies being in a common location but that’s all there is to it.</p>
<p>I’ve recently gone a bit mad for this approach. How about this method of establishing the solution file to build in any given Hg repository, for example?:</p>
<p><font face="Courier New">$workingCopyRoot = $FBVariables.GetVariable(&quot;WorkingCopyRoot&quot;)     <br /></font><font face="Courier New">$solutionFileFullName = Get-ChildItem $workingCopyRoot -filter *.sln | select-object FullName -first 1     <br /></font><font face="Courier New">$FBVariables.SetVariable(&quot;SolutionFileFullName&quot;, $solutionFileFullName)</font></p>
<p>Happy, erm, “PowerShelling”… <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/204/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/204/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/204/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=204&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2011/07/05/simplify-string-and-path-operations-in-finalbuilder-with-powershell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>
	</item>
		<item>
		<title>Windows 8 &#8211; The end of an error?</title>
		<link>http://koder.wordpress.com/2011/06/02/windows-8-the-end-of-an-error/</link>
		<comments>http://koder.wordpress.com/2011/06/02/windows-8-the-end-of-an-error/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 12:19:16 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2011/06/02/windows-8-the-end-of-an-error/</guid>
		<description><![CDATA[So I hear there’s some news about a new Windows, and people are worried by the 5-minute Windows 8 press release because it mentions HTML5. Some people are really worried. I’m not in tears myself just yet, though I would be upset if the scare-mongers are proved right. Personally I&#8217;m just (finally) starting out in [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=203&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So I hear there’s some news about a new Windows, and people are worried by the 5-minute <a href="http://www.youtube.com/watch?v=p92QfWOw88I">Windows 8 press release</a> because it mentions HTML5. <a href="http://forums.silverlight.net/forums/p/230502/562271.aspx">Some people are really worried</a>. I’m not in tears myself just yet, though I would be upset if the scare-mongers are proved right.</p>
<p>Personally I&#8217;m just (finally) starting out in WPF. I really like it and if I&#8217;m honest I&#8217;m not a great fan of HTML/CSS because of the inconsistencies between browsers. I&#8217;m aware I&#8217;m not alone in that respect. My worry isn&#8217;t about historical investment in WPF, but the fact that I&#8217;m just starting out. I hope I&#8217;m not writing the new <a href="http://en.wikipedia.org/wiki/Betamax">Betamax</a> for my new apps.</p>
<p>However, If one takes a deep breath, relaxes and looks at it again, one could surmise that it&#8217;s unlikely .NET will be dropped totally. MS do have a good history (often to their own detriment) of backwards-compatibility, and I reckon that in the fullness of time there will be &quot;layers&quot; of apps:</p>
<ol>
<li>HTML5/CSS3 for tiles and &quot;widgets&quot;, though SL might be part of the &quot;tile&quot; story.</li>
<li>LOB apps that want to talk to local databases and/or webservices etc but still solve the business problems in a RAD-fashion will be Silverlight and WPF (WinForms will surely be supported but possibly discouraged for new apps and relegated to the “legacy” UI that so closely resembles Win7 in the video).</li>
<li>Device drivers and those apps that need to get down to nitty-gritty close-to-the-metal stuff or require super-duper high performance will be for C/C++ devs with brains far larger than mine.</li>
</ol>
<p>It&#8217;s not much different from the decision that WP7 apps being totally SL-based. They&#8217;re trying to tidy-up a long-established line of inconsistent apps and UI tech to give &quot;mom and pop&quot; users a better experience. My Dad loves his iPhone but still struggles with the fact that Windows isn&#8217;t the Pit of Success when it comes to usability and stability.</p>
<p>Let&#8217;s face it, advanced users (application/IT support, testing teams, DBAs, developers) will not use this new HTML5 veneer all that much, because it&#8217;s not meant for them. This is MS taking a look at their customer base, comparing it with the iPhone customer base, and realising they need a simpler OS UI that allows people to watch videos, check emails, mess with their pictures etc. It&#8217;s simply moving to a &quot;task-based UI&quot; on a grander scale.</p>
<p>Of course, tooling goes a long way to calm .NET devs in these situations. At the moment many may be worried by the prospect of using Notepad to write their Windows apps and struggle with debugging and implementation inconsistencies. However I&#8217;m sure that companies like JetBrains and DevExpress will be there to help.</p>
<p>It will be fine, don&#8217;t worry. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/203/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/203/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/203/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=203&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2011/06/02/windows-8-the-end-of-an-error/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>
	</item>
		<item>
		<title>Visual Studio Screen Real Estate</title>
		<link>http://koder.wordpress.com/2011/05/27/visual-studio-screen-real-estate/</link>
		<comments>http://koder.wordpress.com/2011/05/27/visual-studio-screen-real-estate/#comments</comments>
		<pubDate>Fri, 27 May 2011 14:23:02 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2011/05/27/visual-studio-screen-real-estate/</guid>
		<description><![CDATA[I have to say first that I am a total keyboard-freak. I use keyboard shortcuts for all Visual Studio and ReSharper commands. Over Christmas, my main dual-24”-screen development machine developed a fault, and I fell back to my (excellent and highly recommended) Lenovo ThinkPad X201. Of course screen real estate was suddenly an issue, and [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=201&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have to say first that I am a total keyboard-freak. I use keyboard shortcuts for all Visual Studio and ReSharper commands. Over Christmas, my main dual-24”-screen development machine developed a fault, and I fell back to my (excellent and highly recommended) Lenovo ThinkPad X201. Of course screen real estate was suddenly an issue, and I decided to do something radical.</p>
<p>I got rid of all the toolbars.</p>
<p>Yep – all of them.</p>
<p>Literally, I right-clicked the toolbar, and un-checked every single one, in both design mode and debugging mode. I then found and installed the <a href="http://visualstudiogallery.msdn.microsoft.com/bdbcffca-32a6-4034-8e89-c31b86ad4813">Hide Main Menu plugin for Visual Studio</a>.</p>
<p>Now Visual Studio looks like this:</p>
<p><a href="http://koder.files.wordpress.com/2011/05/singlescreenvs.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="SingleScreenVS" border="0" alt="SingleScreenVS" src="http://koder.files.wordpress.com/2011/05/singlescreenvs_thumb.png?w=244&#038;h=146" width="244" height="146" /></a></p>
<p>This is good, I like this. Then I fixed my desktop PC, and didn’t want to lose the goodness, but also wanted to make use of VS2010’s improved multi-monitor support. I exported <strong>All Settings-&gt;General Settings-&gt;Window Layouts</strong> options to SingleMonitor.vssettings, put that file into my shared DropBox folder to sync it to the desktop, imported it, and customised VS to look like this:</p>
<p><a href="http://koder.files.wordpress.com/2011/05/multiscreenvs2.png"><img style="background-image:none;padding-left:0;padding-right:0;display:inline;padding-top:0;border-width:0;" title="MultiScreenVS2" border="0" alt="MultiScreenVS2" src="http://koder.files.wordpress.com/2011/05/multiscreenvs2_thumb.png?w=244&#038;h=79" width="244" height="79" /></a></p>
<p>I’ve exported those window layouts to MultiMonitor.vssettings, so I can easily switch between them. Sometimes I move to a single screen even on the desktop in order to read documents/websites on the secondary monitor, or when screen sharing with my colleagues.</p>
<p>If you want my window layout files, you can find them on <a href="http://www.box.net/shared/473d3syby8">my box.net page</a>. </p>
<p><strong>Additional Tips:</strong></p>
<ol>
<li>Don’t forget when customising your window layouts to also customise them when debugging, as VS will switch between layouts as you start and finish debugging. </li>
<li>Try closing toolwindows too. If you learn the shortcuts to get them back (or alternatives) it makes for a much cleaner feel. </li>
<li>Try replacing the solution explorer with ReSharper’s “CTRL+T” command. It’s faster and doesn’t take up space. </li>
<li>Try working in full-screen mode when actually coding (toggle using SHIFT+ALT+ENTER). </li>
</ol>
<p>I appreciate I may have taken this as far as I could without using vi or something, but hopefully it serves as a little inspiration.</p>
<p>HTH.</p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/201/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/201/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/201/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=201&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2011/05/27/visual-studio-screen-real-estate/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>

		<media:content url="http://koder.files.wordpress.com/2011/05/singlescreenvs_thumb.png" medium="image">
			<media:title type="html">SingleScreenVS</media:title>
		</media:content>

		<media:content url="http://koder.files.wordpress.com/2011/05/multiscreenvs2_thumb.png" medium="image">
			<media:title type="html">MultiScreenVS2</media:title>
		</media:content>
	</item>
		<item>
		<title>Rabbit in the headlights (Windows Identity Foundation woes)</title>
		<link>http://koder.wordpress.com/2011/05/20/rabbit-in-the-headlights-windows-identity-foundation-woes/</link>
		<comments>http://koder.wordpress.com/2011/05/20/rabbit-in-the-headlights-windows-identity-foundation-woes/#comments</comments>
		<pubDate>Fri, 20 May 2011 16:42:45 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2011/05/20/rabbit-in-the-headlights-windows-identity-foundation-woes/</guid>
		<description><![CDATA[I’m working on a new project at work, and part of my role as architect is to decide how we’re going to build authentication and authorisation. This will be a desktop smart client application deployed via ClickOnce that will use web services (hosted by us at our datacentre) to operate, with a dash of local [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=195&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I’m working on a new project at work, and part of my role as architect is to decide how we’re going to build authentication and authorisation. This will be a desktop <a href="http://en.wikipedia.org/wiki/Smart_client">smart client</a> application deployed via <a href="http://msdn.microsoft.com/en-us/library/t71a733d(v=vs.80).aspx">ClickOnce</a> that will use web services (hosted by us at our datacentre) to operate, with a dash of local caching for offline operation where applicable. We already have an ASP.NET website that has auth/authz behind it, so ideally I’d like to build on that.</p>
<p>After much internetting, I re-discovered <a href="http://msdn.microsoft.com/en-us/security/aa570351">Windows Identity Foundation (WIF)</a>, having heard a little about it on a DotNetRocks episode some time back. I like the concepts – separating auth/authz from your applications and instead obtaining tokens containing the claims the user has.</p>
<p>Sounds great. In theory.</p>
<p>In practice, it’s appears WIF suffers from “<strong>O</strong>ver-engineering <strong>M</strong>icrosoft <strong>G</strong>iddyness” syndrome. I’ve watched various WCF <a href="http://www.pluralsight-training.net/microsoft/olt/Course/Toc.aspx?n=federated-identity">Pluralsight videos</a> (which are excellent, by the way) to try and get a basis of understanding for WIF, but when I really got into WIF itself, it’s too much for my small brain to cope with.</p>
<p>Essentially I’ve worked out that I want to have an “Identity Provider” that my desktop app can authenticate with, and that will return a security token in exchange for a valid username and password. I then want to be able to pop that token into subsequent calls to the other WCF services, which will then investigate the claims supplied in that token to establish whether the user can carry out those operations or not. However it seems writing my own Identity Provider that works off our user store is, ahem, “non-trivial”. There are a few choices of existing ones out there in the world., but it all seems like over-kill to me.</p>
<p>So I’m going to steal the idea and Build My Own. I’ll have a WCF service that is accessed via SSL that will return a token containing various information (“claims” in WIF parlance) about the user in exchange for a valid username and password. This token will then be made available in the SOAP headers of calls to our other web services (also accessed via SSL, so it’s okay <img style="border-style:none;" class="wlEmoticon wlEmoticon-smile" alt="Smile" src="http://koder.files.wordpress.com/2011/05/wlemoticon-smile.png" />).</p>
<p>I know what some of my readers will be thinking – that there’s a reason for the engineering that’s gone into WIF. The truth is that this approach should work just as well. I’ll need to have a think about possibly signing the token and encrypting it so that the web services can be confident the data hasn’t been tampered with or otherwise intercepted, but I’m willing to be my small brain comes up with The Simplest Thing That Could Possibly Work. A key tenant of Domain Driven Design, and something else I’m going to strive for on this project.</p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/195/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/195/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/195/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=195&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2011/05/20/rabbit-in-the-headlights-windows-identity-foundation-woes/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>

		<media:content url="http://koder.files.wordpress.com/2011/05/wlemoticon-smile.png" medium="image">
			<media:title type="html">Smile</media:title>
		</media:content>
	</item>
		<item>
		<title>Genrsis project is published&#8230;</title>
		<link>http://koder.wordpress.com/2011/01/30/genrsis-project-is-published/</link>
		<comments>http://koder.wordpress.com/2011/01/30/genrsis-project-is-published/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 01:13:31 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2011/01/30/genrsis-project-is-published/</guid>
		<description><![CDATA[…on CodePlex at http://genrsis.codeplex.com/. Please be gentle – I’m really starting from the beginning here, and the first commit really is just me adding a new ASP.NET MVC 3 template project to the solution. There is more to come, I promise! Filed under: General<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=190&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>…on CodePlex at <a href="http://genrsis.codeplex.com/">http://genrsis.codeplex.com/</a>. Please be gentle – I’m really starting from the beginning here, and the first commit really is just me adding a new ASP.NET MVC 3 template project to the solution. There is more to come, I promise!</p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/190/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/190/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/190/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=190&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2011/01/30/genrsis-project-is-published/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>
	</item>
		<item>
		<title>The Big Rewrite</title>
		<link>http://koder.wordpress.com/2011/01/30/the-big-rewrite/</link>
		<comments>http://koder.wordpress.com/2011/01/30/the-big-rewrite/#comments</comments>
		<pubDate>Sun, 30 Jan 2011 00:07:17 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2011/01/30/the-big-rewrite/</guid>
		<description><![CDATA[I know the big rewrite is almost never the right answer, but in the case of a stalled hobby project that started a year ago with Linq to SQL, ASP.NET MVC 1.0, then maybe it’s okay. I’ve decided to start again totally from scratch. This is for a few reasons: I want to start again [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=189&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I know the <a href="http://www.joelonsoftware.com/articles/fog0000000069.html">big rewrite is almost never the right answer</a>, but in the case of a stalled hobby project that started a year ago with Linq to SQL, ASP.NET MVC 1.0, then maybe it’s okay. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I’ve decided to start again totally from scratch. This is for a few reasons:</p>
<ul>
<li>I want to start again using ASP.NET MVC 3 with Razor view engine, and make use of the many other improvements.</li>
<li>I want to use EF code first, rather than Linq to SQL.</li>
<li>I attended <a href="http://developerdeveloperdeveloper.com/ddd9/">DDD9</a> today, and saw a <a href="http://developerdeveloperdeveloper.com/ddd9/ViewSession.aspx?SessionID=549">session with a lot of useful information about CQRS</a> that I want to try and apply here.</li>
<li>I want to remove the product name from the code. I think I’ll still be branding it as “Workflo”, but since I have this overall idea of a project called “Genrsis” that’ll include other products, the root namespace for this particular product will probably be something more abstract like “Genrsis.WorkItemTracking”.</li>
<li>I want to host this project on codeplex.</li>
<li>There is a lot of stuff I can reuse from the old code: my custom ASP.NET MembershipProvider, logo, CSS etc.</li>
</ul>
<p>So I’m going to get started on this now. The sooner I can start dogfooding the better. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/189/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/189/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/189/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=189&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2011/01/30/the-big-rewrite/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>
	</item>
		<item>
		<title>Yet Another Bug Tracking System</title>
		<link>http://koder.wordpress.com/2011/01/11/yet-another-bug-tracking-system/</link>
		<comments>http://koder.wordpress.com/2011/01/11/yet-another-bug-tracking-system/#comments</comments>
		<pubDate>Tue, 11 Jan 2011 23:50:23 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[workflo]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2011/01/11/yet-another-bug-tracking-system/</guid>
		<description><![CDATA[Other titles I thought of included “If you build it, they will come” and “Building a better mousetrap”.&#160; What can I say, SEO isn’t a skill of mine. I needed a hobby project that was a thought experiment (which is my caveat for all my bad architectural decisions) that could go somewhere.&#160; That wasn’t just [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=188&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Other titles I thought of included “If you build it, they will come” and “Building a better mousetrap”.&#160; What can I say, SEO isn’t a skill of mine.</p>
<p>I needed a hobby project that was a thought experiment (which is my caveat for all my bad architectural decisions) that could go somewhere.&#160; That wasn’t just a name and a few lines of half-finished code.&#160; Something that I could take on a laptop to job interviews in the future and say “No, I can’t actually work out an algorithm on the spot that calculates the distance in yards from London to Calais, but look at this neat thing I’ve done…”.&#160; Not that I’m looking for work right now, but it’s good to have something to show for one’s skills that one owns the IPR to.</p>
<p>Amongst other things, I wanted to try ASP.NET MVC (which was v1 at the time), jQuery and Linq to SQL (I know it’s out of date now, but I have my reasons…).</p>
<p>I decided to be different, and write a bug-tracking system.&#160; My motivation came in the form of difficulties using FogBugz at work.&#160; FogBugz is very capable, but only if you use it the way the guys at Fog Creek expect you to – which means conforming to the way they think bug tracking should be done.&#160; We’re trying to use it in a different process than it was designed for, and it’s caused friction.&#160; Being the jumped-up know-it-all that I am, I thought I could do better (well, different) so, full of Great Ideas, I started planning.</p>
<p>This was many months ago.&#160; I’ve put quite a few hours in here and there.&#160; Probably a few weeks FTE.</p>
<p>Then yesterday I deleted much of the code I’ve written.&#160; I’ve kept infrastructure stuff (like ASP.NET Membership providers – yuck!), but basically this is a re-write of what little I’d actually managed to create.</p>
<p>I’ve learnt much with my tinkering over the last year, but now I’m going to give it a proper go.&#160; Hopefully this may even end up as something we can use at work.&#160; It’s called “Workflo”.&#160; Yes, I know that name exists but I have a project codename to put it under and “Buggr” just didn’t seem appropriate.&#160; It has few key features:</p>
<ol>
<li>A fully-customisable workflow.&#160; Not using MS Workflow Foundation, but something home-grown (it’s a thought-experiment, see).</li>
<li>Estimates and time-tracking <strong>per status</strong>.&#160; So developers estimate the development, testers estimate the testing, etc etc.&#160; Then you see how long those things actually took and do amazing reports like how good people are at estimating, either for themselves or on behalf of others, and break down how much effort goes into testing vs. actual coding.</li>
</ol>
<p>That’s kind of it, for now.&#160; I have lots of wonderful ideas floating around, and the plan is to use this blog to chronicle the various design decisions and implementation tribulations as they happen.&#160; Hopefully I will learn something, even better would be to teach something.&#160; We’ll see.&#160; I’ve got a little more re-jigging to do, and then I’ll be posting the code on Codeplex.</p>
<p>Wish me luck!</p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a> Tagged: <a href='http://koder.wordpress.com/tag/workflo/'>workflo</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/188/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/188/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/188/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=188&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2011/01/11/yet-another-bug-tracking-system/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>
	</item>
		<item>
		<title>Poor man&#8217;s KVM</title>
		<link>http://koder.wordpress.com/2010/08/05/poor-mans-kvm/</link>
		<comments>http://koder.wordpress.com/2010/08/05/poor-mans-kvm/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 19:08:12 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2010/08/05/poor-mans-kvm/</guid>
		<description><![CDATA[I have two PCs but one keyboard and monitor. Rather than shell out for a KVM, I plugged each PC into a different port on the monitor, and use the menu to switch between them. For the keyboard I put a USB extension lying on the floor near the main PC, and I just get [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=182&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have two PCs but one keyboard and monitor. Rather than shell out for a KVM, I plugged each PC into a different port on the monitor, and use the menu to switch between them.</p>
<p>For the keyboard I put a USB extension lying on the floor near the main PC, and I just get on my knees to swop the keyboard between it and the back of the main PC.</p>
<p>I don&#8217;t need to do this too often, so it works quite well enough for me. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/182/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/182/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/182/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=182&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2010/08/05/poor-mans-kvm/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>
	</item>
		<item>
		<title>Unit testing with DateTime.Now</title>
		<link>http://koder.wordpress.com/2010/07/05/unit-testing-with-datetime-now/</link>
		<comments>http://koder.wordpress.com/2010/07/05/unit-testing-with-datetime-now/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 10:29:49 +0000</pubDate>
		<dc:creator>Neil Barnwell</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">https://koder.wordpress.com/2010/07/05/unit-testing-with-datetime-now/</guid>
		<description><![CDATA[Unit testing time sensitive code can be tricky because unit tests should be 100% repeatable, and the same each time.&#160; The system clock will never be the same each time the test is run, so it’s difficult to assert time-dependant values. This has been talked about before.&#160; Probably most notably by Ayende on “Dealing with [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=175&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Unit testing time sensitive code can be tricky because unit tests should be 100% repeatable, and the same each time.&#160; The system clock will never be the same each time the test is run, so it’s difficult to assert time-dependant values.</p>
<p>This has been <a href="http://www.google.co.uk/search?q=unit+testing+current+time" target="_blank">talked about before</a>.&#160; Probably most notably by <a href="http://ayende.com/Blog/archive/2008/07/07/Dealing-with-time-in-tests.aspx" target="_blank">Ayende on “Dealing with time in tests”</a>.&#160; However I have a slightly different take on the situation.</p>
<p>Sometimes you have code that <strong>depends on the time moving on</strong>, so a static clock with a fixed time value is of no use (say for example generating some unique key values based partly on the current time).</p>
<p>What I want is at the top of a test to “start the clock” once, where it will then continue to act like a clock from then on.&#160; I solved this problem as many people do – by providing a layer of abstraction from the system clock:</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:35867477-59ef-4981-b01f-0d5112330df0" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:500px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">interface</span> <span style="color:#2b91af;">IDateTimeProvider</span><br /> {<br />     <span style="color:#2b91af;">DateTime</span> Now { <span style="color:#0000ff;">get</span>; }<br /> }  </p>
</div>
</div>
</div>
<p>The default implementation is as follows:</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:b3a43ab3-75ec-4ee0-8a9f-fc774dd61741" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:500px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">DefaultDateTimeProvider</span> : <span style="color:#2b91af;">IDateTimeProvider</span><br /> {<br />     <span style="color:#0000ff;">public</span> <span style="color:#2b91af;">DateTime</span> Now<br />     {<br />         <span style="color:#0000ff;">get</span> { <span style="color:#0000ff;">return</span> <span style="color:#2b91af;">DateTime</span>.Now; }<br />     }<br /> }  </p>
</div>
</div>
</div>
<p>This allows classes such as this (I use Castle Windsor to wire the dependencies up when not in unit tests):</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:4b456882-55d6-4c2e-9800-0a078dc3efc6" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:500px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">MyTimeDependentService</span><br /> {<br />     <span style="color:#0000ff;">public</span> <span style="color:#2b91af;">IDateTimeProvider</span> DateTimeProvider { <span style="color:#0000ff;">get</span>; <span style="color:#0000ff;">set</span>; }</p>
<p>     <span style="color:#0000ff;">public</span> MyTimeDependentService()<br />         : <span style="color:#0000ff;">this</span>(<span style="color:#0000ff;">new</span> <span style="color:#2b91af;">DefaultDateTimeProvider</span>())<br />     {<br />     }</p>
<p>     <span style="color:#0000ff;">public</span> MyTimeDependentService(<span style="color:#2b91af;">IDateTimeProvider</span> dateTimeProvider)<br />     {<br />         DateTimeProvider = dateTimeProvider;<br />     }</p>
<p>     <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">void</span> MyTimeDependentMethod()<br />     {<br />         <span style="color:#0000ff;">var</span> now = DateTimeProvider.Now;<br />         <span style="color:#008000;">// Do stuff with the current time.</span><br />     }<br /> \ </p>
</div>
</div>
</div>
<p>It’s a bit more heavy-handed than Ayende’s solution, but the treacle is in the implementation of the <strong>test</strong> datetime provider:</p>
<div style="padding:5px;" id="scid:9ce6104f-a9aa-4a17-a79f-3a39532ebf7c:ce098774-4bce-4af3-9ad5-f2b93e9de0c3" class="wlWriterEditableSmartContent">
<div style="border:#000080 1px solid;font-family:'Courier New', Courier, Monospace;font-size:10pt;">
<div style="background-color:#ffffff;max-height:500px;overflow:scroll;white-space:nowrap;padding:2px 5px;">
<p>  <span style="color:#0000ff;">public</span> <span style="color:#0000ff;">class</span> <span style="color:#2b91af;">TestDateTimeProvider</span> : <span style="color:#2b91af;">IDateTimeProvider</span><br /> {<br />     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">readonly</span> <span style="color:#2b91af;">DateTime</span> initial;<br />     <span style="color:#0000ff;">private</span> <span style="color:#0000ff;">readonly</span> <span style="color:#2b91af;">DateTime</span> created = <span style="color:#2b91af;">DateTime</span>.Now;</p>
<p>     <span style="color:#0000ff;">public</span> TestDateTimeProvider(<span style="color:#2b91af;">DateTime</span> initial)<br />     {<br />         <span style="color:#0000ff;">this</span>.initial = initial;<br />     }</p>
<p>     <span style="color:#0000ff;">public</span> <span style="color:#2b91af;">DateTime</span> Now<br />     {<br />         <span style="color:#0000ff;">get</span> { <span style="color:#0000ff;">return</span> initial + (<span style="color:#2b91af;">DateTime</span>.Now &#8211; created); }<br />     }<br /> }  </p>
</div>
</div>
</div>
<p>The big win here is that you can set the “start time” of the test.&#160; As long as you assert the current values of the datetime provider etc against the results of the method calls, you should be okay.&#160; I realise there could be inconsistencies depending on how long the tests take to run etc, but a lot of that can be mitigated by being careful obtaining the time only once at the top of a method and referring back to it each time as in my example.</p>
<p>HTH. <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br />Filed under: <a href='http://koder.wordpress.com/category/general/'>General</a>  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/koder.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/koder.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/koder.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/koder.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/koder.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/koder.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/koder.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/koder.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/koder.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/koder.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/koder.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/koder.wordpress.com/175/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/koder.wordpress.com/175/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/koder.wordpress.com/175/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=koder.wordpress.com&amp;blog=693573&amp;post=175&amp;subd=koder&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://koder.wordpress.com/2010/07/05/unit-testing-with-datetime-now/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fac42e3f137bfe0f34b8493c41d28f9e?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">Neil Barnwell</media:title>
		</media:content>
	</item>
	</channel>
</rss>
