<?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/"
	>

<channel>
	<title>james mckay dot net &#187; Miscellany</title>
	<atom:link href="http://jamesmckay.net/categories/miscellany/feed/" rel="self" type="application/rss+xml" />
	<link>http://jamesmckay.net</link>
	<description>because there are few things that are less logical than business logic</description>
	<lastBuildDate>Sat, 10 Jul 2010 07:08:39 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Some notes on upgrading to Mercurial 1.6 with hgsubversion</title>
		<link>http://jamesmckay.net/2010/07/some-notes-on-upgrading-to-mercurial-1-6-with-hgsubversion/</link>
		<comments>http://jamesmckay.net/2010/07/some-notes-on-upgrading-to-mercurial-1-6-with-hgsubversion/#comments</comments>
		<pubDate>Mon, 05 Jul 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[hgsubversion]]></category>
		<category><![CDATA[Mercurial]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/07/some-notes-on-upgrading-to-mercurial-1-6-with-hgsubversion/</guid>
		<description><![CDATA[I encountered a few wrinkles when I upgraded to Mercurial 1.6/TortoiseHg 1.1 on Friday. These were entirely due to the hgsubversion extension—an essential part of my toolkit these days, since it upgrades the experience of working with Subversion from “infuriating” to “tolerable.” First, you should clone or pull the latest version of hgsubversion and update [...]]]></description>
			<content:encoded><![CDATA[<p>I encountered a few wrinkles when I upgraded to Mercurial 1.6/TortoiseHg 1.1 on Friday. These were entirely due to the <a href="http://bitbucket.org/durin42/hgsubversion">hgsubversion</a> extension—an essential part of my toolkit these days, since it upgrades the experience of working with Subversion from “infuriating” to “tolerable.”</p>
<p>First, you should clone or pull the latest version of hgsubversion and update it to tip before you upgrade Mercurial. This is due to breaking changes in Mercurial’s internal API after hgsubversion 1.1 was released.</p>
<p>Second, there is <a href="http://bitbucket.org/durin42/hgsubversion/issue/187/new-pushable-bookmark-feature-in-hg-16-breaks">a bug in hgsubversion</a>, again due to breaking changes in the Mercurial API, that results in an exception when it is used with the bookmarks extension in version 1.6. I have implemented <a href="http://bitbucket.org/jammycakes/hgsubversion/changeset/4375d37fea1e">a fix for this</a> in <a href="http://bitbucket.org/jammycakes/hgsubversion">my own fork of hgsubversion</a>, though at the time of writing this hasn’t yet made it back into the official repo.</p>
<p><em>(</em><strong><em>Update:</em></strong><em> this fix has now been merged into hgsubversion 1.2.2.)</em></p>
<p>Apart from that, everything seems to work reasonably enough. My initial tests seem to indicate that hg-git works fine with Mercurial 1.6. TortoiseHg 1.1 comes with Dulwich 0.6.0, so you can now safely update hg-git to the latest stable version (0.2.2) or to tip if you’re that way inclined.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/07/some-notes-on-upgrading-to-mercurial-1-6-with-hgsubversion/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Just how smart is Git?</title>
		<link>http://jamesmckay.net/2010/06/just-how-smart-is-git/</link>
		<comments>http://jamesmckay.net/2010/06/just-how-smart-is-git/#comments</comments>
		<pubDate>Mon, 28 Jun 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Mercurial]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/06/just-how-smart-is-git/</guid>
		<description><![CDATA[The merge algorithms in distributed source control are a vast improvement on Subversion, which falls over on all but the simplest cases, but contrary to the claims of some, they are not omniscient. For example, it is commonly believed that Git can track functions being moved from one file to another, and merge in the [...]]]></description>
			<content:encoded><![CDATA[<p>The merge algorithms in distributed source control are a vast improvement on Subversion, which falls over on all but the simplest cases, but contrary to the claims of some, they are not omniscient.</p>
<p>For example, it is commonly believed that Git can track functions being moved from one file to another, and merge in the changes appropriately. It’s a plausible claim—I’m pretty sure that such a merge algorithm is doable—and it would also be particularly useful, since it would open up several more possibilities for the kind of refactoring that you can manage in a distributed workflow with parallel work streams.</p>
<p>Of course, this is very easy to test, so on Friday evening, I decided to test it.</p>
<p>I loaded the code for the latest version of my <a href="http://jamesmckay.net/code/comment-timeout/">Comment Timeout</a> WordPress plugin into a new git repository and created a branch called Alice. I then edited the file class.post-processor.php to add a comment in the constructor, and checked it in.</p>
<p>I then switched back to the original version and created a branch called Bob. I cut the constructor from class.post-processor.php and pasted it into class.comment-processor.php, and checked the resulting changes into Bob. I then attempted to merge Alice and Bob.</p>
<p>Lo and behold, I got a merge conflict.</p>
<p>Both Git and Mercurial support a merge-over-rename scenario which Subversion doesn’t: if Alice makes some edits to foo.txt and Bob renames it to bar.txt, Alice’s changes to foo.txt will be correctly merged into Bob’s bar.txt. I haven’t done any more exhaustive testing than that, but I suspect that Git and Mercurial have overall roughly similar merging capabilities, though undoubtedly there will be some edge cases that one handles that the other doesn’t, and vice versa.</p>
<p>It seems that the biggest difference is that Git uses various heuristics to automatically detect file renames, whereas Mercurial expects the user to flag them explicitly. Which approach is better is controversial, but Mercurial users who prefer Git’s behaviour in this respect may be interested in <a href="http://bitbucket.org/jammycakes/autorename">this experimental extension</a> to detect and register obvious renames at commit time which I knocked together over the weekend.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/06/just-how-smart-is-git/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Phone faux pas</title>
		<link>http://jamesmckay.net/2010/06/phone-faux-pas/</link>
		<comments>http://jamesmckay.net/2010/06/phone-faux-pas/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 19:56:04 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[commuting]]></category>
		<category><![CDATA[mobile phones]]></category>
		<category><![CDATA[social skills]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/06/phone-faux-pas/</guid>
		<description><![CDATA[This blog entry is directed at two individuals in particular. Probably neither of them read my blog though, but those of you who do should take great care not to emulate either of them. First, to the gentleman who was at the rear of the central section of coach number eight in the 18:32 Southern [...]]]></description>
			<content:encoded><![CDATA[<p>This blog entry is directed at two individuals in particular. Probably neither of them read my blog though, but those of you who do should take great care not to emulate either of them.</p>
<p>First, to the gentleman who was at the rear of the central section of coach number eight in the 18:32 Southern train from London Victoria to Southampton Central and Bognor Regis this evening, who got off at Three Bridges.</p>
<p>Your favourite TV programme as a child may have been <a rel="nofollow" href="http://en.wikipedia.org/wiki/Top_Cat">Top Cat</a>. Your favourite TV programme as a thirty-something adult may still be Top Cat. You may think it’s cool to have the Top Cat theme tune as the ringtone on your mobile phone even though you’re in your thirties or forties. But when said mobile phone starts blaring out said ringtone at full volume in a train full of tired commuters for several minutes, it gets <strong>extremely annoying.</strong> Please, choose something less ingratiating.</p>
<p>Besides, what on earth were you smoking that you slept through a ringtone like that for nearly ten minutes? It must have been pretty potent.</p>
<p>Second, to whoever rang said gentleman no less than ten times round about 7pm this evening.</p>
<p>Unless your problem is <em>genuinely</em> important and <em>genuinely</em> urgent, ringing someone’s phone repeatedly when they don’t answer the first couple of times is <strong>rude. </strong>They may not be in a position to answer, and by calling them over and over and over and over again for several minutes, you are sending out a signal that you are a demanding, obnoxious type with no respect whatsoever for other people’s personal space. Just leave a message, and if they agree that it’s important, they’ll get back to you. Besides, you could be inflicting the theme tune to Top Cat on a train carriage full of tired commuters on their way home, because the person you’re calling is too <em>non compos mentis</em> to answer.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/06/phone-faux-pas/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>TortoiseHg as a github client on Windows</title>
		<link>http://jamesmckay.net/2010/06/tortoisehg-as-a-github-client-on-windows/</link>
		<comments>http://jamesmckay.net/2010/06/tortoisehg-as-a-github-client-on-windows/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[github]]></category>
		<category><![CDATA[hg-git]]></category>
		<category><![CDATA[Mercurial]]></category>
		<category><![CDATA[tortoisehg]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/?p=1840</guid>
		<description><![CDATA[(Update: I&#8217;ve updated these instructions for Mercurial 1.6/TortoiseHg 1.1.) I’m going to get really controversial here and say that I think Mercurial is better than git. My reasoning (as with the reasoning of everyone else who takes sides in this particular debate) is entirely subjective, so we won’t belabour the point here too much. Nevertheless, [...]]]></description>
			<content:encoded><![CDATA[<p><em>(<strong>Update:</strong> I&#8217;ve updated these instructions for Mercurial 1.6/TortoiseHg 1.1.)</em></p>
<p>I’m going to get really controversial here and say that I think Mercurial is better than git. My reasoning (as with the reasoning of everyone else who takes sides in this particular debate) is entirely subjective, so we won’t belabour the point here too much. Nevertheless, some of us do have a preference for one over the other, and many Subversion refugees like me who do most of their work in Windows tend to lean towards Mercurial.</p>
<p>But there’s no denying that <a href="http://github.com/">github</a> is fast becoming the Facebook of open source programming (albeit hopefully without the <a href="http://www.wired.com/epicenter/2010/05/facebook-rogue/">unethical bits</a>, Farmville, and people tagging you in embarrassing photos for all and sundry to see), and if you want to strut your stuff as a developer, that’s the place to do it. Github is, of course, a hosting facility for git repositories, as one would expect of a site whose <a href="http://jamesmckay.net/2010/06/the-meaning-of-football/">name says what it means and means what it says</a>.</p>
<p>Fortunately, it is quite possible to use Mercurial as a client against github repositories via the <a href="http://hg-git.github.com/">hg-git extension</a>, and you can pull and push from one to the other pretty much losslessly.</p>
<p>However, setting it all up on Windows is not entirely straightforward, and there doesn’t seem to be a decent guide to it anywhere on the Internet: most of the instructions that you read assume that you’re using either (a) Linux or a Mac, (b) the command line, or (c) both. You also have to figure it out from various places all over the web, and searches on Google and Stack Overflow proved to be surprisingly fruitless. Furthermore, the most comprehensive howto that I came across elsewhere contained several instructions that were just plain wrong.</p>
<p>So, after spending two solid evenings struggling against a myriad of error messages and cryptic dialog boxes, I finally managed to get it working, and for future reference (and anyone else who wants to know how), I’ve documented what I’ve found actually works for me as best I can.</p>
<p><strong>1. Install TortoiseHg and hg-git.</strong></p>
<p>Install TortoiseHg 1.1 or later. If you are using an earlier version, upgrade: these instructions <em>may</em> work if you don’t, but I can’t make any guarantees.</p>
<p>I downloaded hg-git by cloning the repository. You can get it from either <a href="http://github.com/schacon/hg-git">github</a> and <a href="http://bitbucket.org/durin42/hg-git">Bitbucket</a>. The advantage of cloning the repository is that you can upgrade to the latest version quickly and easily by <code>hg pull</code> then <code>hg update, </code>or use the graphical tools if you prefer. You can also easily switch between the bleeding edge version of the code and a stable release if you like.</p>
<pre name="code" class="text">hg clone http://bitbucket.org/durin42/hg-git c:\abc\mercurial\hg-git</pre>
<p>I downloaded hg-git into the directory <code>c:\abc\mercurial\hg-git</code>. If you put it elsewhere in your filespace, alter these instructions to suit.</p>
<p><strong>2. Update to the appropriate version of hg-git.</strong></p>
<p>If you are using TortoiseHg 1.1, you will need to use hg-git 0.2.3. If you ignored my advice to upgrade, and are still using version 1.0, you will need to use hg-git 0.2.1. Don&#8217;t use version 0.2.2: it doesn&#8217;t work with either version of TortoiseHg.</p>
<p>The official hg-git documentation tells us that we also need to download and install <a href="http://samba.org/~jelmer/dulwich/">Dulwich</a> 0.4.0 or later. The latest version of hg-git requires Dulwich 0.6.0. In any case, Dulwich is included with TortoiseHg (version 0.6.0 with TortoiseHg 1.1; version 0.5.0 with TortoiseHg 1.0) so you don&#8217;t need to do anything else there. Open up the TortoiseHg repository explorer on your clone of hg-git, choose the “Tagged” radio button to show only tagged releases, and update to version 0.2.3:</p>
<div style="text-align: center;"><img style="display: inline; border: 0px;" title="image" src="http://jamesmckay.net/wp-content/uploads/2010/07/image.png" border="0" alt="image" width="554" height="492" /></div>
<p><strong>3. Configure Mercurial to use hg-git and an appropriate SSH client.</strong></p>
<p>To do this, you need to edit your mercurial.ini file. You can get to this simply by choosing “Global Settings” on the TortoiseHg context menu in Windows Explorer, and clicking “Edit file” to bring it up in Notepad. Add the following lines to your configuration file:</p>
<pre name="code" class="text">[extensions]
hggit = C:\abc\mercurial\hg-git\hggit

[ui]
ssh = "C:\Program Files\TortoiseHg\TortoisePlink.exe"</pre>
<p>The <code>[extensions]</code> section loads hg-git into Mercurial; the ssh option in the <code>[ui]</code> section specifies an SSH command line client to use to communicate with github. TortoiseHg gives us TortoisePlink, which works fine for me.</p>
<p><strong>4. Create a public key/private key pair.</strong></p>
<p>There are some <a href="http://help.github.com/msysgit-key-setup/">instructions on github</a> on how to create a public key/private key pair. Unfortunately, these don’t tell you that key pairs come in two formats: OpenSSH (as used by git itself and github), and PuTTY (as used by Tortoise Everything).</p>
<p>A simpler approach is to download PuTTY (you can get it from <a href="http://www.chiark.greenend.org.uk/~sgtatham/putty/">here</a>) and use PuTTYgen to generate your key pair:</p>
<div style="text-align: center;"><img style="border-style: none;" src="http://jamesmckay.net/wp-content/uploads/2010/06/image2.png" alt="PuTTYgen screenshot" width="497" height="481" /></div>
<p>Once you have generated your SSH key, copy and paste the “Public key for pasting into OpenSSH authorized_keys file” into github. Save your public key and private key to your hard disk somewhere.</p>
<p><strong>5. Start Pageant</strong></p>
<p>Pageant is a program that stores all your private keys in memory, where the SSH client used by Mercurial, that we configured above, can find them. It comes with both PuTTY and TortoiseHg. You can set it to load in your private key(s) when you log on to Windows by creating a new shortcut in the Startup folder of your Start menu with this command:</p>
<pre name="code" class="txt">"C:\Program Files\TortoiseHg\Pageant.exe" "c:\abc\github.ppk"</pre>
<p>Note that if you don’t start Pageant first and load in your private key, you will not be able to push to github.</p>
<p><strong>6. Clone a repository and start pushing!</strong></p>
<p>You should make sure that you get the format of your repository URL correct. It should be:</p>
<pre name="code" class="txt">git+ssh://git@github.com/your-github-username/your-repo-name.git</pre>
<p>The rest from there on is all plain sailing. All being well, you should now be able to pull from your github repository and push changes back up as if it were a Mercurial repository.</p>
<p><strong>Things to check if it goes wrong.</strong></p>
<p>Now all this is a bit of a fiddly process, there is plenty of room for error, and some of the error messages you are likely to get can be a little bit cryptic. However, most of it was due to me trying things that weren’t properly documented, and they all boiled down to a few things that you can check if you&#8217;ve followed the above instructions:</p>
<ul>
<li>Are you using the correct version of hg-git? While you can use versions later than 0.2.1, you need to use a later version of Dulwich than that which comes with TortoiseHg 1.0.</li>
<li>The &#8220;<code>ssh</code>&#8221; option in your mercurial.ini file should only specify the name of the executable, without command line options. Some articles tell you that you can fill in the path to your private key in this option. Personally, I couldn’t get this to work, so I just stuck with Pageant.</li>
<li>Is Pageant running?</li>
<li>Is your private key loaded into Pageant?</li>
<li>Do your public and private keys match?</li>
<li>Is your private key saved in PuTTY format? If you generated your key pair using git, as per the instructions on github, it will be saved in OpenSSH format instead, and Pageant can’t handle that.<sup>1</sup></li>
<li>Have you specified the URL to your github repository correctly? The version I gave above works, while missing out various parts of the URL (e.g. using &#8220;<code>github.com</code>&#8221; instead of &#8220;<code>git@github.com</code>&#8220;) doesn&#8217;t.</li>
</ul>
<div class="footnotes">
<sup>1</sup> You can tell the difference between a PuTTY private key and an OpenSSH private key by opening them in Notepad. An OpenSSH private key will start off looking like this:</p>
<pre name="code" class="text">
-----BEGIN RSA PRIVATE KEY-----
&lt;transmission line noise&gt;
-----END RSA PRIVATE KEY-----
</pre>
<p>whereas a PuTTY private key will look like this:</p>
<pre name="code" class="text">
PuTTY-User-Key-File-2: ssh-rsa
Encryption: none
Comment: imported-openssh-key
Public-Lines: 6
&lt;transmission line noise&gt;
Private-Lines: 14
&lt;transmission line noise&gt;
Private-MAC:
&lt;transmission line noise&gt;
</pre>
</div>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/06/tortoisehg-as-a-github-client-on-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Someone must be wrong about solar weather</title>
		<link>http://jamesmckay.net/2010/06/someone-must-be-wrong-about-solar-weather/</link>
		<comments>http://jamesmckay.net/2010/06/someone-must-be-wrong-about-solar-weather/#comments</comments>
		<pubDate>Thu, 17 Jun 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[science]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/06/someone-must-be-wrong-about-solar-weather/</guid>
		<description><![CDATA[The Daily Telegraph reliably informs us that we should expect the mother of all solar storms in 2013, which will unleash power cuts, the apocalypse, and Visual SourceSafe on us all. New Scientist, meanwhile, reliably informs us that not only is the sun unusually quiet at the moment, with its current solar minimum carrying on [...]]]></description>
			<content:encoded><![CDATA[<p>The Daily Telegraph <a href="http://www.telegraph.co.uk/science/space/7819201/Nasa-warns-solar-flares-from-huge-space-storm-will-cause-devastation.html">reliably informs us</a> that we should expect the mother of all solar storms in 2013, which will unleash power cuts, the apocalypse, and Visual SourceSafe on us all.</p>
<p>New Scientist, meanwhile, <a href="http://www.newscientist.com/article/mg20627640.800-whats-wrong-with-the-sun.html">reliably informs us</a> that not only is the sun unusually quiet at the moment, with its current solar minimum carrying on much longer than normal, but that it could possibly remain that way for much of the rest of the 21st century.</p>
<p>One of them must be wrong.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/06/someone-must-be-wrong-about-solar-weather/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Productivity suggestion: put your unit tests in the same project as your production code</title>
		<link>http://jamesmckay.net/2010/06/productivity-suggestion-put-your-unit-tests-in-the-same-project-as-your-production-code/</link>
		<comments>http://jamesmckay.net/2010/06/productivity-suggestion-put-your-unit-tests-in-the-same-project-as-your-production-code/#comments</comments>
		<pubDate>Mon, 14 Jun 2010 07:00:08 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[unit testing]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/?p=1815</guid>
		<description><![CDATA[I’ve been doing a bit of work with Django again over the weekend. One of the things I like about Django is that you put your unit tests in the same directory as your models and views in a file called tests.py. Because this sits just next to your production code, it makes writing unit [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been doing a bit of work with Django again over the weekend. One of the things I like about Django is that you put your unit tests in the same directory as your models and views in a file called <code>tests.py</code>. Because this sits just next to your production code, it makes writing unit tests a very natural and easy way of working.</p>
<p>This is in complete contrast to the way things are done in .NET, where most developers put their unit tests in a separate project, preferring instead to provide a separation of concerns and keep the size of their build output down.</p>
<p>The problem with that is it&#8217;s a complete faff. Because your unit tests end up in a totally different part of your solution to the code they are testing, you have to navigate all over the place through the solution explorer to get between two files that you should really be working with together all the time. It&#8217;s like trying to cook a meal when your fridge freezer is in the garage, the oven is in the attic, and the kitchen sink is in the basement.</p>
<p>I personally find this makes me write fewer unit tests than I otherwise would. That is <strong>bad.</strong></p>
<p>The other problem is that it’s much more difficult to unit test your assembly’s internal classes. You can of course use the <code>[InternalsVisibleTo]</code> attribute to expose them to your test assembly though, but even so it’s a little bit awkward. Additionally, since you have an extra project in your solution, it takes longer to load into Visual Studio, and longer to build. On a large solution with a lot of projects, it can get very sluggish indeed.</p>
<p>The argument against putting test code in the same assembly as production code is of course that you don&#8217;t want to bloat your release build. However, it&#8217;s perfectly possible to get round this by wrapping your test classes in conditional (<code>#if</code>) compiler directives. It is even possible &#8212; in fact, it&#8217;s surprisingly easy &#8212; to knock out the references to test framework assemblies such as Gallio, MbUnit, Moq, and so on from release builds. You can&#8217;t do it directly from the Visual Studio IDE, but if you open up your .csproj file itself in a text editor you can add a <code>Condition</code> attribute to the references you want to omit. For example, this code would omit the MbUnit assembly from your Release configuration, while including it in your Debug configuration (and any other configurations you may have):</p>
<pre name="code" class="xml">
&lt;Reference
    Include="MbUnit, Version=3.1.0.0,
        Culture=neutral, PublicKeyToken=eb9cfa67ee6ab36e,
        processorArchitecture=MSIL"
    Condition="'$(Configuration)' != 'Release'" /&gt;
</pre>
<p>What do you think, readers? Are there any other <strong>good</strong> reasons why you shouldn&#8217;t do this? Personally, I can&#8217;t think of any.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/06/productivity-suggestion-put-your-unit-tests-in-the-same-project-as-your-production-code/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The meaning of football</title>
		<link>http://jamesmckay.net/2010/06/the-meaning-of-football/</link>
		<comments>http://jamesmckay.net/2010/06/the-meaning-of-football/#comments</comments>
		<pubDate>Fri, 11 Jun 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[definitions]]></category>
		<category><![CDATA[football]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/06/the-meaning-of-football/</guid>
		<description><![CDATA[It’s World Cup time again. For the next few weeks, a certain sport will be celebrated, broadcast, and grossly over-hyped worldwide 24 hours a day by all and sundry. It is to this particular game that the word “football” refers. Not, as they seem to think on the other side of the Atlantic, to some [...]]]></description>
			<content:encoded><![CDATA[<p>It’s World Cup time again. For the next few weeks, a certain sport will be celebrated, broadcast, and grossly over-hyped worldwide 24 hours a day by all and sundry.</p>
<p>It is to this particular game that the word “football” refers. Not, as they seem to think on the other side of the Atlantic, to some pretender to the name.</p>
<p>This one should be a no-brainer. Since the word “football” is a combination of the words “foot” and “ball,” logically it should be used to describe the game that involves the greatest amount of direct interaction between foot and ball. Running around with a vaguely haggis-shaped object under your arm just doesn’t quite cut it somehow, unless you reject the idea that words should say what they mean and mean what they say.</p>
<p>Perhaps in the interests of semantic integrity, we should rename American football to something like “arm haggis.” It’s more of a mouthful, and might confuse people into thinking it’s Scottish, but even so it’s a more accurate description of their particular sport than “football.”</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/06/the-meaning-of-football/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Is Facebook really as essential as it&#8217;s made out to be?</title>
		<link>http://jamesmckay.net/2010/06/is-facebook-really-as-essential-as-its-made-out-to-be/</link>
		<comments>http://jamesmckay.net/2010/06/is-facebook-really-as-essential-as-its-made-out-to-be/#comments</comments>
		<pubDate>Fri, 04 Jun 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[Diaspora]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/06/is-facebook-really-as-essential-as-its-made-out-to-be/</guid>
		<description><![CDATA[My brother thought that my decision to quit Facebook was just me getting caught up in the hype about Quit Facebook Day. This wasn’t actually true: I’d been mulling it over for several months, and just looking for the right time to do so. I announced my intention as a status update on Facebook about [...]]]></description>
			<content:encoded><![CDATA[<p>My brother thought that my <a href="http://jamesmckay.net/2010/05/you-have-till-monday-to-talk-me-out-of-quitting-facebook/">decision to quit Facebook</a> was just me getting caught up in the hype about Quit Facebook Day. This wasn’t actually true: I’d been mulling it over for several months, and just looking for the right time to do so. I announced my intention as a status update on Facebook about nine days ago, and finally pulled the plug on my account on Sunday after I got home from church, a day earlier than I’d intended.</p>
<p>What happened in the end? The silence has been deafening. No-one commented, no-one e-mailed, no-one phoned me up, no-one tried to persuade me that I’d been <a href="http://www.codinghorror.com/blog/2007/06/avoiding-walled-gardens-on-the-internet.html">reading too much Jeff Atwood</a>, no-one questioned my decision. This is not what I expected at all. I’d expected a string of wall posts trying to talk me out of it, people asking me what had happened, discussing among themselves what I was doing, speculation about whether someone had offended me, or whatever. Perhaps a few specially sharpened Bible verses reminding me that Jesus commands us to love one another. Isn’t quitting Facebook tantamount to social suicide? For that reason, I decided merely to deactivate my account rather than delete it outright, so that if things did go that way, I could always return. But after nearly a week, they haven’t.</p>
<p>The only conclusions I could draw from this were that either (a) people don’t really care about me, or (b) people don’t really care about Facebook. The more people I speak to, the more I come to the conclusion that it’s the latter rather than the former. This kind of makes sense. While the majority of my friends have Facebook accounts, a large percentage of them don’t, and of those who do, many of them seem to make very little use of it. Some of them, I just never got round to linking up with on the site, but I’m still friends with them in Real Life.</p>
<p>All in all, I’m far from convinced that Facebook is the &#8220;must-have&#8221; that the press make it out to be. In fact, it’s probably more of a &#8220;nice to have.&#8221; We&#8217;re told that it has <a href="http://www.pcworld.com/article/197515/quit_facebook_day_looks_like_a_hard_sell.html">five hundred million &#8220;fans&#8221;</a> &#8212; but if up to <a href="http://www.v3.co.uk/vnunet/news/2227649/facebook-flooded-fake-profiles">forty percent of these &#8220;fans&#8221; are fake accounts</a>, created by spammers and virus writers to distribute malware, and over fifty percent of the remainder are only occasional users or even dormant accounts, it doesn&#8217;t sound quite so impressive.</p>
<p>I’m hoping that the <a href="http://www.joindiaspora.com/">Diaspora project</a> lives up to its promises. It’s a tall order, but done right, a distributed social network, where you install the software and you manage your online relationships, rather than handing them over to commercial interests, could be quite promising. By being distributed in nature, you avoid the pitfalls of a centralised social network which would put you at risk by changing the rules of the game at a whim. If they make it GPL and put it on github, it would be a guarantee against them turning nasty, since if they did, other developers would be able to come along, fork it, and release a version of their own that you could trust. Of course, in order to compete against Facebook, they need to pull out all the stops in terms of usability. After all, if it’s to be successful in that respect, they will need to pitch it first and foremost to not-computer people.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/06/is-facebook-really-as-essential-as-its-made-out-to-be/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>You have till Monday to talk me out of quitting Facebook</title>
		<link>http://jamesmckay.net/2010/05/you-have-till-monday-to-talk-me-out-of-quitting-facebook/</link>
		<comments>http://jamesmckay.net/2010/05/you-have-till-monday-to-talk-me-out-of-quitting-facebook/#comments</comments>
		<pubDate>Thu, 27 May 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[Facebook]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/05/you-have-till-monday-to-talk-me-out-of-quitting-facebook/</guid>
		<description><![CDATA[Monday 31 May is Quit Facebook Day, and I have decided to do just that. Over the past few months I’ve been getting more and more fed up with Facebook. I’ve been watching their approach to privacy and respect (or lack of it) for their users’ data with dismay, and it’s reached the point at [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.quitfacebookday.com/">Monday 31 May is Quit Facebook Day</a>, and I have decided to do just that.</p>
<p>Over the past few months I’ve been getting more and more fed up with Facebook. I’ve been watching their approach to privacy and respect (or lack of it) for their users’ data with dismay, and it’s reached the point at which my distrust of the site has gone critical. Yes, they’re making noises that they’re going to simplify your privacy settings, but I am just not in the slightest bit convinced. I wouldn’t be surprised if this is a case of making the minimum concessions they can get away with to get some good PR and keep various random governments off their backs, then start pushing it up again once the dust settles.</p>
<p>You know these applications that you get, telling you things like what Star Wars character you are, or your Myers-Briggs type? The ones where you have to add them to your profile just to see what your friend’s answer was? They aren’t built by Facebook themselves but by third parties, who, for all I know, could have their servers in some country where data protection laws are nonexistent and the Mafia run the government. And the amount of personal data that they can get their mitts on through the Facebook developer API is downright scary.</p>
<p><a href="http://mattmckeon.com/facebook-privacy/">It’s been a complete bait-and-switch</a>. When Facebook first started, its big selling point was that it was all private: unless you were friends with someone, you couldn’t see anything on their profiles except their list of friends, and in some cases not even that. Nowadays, you can click through to almost anyone you like on Facebook and you can see everything they’ve posted and everything that everyone else has posted about them, including those embarrassing photos of them at a party several years ago. Complete strangers. I find that creepy.</p>
<p>I have of course locked down my account as far as I can, but I don’t even trust them with that any more—and of course, even with their new “simplified” privacy settings, there are still <a href="http://lifehacker.com/5548375/a-guide-to-facebooks-new-simpler-privacy-controls">things that they force you to make public</a>. That’s why, a couple of weeks ago, I deleted almost everything from my Facebook profile and left every group that I was a member of. I stopped short of unfriending everybody: that’s the last step I’ll take before actually closing my account.</p>
<p>For those of you who want to keep in touch with me, I will still be online, just in different places: e-mail, my blog, <a href="http://uk.linkedin.com/in/jammycakes">LinkedIn</a>, and for the geeks among you, <a href="http://github.com/jammycakes">github</a> and <a href="http://stackoverflow.com/users/886/jammycakes">Stack Overflow</a>. I’m also going to start using <a href="http://twitter.com/jammycakes">Twitter</a> again: I closed down my Twitter account a couple of months back for different reasons that I won’t go into here, but I recently re-opened it, and I’ll probably start making a bit more use of it. I don’t have the same objections to Twitter as I do to Facebook: it may be public but it doesn’t pretend to be otherwise, and it’s nice and simple, only demanding a bare minimum amount of personal information. I’m not sure quite how much I’ll use it in the end, and I can’t guarantee that it won’t be a complete geek-out, but if you think you’ll miss me from Facebook, it’s there as an alternative.</p>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/05/you-have-till-monday-to-talk-me-out-of-quitting-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introductory videos on IOC containers</title>
		<link>http://jamesmckay.net/2010/05/introductory-videos-on-ioc-containers/</link>
		<comments>http://jamesmckay.net/2010/05/introductory-videos-on-ioc-containers/#comments</comments>
		<pubDate>Mon, 10 May 2010 07:00:00 +0000</pubDate>
		<dc:creator>James</dc:creator>
				<category><![CDATA[Miscellany]]></category>
		<category><![CDATA[dependency injection]]></category>
		<category><![CDATA[IoC]]></category>

		<guid isPermaLink="false">http://jamesmckay.net/2010/05/introductory-videos-on-ioc-containers/</guid>
		<description><![CDATA[Dependency injection is one of those concepts in computer programming that looks weird and complex when you don’t understand it, but once you do, you wonder how you managed without it. A bit like distributed source control. Unfortunately, if you don’t understand it properly and implement it incorrectly, you can end up losing the benefits [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://martinfowler.com/articles/injection.html">Dependency injection</a> is one of those concepts in computer programming that looks weird and complex when you don’t understand it, but once you do, you wonder how you managed without it. A bit like distributed source control. Unfortunately, if you don’t understand it properly and implement it incorrectly, you can end up losing the benefits of it and end up wondering, “What was the point?”</p>
<p>For developers new to the concept, <a href="http://www.davidhayden.com/">David Hayden</a> has a series of video tutorials that provide what’s probably the best introduction to it that I’ve come across. He uses Microsoft’s Unity Container for most of his examples, but the concepts can easily be adapted for other libraries such as Ninject, Autofac, or Castle Windsor. He explains in some detail how to use them properly within both ASP.NET and WebForms, and demonstrates what kind of things they can achieve:</p>
<ul>
<li><a href="http://www.pnpguidance.net/Screencast/UnityDependencyInjectionIoCScreencast.aspx">Unity IoC and Dependency Injection Screencast</a></li>
<li><a href="http://www.pnpguidance.net/Screencast/UnityIoCASPNETScreencastDependencyInjectionWebPages.aspx">Unity IoC and ASP.NET Screencast &#8211; Dependency Injection into Web Pages</a></li>
<li><a href="http://www.pnpguidance.net/Screencast/UnityAspWebDependencyInjectionGuestsAutofacNinject.aspx">Unity and ASP.NET Web Pages Dependency Injection Part II with Special Guests &#8211; Autofac and Ninject</a></li>
<li><a href="http://www.pnpguidance.net/Post/UnityIoCASPNETMVCFrameworkDependencyInjectionControllers.aspx">Unity IoC and ASP.NET MVC Framework &#8211; Dependency Injection of Controllers</a></li>
<li><a href="http://www.pnpguidance.net/Post/UnityNestedContainersIUnityParentContainerCreateChildContainer.aspx">Unity Nested Containers &#8211; IUnityParentContainer and CreateChildContainer</a></li>
<li><a href="http://www.pnpguidance.net/Post/UnityContainerUnityConfigurationSectionAppConfigWebConfig.aspx">UnityContainer and UnityConfigurationSection &#8211; Populating Unity Container via App.config or Web.config</a></li>
<li><a href="http://www.pnpguidance.net/Post/UnityIoCDependencyInjectionASPNETModelViewPresenter.aspx">Unity IoC Dependency Injection and ASP.NET Model-View-Presenter</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://jamesmckay.net/2010/05/introductory-videos-on-ioc-containers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
