<?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>Nick Josevski</title>
	<atom:link href="http://blog.nick.josevski.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.nick.josevski.com</link>
	<description>Solving problems. Writing code. Creating new problems.</description>
	<lastBuildDate>Sat, 14 Jan 2012 12:33:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='blog.nick.josevski.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nick Josevski</title>
		<link>http://blog.nick.josevski.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://blog.nick.josevski.com/osd.xml" title="Nick Josevski" />
	<atom:link rel='hub' href='http://blog.nick.josevski.com/?pushpress=hub'/>
		<item>
		<title>Error message 800704a6 as part of creating an instance of the COM component</title>
		<link>http://blog.nick.josevski.com/2012/01/10/error-message-800704a6-as-part-of-creating-an-instance-of-the-com-component/</link>
		<comments>http://blog.nick.josevski.com/2012/01/10/error-message-800704a6-as-part-of-creating-an-instance-of-the-com-component/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 02:20:18 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[wasted-time]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1595</guid>
		<description><![CDATA[This will be a very short post, and comes from rage against Windows Server and the Windows update system. Because there were outstanding Windows Updates requiring a reboot, a particular build script of ours was falling over without suitable information as to why exactly. The cryptic error was: Creating an instance of the COM component [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1595&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This will be a very short post, and comes from rage against Windows Server and the Windows update system. Because there were outstanding Windows Updates requiring a reboot, a particular build script of ours was falling over without suitable information as to why exactly.</p>
<p>The <strong>cryptic</strong> error was:</p>
<blockquote><p>Creating an instance of the COM component with CLSID {0002DF01-0000-0000-C000-000000000046} from the IClassFactory failed due to the following error: 800704a6.</p></blockquote>
<p><strong>The <em>answer</em> (at least for us)</strong>:</p>
<h4>Reboot!</h4>
<blockquote><p>There are windows updates getting in the way of instantiating new COM objects.</p></blockquote>
<p>You&#8217;ll see a lot of people having a similar problem, not sure if reboot is the answer for them all, but make it your first step, and memorise the error code <strong>800704a6</strong>. Unable to verify this but it looks to relate to the text code of <strong>ERROR_SHUTDOWN_IS_SCHEDULED</strong>.</p>
<p>The ServerFault post that helped most:<br />
<a href="http://serverfault.com/questions/179156/ie8-script-error-800704a6">serverfault.com/q/ie8-script-error-800704a6</a></p>
<p>Stackoverflow Questions</p>
<p><a href="http://stackoverflow.com/a/8797600/75963">stackoverflow.com/watin-nunit-and-cruisecontrol-net-error-message-800704a6</a><br />
<a href="http://stackoverflow.com/q/6347640/75963">stackoverflow.com/tests-fail-sporadically-using-cruisecontrol-net-with-nunit-error-800704a6</a><br />
<a href="http://stackoverflow.com/q/4346474/75963">stackoverflow.com/setup-method-failed-while-running-tests-from-teamcity</a><br />
<a href="http://stackoverflow.com/q/6347640/75963">stackoverflow.com/tests-fail-sporadically-using-cruisecontrol-net-with-nunit-error-800704a6</a><br />
<a href="http://stackoverflow.com/a/8797717/75963">stackoverflow.com/failed-due-to-the-following-error-800704a6-while-trying-to-read-data-from-a-text-file</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1595/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1595/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1595/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1595&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/01/10/error-message-800704a6-as-part-of-creating-an-instance-of-the-com-component/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>Unit Testing JavaScript methods that contain jQuery ajax calls</title>
		<link>http://blog.nick.josevski.com/2012/01/05/unit-testing-javascript-methods-that-contain-jquery-ajax-calls/</link>
		<comments>http://blog.nick.josevski.com/2012/01/05/unit-testing-javascript-methods-that-contain-jquery-ajax-calls/#comments</comments>
		<pubDate>Thu, 05 Jan 2012 10:39:55 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[jQuery]]></category>
		<category><![CDATA[testing]]></category>
		<category><![CDATA[json]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[QUnit]]></category>
		<category><![CDATA[NQUnit]]></category>
		<category><![CDATA[Nuget]]></category>
		<category><![CDATA[ajax]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1583</guid>
		<description><![CDATA[Objective Unit test a JavaScript method which contains a $.ajax() call. Using QUnit. Details This was supposed to be a simple task, and if I didn&#8217;t have a few (now) obvious faults in my JavaScript code, it would have been completed more quickly. I have gone through several answering my own StackOverflow questions on the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1583&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>Objective</strong></p>
<p>Unit test a JavaScript method which contains a <em>$.ajax()</em> call. <em>Using QUnit</em>.</p>
<p><strong>Details</strong></p>
<p>This was supposed to be a simple task, and if I didn&#8217;t have a few (now) obvious faults in my JavaScript code, it would have been completed more quickly. I have gone through several <em>answering my own StackOverflow questions on the next day</em> here&#8217;s the <a href="http://stackoverflow.com/questions/8727347/mocking-success-method-on-jquery-ajax-call-is-not-working-as-expected/8738425#8738425">one in question</a> for the curious ones.</p>
<p>I will hide behind the excuse of it being the early days of the new year and still finding my coding groove after almost two weeks on holiday&#8230;</p>
<p>So in this post I&#8217;ll summarise the two approaches I came out with in the end. It&#8217;s two because neither worked for me first time, and in my attempt to solve the first discovered the second. In the end resolving both. I won&#8217;t bother going into much detail about <em>QUnit</em>, as there are many posts out there about it; <a href="http://net.tutsplus.com/tutorials/javascript-ajax/how-to-test-your-javascript-code-with-qunit/">here</a>, and <a href="http://lostechies.com/chadmyers/2008/08/29/getting-started-with-jquery-qunit-for-client-side-javascript-testing/">here</a> and <a href="http://litemedia.info/testdriven-development-with-javascript-and-qunit">here</a> and <a href="http://docs.jquery.com/QUnit">official documentation here</a>, and <a href="http://www.aaron-powell.com/javascript/qunit-beyond-the-browser-part-1">other</a> interesting <a href="http://www.aaron-powell.com/javascript/qunit-beyond-the-browser-part-2">things</a> to do with it.</p>
<blockquote><p>As a quick aside we use the <a href="http://nuget.org/">NuGet</a> package <a href="http://nuget.org/packages/NQUnit.NUnit">NQUnit.NUnit</a> to help us integrate QUnit into our Visual Studio projects.</p></blockquote>
<p><strong>Basic Approach</strong></p>
<p>Solution 1 &#8211; basic way as is shown on this <a href="http://stackoverflow.com/a/2126530/75963">StackOverflow answer</a></p>
<p><pre class="brush: jscript;">
// Arrange
    var options,
        jsonText = '{&quot;id&quot;: &quot;123&quot;, &quot;fieldName&quot;: &quot;fbs&quot;, &quot;data&quot;: &quot;fbs-text&quot;}',

// Set up to 'capture' the ajax call (this forms the mock)
$.ajax = function (param) {
    options = param;
};

// Act - call the method which is 'under test'
/* ... */

// Call the success (or failure) method to complete the mock of handling of the 'response'
options.success(expectedData);

// Assert - verify state of system is as expected
/* ... */
</pre></p>
<p><strong>Alternate Approach MockJax</strong></p>
<p>Solution 2 &#8211; using the <a href="https://github.com/appendto/jquery-mockjax/">MockJax library</a> with a great <a href="http://enterprisejquery.com/2010/07/mock-your-ajax-requests-with-mockjax-for-rapid-development/">walk-through on how to use it here</a>.</p>
<p>There are several advantages in using MockJax, that can be summarised as just having more control over mocking the ajax portion of the method under test, including but not limited to; timeouts, introducing latency, returning HTTP status codes.</p>
<p>After having included <em>MockJax</em> in your project, the solution 1 code gets replaced with 1 method call to <em>$.mockjax()</em> and looks like this.</p>
<p><pre class="brush: jscript;">

// Arrange 
    var jsonText = '{&quot;id&quot;: &quot;123&quot;, &quot;fieldName&quot;: &quot;fbs&quot;, &quot;data&quot;: &quot;fbs-text&quot;}';

// The call to mockjax replaces the need to overwrite the jQuery ajax() method
$.mockjax({
    url: '/Your/Regular/Action',
    dataType: 'json',
    contentType: 'application/json',
    responseText: jsonText
    }
});

// Act - call the method which is 'under test'
/* ... */

//perform test assert state of system is as expected
/* ... */
</pre></p>
<p><strong>Demonstration</strong></p>
<p>Full QUnit test code is up as a <a href="https://gist.github.com/1564578">Gist</a>.</p>
<p>Find a working copy of the code here in it&#8217;s simplest form: <a href="http://jsfiddle.net/NickJosevski/9ZZmc/4/">jsfiddle.net/NickJosevski/9ZZmc/4/</a></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1583/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1583/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1583/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1583&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2012/01/05/unit-testing-javascript-methods-that-contain-jquery-ajax-calls/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>Tweaking a VS2010 plugin to run JSLint in the command line</title>
		<link>http://blog.nick.josevski.com/2011/12/29/tweaking-a-vs2010-plugin-to-run-jslint-in-the-command-line/</link>
		<comments>http://blog.nick.josevski.com/2011/12/29/tweaking-a-vs2010-plugin-to-run-jslint-in-the-command-line/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 09:44:04 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[build-scripts]]></category>
		<category><![CDATA[continuous-integration]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[jslint]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1537</guid>
		<description><![CDATA[We&#8217;ve gone to some lengths at work to automate, and have a continuous delivery style pipeline for all things build and deployment related. It&#8217;s well on its way, but not &#8216;perfect&#8217; yet. Maybe perfection isn&#8217;t attainable, or maybe when you have a red button on the desk that when pushed does *everything*. None-the-less aiming for [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1537&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We&#8217;ve gone to some lengths at work to automate, and have a <em>continuous delivery</em> style pipeline for all things build and deployment related. It&#8217;s well on its way, but not &#8216;perfect&#8217; yet. Maybe perfection isn&#8217;t attainable, or maybe when you have a red button on the desk that when pushed does *everything*. None-the-less aiming for perfection will continue to drive us to improve.</p>
<p>So here I wanted to discuss what steps I took to get a nice JSLint Visual Studio plugin to form part of our build process. It was a bit of fussing about getting it to work, and it&#8217;s an example of still being imperfect, but for now it serves the build pipeline well enough.</p>
<p>If you don&#8217;t use <a href="http://en.wikipedia.org/wiki/JSLint">JSLint</a> for your JavaScript code, you probably should. It&#8217;s a static analysis tool to analyse and report on broken coding rules for JavaScript. Try it out on the creator (<a href="http://www.crockford.com/">Douglas Crockford&#8217;s</a>) site <a href="http://www.jslint.com/">JSLint.com</a>.</p>
<p>There is an easily accessible Visual Studio plugin called exactly what you would expect &#8220;<a href="http://jslint4vs2010.codeplex.com/">JSLint for Visual Studio 2010</a>&#8221; and here is the direct link for it on the <a href="http://visualstudiogallery.msdn.microsoft.com/961e6734-cd3a-4afb-a121-4541742b912e/">VS Gallery</a> for your installation pleasure.</p>
<p>If you do anything and stop reading here you&#8217;ve done well, install it and happy JavaScripting. </p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/12/jslintui_screenshot.png"><img src="http://nickjosevski.files.wordpress.com/2011/12/jslintui_screenshot.png?w=300&#038;h=206" alt="JSLint for Visual Studio 2010 Extension" title="JSLint for Visual Studio 2010 Extension" width="300" height="206" class="aligncenter size-medium wp-image-1573" /></a></p>
<p><strong>But what about continuous integration?</strong></p>
<p>For us it wasn&#8217;t enough, we wanted our build process which runs as <a href="http://en.wikipedia.org/wiki/Psake">psake</a> scripts to fail if JSLint rules were broken.</p>
<p>Just for a bit more completeness on the psake digression and how the command line tool will execute under MSBuild, here&#8217;s a snippet of the &#8216;targets&#8217; code that is referenced by the .csproj files that contain JavaScript. The input parameter on the executable being the directory containing the script files relative to <em>.csproj file</em>.</p>
<p><pre class="brush: xml;">
&lt;Target Name=&quot;AfterBuild&quot;&gt; 
    &lt;Message Text=&quot;Running jslint...&quot; Importance=&quot;Normal&quot; /&gt; 
    &lt;Exec Command=&quot;&amp;quot;..\jslint\JSLint.CLI.exe&amp;quot; .\Scripts\ &quot; /&gt; 
&lt;/Target&gt;
</pre></p>
<p>So the search for command lines tools began. I found some existing command line tools, some which had more complex dependencies, others which seemed to be more &#8216;primitive&#8217;, i.e. did not report on errors the IDE based JSLint plugin was reporting.</p>
<p>There were 2 main objectives driving the choice of the tool</p>
<ol>
<li>Similarity and accuracy to JSLint.com and the Visual Studio extension</li>
<li>Ease of setup</li>
</ol>
<p>There was some discussion happening on StackOverflow, <a href="http://stackoverflow.com/questions/836449/is-js-lint-available-for-offline-use">here</a> and <a href="http://stackoverflow.com/questions/599842/jslint-cli-options">here</a> but nothing I tried digging deeper into seemed suitable.</p>
<p><strong>I then had an idea&#8230;</strong></p>
<p>Take the core logic of the Visual Studio extension and wrap it in a very simple console application to execute as part of the build process.</p>
<p>With the approach I took, it seems even option 2 was difficult to achieve (consumed some time), but at least it had the least external dependencies to the other options out there.</p>
<p>The very first step was to obtain and install the VS2010 SDK, as this was an project which referenced many interop assemblies for interacting with the IDE. It needs to be the Service Pack 1 SDK in fact, and here&#8217;s a <a href="http://www.microsoft.com/download/en/details.aspx?id=21835">direct link</a>. Once I was able to compile the extension it was then a matter of understanding how it operates and how to access a method to perform the &#8216;<em>linting</em>&#8216;.</p>
<p>There were 2 major hacks to get access to some inner workings of the extension to operate:</p>
<ol>
<li>Making some &#8216;protected/internal&#8217; methods and properties public</li>
<li>Modifying where the JSLint logic obtained the settings file from (<em>JSLintOptions.xml</em>).</li>
</ol>
<p>Locating JSLintOptions.xml proved somewhat difficult at first, as it was tucked away hiding in the Roaming section of my user folder on Windows (<em>\Users\*\AppData\Roaming\</em>). These hacks could greatly benefit from some re-factoring effort if I have ever have the time, or someone else is so inclined. But after an initial attempt to refactor out the most core of logic things fell apart in the land of SDK dependencies, so I rolled back and opted for a less elegant approach which was the 2 hacks listed above.</p>
<p>The logic for the console application is then trivially simple:</p>
<ol>
<li>Read .js files.</li>
<li>Using the <em>JSLinter</em> class method <em>Lint()</em> supply the .js file content/</li>
<li>Write errors to console</li>
<li>Return error code, 0 (Success), 1 (JavaScript warnings), etc.</li>
</ol>
<p><strong>Show me the code!</strong></p>
<p>If you want to see the hacks I had to make to get this to work head on over to this <a href="https://bitbucket.org/NickJosevski/jslint-for-vs2010-cli" title="code as git repo on bitbucket">git repository on BitBucket</a>. I offer no warranty it may be fragile so manipulate with caution.</p>
<p>If you just want the command line executable, then it&#8217;s built and stored in the repository in the <em>/output</em> folder, if I make any updates to the executable, I&#8217;ll also update that executable.</p>
<p><strong>Areas for improvement in the console app:</strong></p>
<ul>
<li>Taking path locations as input parameters/external file of locations</li>
<li>Taking alternate settings files for rules to ignore/include</li>
<li>General tidyup</li>
</ul>
<p><strong>Outstanding issue</strong></p>
<p>The final hiccup is not directly related to the use of the command line tool itself, but building the command line tool from source as part of a more comprehensive-all-inclusive build process. Adding commands in the <em>.csproj file</em> post-build settings was not sufficient. The build and copy of the executable needs run as a directive in the targets &#8216;afterbuild&#8217; section of the <em>.csproj file</em>.</p>
<div id="attachment_1572" class="wp-caption aligncenter" style="width: 310px"><a href="http://nickjosevski.files.wordpress.com/2011/12/build-events.png"><img src="http://nickjosevski.files.wordpress.com/2011/12/build-events.png?w=300&#038;h=212" alt="CSProject Settings Dialog - Post Build Events" title="CSProject Settings Dialog - Post Build Events" width="300" height="212" class="size-medium wp-image-1572" /></a><p class="wp-caption-text">Not suitable to place actions in &#039;post build&#039; section</p></div>
<p>This led to a conflict between MSBuild and the VS2010 SDK, which was very frustrating and currently isn&#8217;t solved yet. The question is up on <a href="http://stackoverflow.com/q/8583564/75963">StackOverflow</a>.</p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1537/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1537/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1537/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1537&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/12/29/tweaking-a-vs2010-plugin-to-run-jslint-in-the-command-line/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/12/jslintui_screenshot.png?w=300" medium="image">
			<media:title type="html">JSLint for Visual Studio 2010 Extension</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/12/build-events.png?w=300" medium="image">
			<media:title type="html">CSProject Settings Dialog - Post Build Events</media:title>
		</media:content>
	</item>
		<item>
		<title>Generic Personality Tests For Software Engineers</title>
		<link>http://blog.nick.josevski.com/2011/12/28/generic-personality-tests-for-software-engineers/</link>
		<comments>http://blog.nick.josevski.com/2011/12/28/generic-personality-tests-for-software-engineers/#comments</comments>
		<pubDate>Wed, 28 Dec 2011 10:53:23 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[rant]]></category>
		<category><![CDATA[recruitment]]></category>
		<category><![CDATA[you-are-doing-it-wrong]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1464</guid>
		<description><![CDATA[I rarely rant on my blog, but when a friend of mine brought up that he had to take a personality test as part of the interview process (a step prior to being given an offer), it just frustrated me so much. So at this point dear reader you may move along if this isn&#8217;t [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1464&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I rarely rant on my blog, but when a friend of mine brought up that he had to take a personality test as part of the interview process (a step prior to being given an offer), it just frustrated me so much. So at this point dear reader you may move along if this isn&#8217;t of interest as this is all my opinion on personality tests for software engineers. </p>
<blockquote><p>Summary and Disclaimer<br />
Unless your organisation has thought long and hard about designing a personality test specific to software engineers, don&#8217;t subject candidates to a generic personality tests. It reflects poorly on your understanding of software engineers.</p></blockquote>
<p><strong>If you use a generic personality test&#8230;</strong></p>
<blockquote><p>Q: Do you care about hiring and retaining the best software engineers?<br />
A: test A resounding &#8211; No.</p></blockquote>
<blockquote><p>Q: Do you understand what it takes to be a good software engineers?<br />
A: A clear &#8211; No.</p></blockquote>
<blockquote><p>Q: Does your organisation care about the previous two questions?<br />
A: If no, then fair enough. Continue using the test, and move along.</p></blockquote>
<p><strong>Otherwise:</strong></p>
<p>You have to be kidding me. When a professional organisation subjects any reasonably qualified software engineer to the same type of tests they subject potential employees in their specific field to then they are not concerned about hiring and retaining the best, or they have been ill-informed on how to recruit top software engineers. What got me fired up about this information was that the type of questions he described. They were so broad and irrelevant to what it would take to do his job. This frustration was further compounded when it was apparent that this test carried some significant weight in the recruitment process. They didn&#8217;t even bother to undertake more suitable programming/problem solving exercises that an Engineer would actually do in day to day activities in this job role.</p>
<p>At this point you may counter my argument with, a general statement such as &#8220;<em>why not just use any and all tools available to help make a decision</em>&#8220;. To this I answer: <em>such questions are not relevant enough to accurately judge a good software engineer, and do more harm than good.</em></p>
<p>Here are some categories we derived from the discussion after he sat the test, and we analysed the questions that invoked the anger that&#8217;s feeding this post.</p>
<ol>
<li>Questioning the norm.</li>
<li>Long standing ideas.</li>
<li>Repetitive routines.</li>
<li>Breaking rules.</li>
<li>Data analysis.</li>
<li>Being creative.</li>
</ol>
<p>Here we are both speculating a bit, but the type of questions that represented the first 4 categories seemed to attempt to discover candidates that would be deemed as rebellious. As a software developer answering these questions you have to completely put aside what makes you a good software developer. I would give credit if the organisation was actively seeking &#8216;rebellious&#8217; software developers ready to challenge the norm and bring improvements. But based on their sector, and other information this seems highly unlikely. The questions that matched the last 2 categories seemed reasonable.</p>
<p>A very brief search uncovered this reasearch paper; very <a href="http://ijikm.org/Volume2/IJIKMv2p163-177Sodiya.pdf">SDLC and waterfall focused analysis of personalities (pdf)</a>, there didn&#8217;t seem to be any concept of applying Computer Science knowledge/research into this personality test. In fact several questions were difficult even to interpret for your typical software engineer.</p>
<p>If I was subjected to such a test as part of an application where the test wasn&#8217;t clearly justified as relevant to engineers, it would be safe to say right there an then to avoid stress I would decline and withdraw my candidacy.</p>
<p>Take away: treat your engineers with a bit more respect.</p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1464/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1464/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1464/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1464&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/12/28/generic-personality-tests-for-software-engineers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>Perfect Password Paragraphs</title>
		<link>http://blog.nick.josevski.com/2011/09/11/perfect-password-paragraphs/</link>
		<comments>http://blog.nick.josevski.com/2011/09/11/perfect-password-paragraphs/#comments</comments>
		<pubDate>Sun, 11 Sep 2011 10:40:40 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[alpha-product]]></category>
		<category><![CDATA[perfect-password-paragraphs]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1459</guid>
		<description><![CDATA[Over the last few months at least in the streams of information I typically consume, direct issues: Security Now topic of Password Haystacks, xkcs&#8217;s comic, Coding Horror, and indirect: Scott Hanselman one and two. Have all commented on the issue around passwords and strength and the need for better passwords. In this post I am [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1459&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Over the last few months at least in the streams of information I typically consume, direct issues: <a href="https://www.grc.com/haystack.htm">Security Now topic of Password Haystacks</a>, <a href="http://xkcd.com/936/">xkcs&#8217;s comic</a>, <a href="http://www.codinghorror.com/blog/2011/09/cutting-the-gordian-knot-of-web-identity.html">Coding Horror</a>, and indirect: <a href="http://www.hanselman.com/blog/ASuggestedImprovedCustomerInteractionWithTheAppleStoreAndCloudServicesInGeneral.aspx">Scott Hanselman one</a> and <a href="http://www.hanselman.com/blog/WelcomeToTheCloudYourAppleIDHasBeenDisabled.aspx">two</a>. Have all commented on the issue around passwords and strength and the need for better passwords.</p>
<p>In this post I am putting forward a novel approach: which as an <a href="https://www.grc.com/ppp.htm">homage to GRC&#8217;s Perfect Paper Passwords</a> and accordingly have titled my approach:</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/09/ppp-grc-logo.png"><img src="http://nickjosevski.files.wordpress.com/2011/09/ppp-grc-logo.png?w=614&#038;h=219" alt="When high entropy 16, 32, 64 or even 128 character passwords are just not secure enough!" title="When 128 characters isn&#039;t enough!" width="614" height="219" class="aligncenter size-full wp-image-1469" /></a></p>
<p>Let&#8217;s jump right in with a sample, here I&#8217;ve mocked up the very familiar facebook interface with a nice large textbox to put in your <em>Perfect Password Paragraphs™</em>.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/09/facebook-ui-modified.png"><img src="http://nickjosevski.files.wordpress.com/2011/09/facebook-ui-modified.png?w=614&#038;h=545" alt="Perfect Password Paragraphs facebook log in modified" title="Perfect Password Paragraphs facebook log in modified" width="614" height="545" class="aligncenter size-full wp-image-1471" /></a></p>
<blockquote><p>Disclaimer: if you&#8217;ve gotten this far and haven&#8217;t begun to appreciate the humour I&#8217;m so sorry, please don&#8217;t send me hate mail.</p></blockquote>
<p><strong>Features:</strong></p>
<ul>
<li>A big text area where with probable difficulty you have to type 100+ words to authenticate.</li>
<li>Typographical errors are ok as long as they are consistent for you.</li>
<li>A flow of sentences following a theme/style just needs to <strong>sound like</strong> the individual attempting to gain access.</li>
<li>&#8220;Sound Like&#8221; is a trademark (patent indefinitely pending) of Josevski Research Corp, is the flux capacitor grade specialty of this authentication system.</li>
</ul>
<p><strong>Comparison metrics:</strong></p>
<ul>
<li>Writing style</li>
<li>Choice of punctuation, frequency of commas, periods, ect.</li>
<li>Grammar choice.</li>
<li>spelling (American vs British English).</li>
<li>Consistency of spelling errors.</li>
<li>Choice of tense (present, past, and future)</li>
</ul>
<p><strong>Future Features based on demand:</strong></p>
<ul>
<li>International support.</li>
<li>1337 sp34k.</li>
<li>Baby talk.</li>
<li>Obscure localised slang.</li>
<li>Pig Latin.</li>
<li>iOS, Windows Phone 7 and Android Support.</li>
</ul>
<p><em>Alpha product coming online in 6-8 weeks <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </em></p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1459/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1459/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1459/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1459&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/09/11/perfect-password-paragraphs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/09/ppp-grc-logo.png" medium="image">
			<media:title type="html">When 128 characters isn&#039;t enough!</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/09/facebook-ui-modified.png" medium="image">
			<media:title type="html">Perfect Password Paragraphs facebook log in modified</media:title>
		</media:content>
	</item>
		<item>
		<title>Getting to know your machine, by building it</title>
		<link>http://blog.nick.josevski.com/2011/08/27/getting-to-know-your-machine-by-building-it/</link>
		<comments>http://blog.nick.josevski.com/2011/08/27/getting-to-know-your-machine-by-building-it/#comments</comments>
		<pubDate>Sat, 27 Aug 2011 08:26:00 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[pc-building]]></category>
		<category><![CDATA[tech]]></category>

		<guid isPermaLink="false">http://nickjosevski.wordpress.com/?p=626</guid>
		<description><![CDATA[Back in September of 2009 after a fair few months of thinking about what to put in to a new PC, the stars aligned and along with some friends of mine decided to take on a small project of building our own PCs. At that point I had never done the activity on my own, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=626&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Back in September of 2009 after a fair few months of thinking about what to put in to a new PC, the stars aligned and along with some friends of mine decided to take on a small project of building our own PCs. At that point I had never done the activity on my own, as in assembling everything from scratch, but was well across how the hardware did connect, and what the steps were.</p>
<p>The systems back there were <a href="http://en.wikipedia.org/wiki/Intel_Core#Core_i7">Core i7 920s</a> @ 2.6 Ghz, with 12Gb of RAM (6x2gb), 2x 1TB drives, 2x NVidia GTX 275s 892MB. At this point it&#8217;s obvious these machines were to be gaming rigs with some nice SLI action in the GFX department. These machines are CPU overclocked to run at 3.5Ghz and have been running well for just over 2 years now.</p>
<p>Fast forward to August 2011. Almost 2 years on, and I&#8217;m at it again, but this time to build our primary software development machines at work.</p>
<p>This system consists of Core i7 980 @ 3.2Ghz, with 24Gb of RAM (6x4gb), <a href="http://www.ocztechnology.com/ocz-vertex-3-sata-iii-2-5-ssd.html">OCZ Vertex 3 SSD</a>, 1x NVidia GTX 560 1Gb.</p>
<p>The following is just a summary of my experience, and those who took part in the builds with me, your millage may vary and in no way is this a definitive guide, there may be some useful tips and insights, either way this is to be an entertainment post, full of hardware pictures.</p>
<p><strong>Choice of parts</strong><br />
&#8220;Bang for buck&#8221; is obviously your best bet, which translates into purchase what is important in your budget. This being 2011 very much the year of the SSD, this is where your first bit of attention should be.</p>
<p>In 2009, an SSD was well out of our price range, in particular with 32Gb models being the most popular and still not very affordable or even reliable yet. In 2011 this is not the case, and with budgeting to ensure a great SSD we ended up with 240Gb OCZ Vertex 3 Max IOPS drives. These were of the top end of the SSD spectrum, the only thing typically more expensive was larger capacity 500+Gb which had just come out, and some other specialised SSDs.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/12/ocz-vertex-combined.png"><img src="http://nickjosevski.files.wordpress.com/2011/12/ocz-vertex-combined.png?w=600&#038;h=226" alt="ocz vertex box and on case tray" title="ocz vertex box and on case tray" width="600" height="226" class="aligncenter size-medium wp-image-1545" /></a></p>
<p><strong>Ensuring part capability</strong><br />
This just takes research as there isn&#8217;t much that can go wrong. The main concerns typically revolve around the capabilities of the motherboard, after you clearly select the motherboard that&#8217;s appropriate for your CPU chipset. Also of concern to double check on is physical space inside the chosen system case. This did bite us when early 2010 we decided to build a similar spec&#8217;d machine as the 2009 machine, but chose a newer and physically larger GFX card which did not fit the 2009 cases.</p>
<p>2009 Case -&gt; <a href="http://www.cmstorm.com/en/products/chassis/scout/">Cooler Master CMStorm Scout</a><br />
2011 Case -&gt; <a href="http://www.corsair.com/pc-cases/graphite-series-pc-case/special-edition-white-graphite-series-600t-mid-tower-case.html">Corsair Graphite 600 (black)</a></p>
<p>I found just searching for reviews and combinations people are bench-marking online make a good guide to compatible choices.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/08/motherboard-gigabyte-g1-guerrilla.png"><img src="http://nickjosevski.files.wordpress.com/2011/08/motherboard-gigabyte-g1-guerrilla.png?w=600&#038;h=226" alt="motherboard Gigabyte G1.Guerrilla" title="motherboard Gigabyte G1.Guerrilla" width="600" height="226" class="aligncenter size-medium wp-image-1553" /></a></p>
<p><strong>Purchasing</strong><br />
Shop around for any discounts if buying a larger quantity, combined order. We went as far as to choose to shop at multiple locations to obtain the best prices, and to ensure all the parts we wanted could be acquired exactly when build time came around. This may be a negative as if there are issues with multiple parts then you have to deal with 2 or more business for parts exchange. Luckily in both the 2009 build and the recent build there were no issues requiring travelling back to the store.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/08/gtx-560-1gb.png"><img src="http://nickjosevski.files.wordpress.com/2011/08/gtx-560-1gb.png?w=600&#038;h=226" alt="graphics card gtx 560 1gb" title="graphics card gtx 560 1gb" width="600" height="226" class="aligncenter size-medium wp-image-1550" /></a></p>
<p><strong>The Build</strong><br />
A quick checklist of the order of configuration, in both times, even trying both combinations, I found that at least for our cases, it was easier to assemble almost everything on the motherboard with it on the build table, and not in the case. This is the order that worked well for us.</p>
<ol>
<li>Install the RAM onto the motherboard.</li>
<li>Lock in CPU with thermal paste.</li>
<li>Add your CPU heat sink, plus any rear of motherboard mounts.</li>
<li>Wire up CPU fans into motherboard.</li>
<li>Clip on RAM cooling fans (wasn&#8217;t a feature on my 2009 machine).</li>
<li>Screw-in feet for motherboard into case.</li>
<li>Bolt motherboard down into case.</li>
<li>Insert GFX card.</li>
<li>Run SATA cables for SSD/HDDs, BluRay/DVD roms</li>
<li>Link up any case based connections (HDD lights, fans, power button, etc)</li>
<li>Tidy up cables now and as you go.</li>
</ol>
<p><strong>Cable Management</strong><br />
I&#8217;m of the opinion you should attempt to get all the internal cables tucked away as neatly as possible to help with airflow, and general appearance, in my machines a strong touch of OCD helped get them in a near perfect state of &#8220;out of the way&#8221;. Zip ties, twisty ties and making use of the case are your best friends here.</p>
<p><strong>Cooling</strong><br />
Fans, fans and more fans. Here I don&#8217;t believe it&#8217;s necessary to go that overboard with advanced alternate tech cooling. But to each his own.</p>
<p>In both the 2009 and 2011 systems, we chose to go with an aftermarket heat sink for the CPU, this was clearly the right choice in 2009, but when we saw the stock fan that came with the Core i7 980 it looked like it would do a good job. None-the-less dual fans and larger grill section on the <a href="http://www.noctua.at/main.php?lng=en&amp;products_id=14&amp;show=productview">Noctua NH-U12P</a> is what&#8217;s cooling the overclocked 920s and 980s.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/08/noctual-cpu-fan-and-corsair-ram-fan.png"><img src="http://nickjosevski.files.wordpress.com/2011/08/noctual-cpu-fan-and-corsair-ram-fan.png?w=600&#038;h=226" alt="noctual cpu fan, and corsair ram fan" title="noctual cpu fan, and corsair ram fan" width="600" height="226" class="aligncenter size-medium wp-image-1549" /></a></p>
<p><strong>Testing the configuration</strong><br />
Double check nothing is out of place, and turn it on. Good luck! <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/08/case-assembly-complete.png"><img src="http://nickjosevski.files.wordpress.com/2011/08/case-assembly-complete.png?w=600&#038;h=226" alt="case assembly complete" title="case assembly complete" width="600" height="226" class="aligncenter size-medium wp-image-1555" /></a></p>
<p><strong>Play</strong><br />
Start using the system. After you have your <a href="http://www.youtube.com/watch?v=GItVjMDrfPU">Operating System</a> installed <a href="http://www.youtube.com/watch?v=dyGvtnuhM9s">that is</a>.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/08/monitors.png"><img src="http://nickjosevski.files.wordpress.com/2011/08/monitors.png?w=600&#038;h=226" alt="monitors" title="monitors" width="600" height="226" class="aligncenter size-medium wp-image-1556" /></a></p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/626/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/626/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/626/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=626&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/08/27/getting-to-know-your-machine-by-building-it/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/12/ocz-vertex-combined.png?w=300" medium="image">
			<media:title type="html">ocz vertex box and on case tray</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/08/motherboard-gigabyte-g1-guerrilla.png?w=300" medium="image">
			<media:title type="html">motherboard Gigabyte G1.Guerrilla</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/08/gtx-560-1gb.png?w=300" medium="image">
			<media:title type="html">graphics card gtx 560 1gb</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/08/noctual-cpu-fan-and-corsair-ram-fan.png?w=300" medium="image">
			<media:title type="html">noctual cpu fan, and corsair ram fan</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/08/case-assembly-complete.png?w=300" medium="image">
			<media:title type="html">case assembly complete</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/08/monitors.png?w=300" medium="image">
			<media:title type="html">monitors</media:title>
		</media:content>
	</item>
		<item>
		<title>A basic walkthrough of RabbitMQ using C#.NET examples</title>
		<link>http://blog.nick.josevski.com/2011/06/01/a-basic-walkthrough-of-rabbitmq-using-c-net-examples/</link>
		<comments>http://blog.nick.josevski.com/2011/06/01/a-basic-walkthrough-of-rabbitmq-using-c-net-examples/#comments</comments>
		<pubDate>Tue, 31 May 2011 13:08:25 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[RabbitMQ]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[asynchronous]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[rabbitmq]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1447</guid>
		<description><![CDATA[In my last post &#8220;A trivial message loop using RabbitMQ in C#.NET&#8221; I demonstrated a simple concept of a circular message queue using RabbitMQ. I chose not to complicate the post with explaining some fundamentals of RabbitMQ leaving that for this post. As of writing the version of RabbitMQ I am using is 2.4.1. Some [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1447&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my last post &#8220;<a href="http://blog.nick.josevski.com/2011/05/29/a-trivial-message-loop-using-rabbitmq-in-c-net/">A trivial message loop using RabbitMQ in C#.NET</a>&#8221; I demonstrated a simple concept of a circular message queue using RabbitMQ. I chose not to complicate the post with explaining some fundamentals of RabbitMQ leaving that for this post.</p>
<p>As of writing the version of RabbitMQ I am using is 2.4.1.</p>
<p>Some of the concepts I introduced in the last post were, and I&#8217;ll break them down in a hopefully a logical flow as steps to take.</p>
<ol>
<li>IConnection</li>
<li>IModel</li>
<li>ExchangeDeclare()</li>
<li>QueueHelper.EnsureQueue()</li>
<li>Subscription</li>
<li>SimpleRpcClient</li>
<li>SimpleRpcClient.Cast()</li>
<li><em>Your own</em> SimpleRpcServer</li>
<li>HandleSimpleCast</li>
</ol>
<blockquote><p>First if you&#8217;re looking to get setup on Windows head on over to the RabbitMQ official documentation and <a href="http://www.rabbitmq.com/install.html">follow the steps</a>.</p></blockquote>
<blockquote><p>Also before you continue reading I urge you to go have a look at <a href="http://mikehadlow.blogspot.com/">Mike Hadlow&#8217;s</a> <a href="https://github.com/mikehadlow/EasyNetQ">EasyNeqQ API</a> and accompanying <a href="http://mikehadlow.blogspot.com/2011/05/easynetq-simple-net-api-for-rabbitmq.html">blog</a> <a href="http://mikehadlow.blogspot.com/2011/05/futurepublish-with-easynetq-rabbitmq.html">posts</a>.</p></blockquote>
<p>Some other good blog posts I have stumbled upon after starting to write my version of this come from <a href="http://simonwdixon.wordpress.com/">Simon Dixon</a>, at the time of me writing this he had <a href="http://simonwdixon.wordpress.com/2011/05/08/getting-started-with-rabbitmq-in-dotnet/">1</a>, <a href="http://simonwdixon.wordpress.com/2011/05/10/getting-started-with-rabbitmq-in-net-part-2/">2</a>, <a href="http://simonwdixon.wordpress.com/2011/05/19/getting-started-with-rabbitmq-in-net-%E2%80%93-part-3/">3</a> part series</p>
<p>On to my take, I&#8217;ll be explaining RabbitMQ along the lines of how my simple demonstration application functions, as a reminder it&#8217;s available on BitBucket &#8211; <a href="https://bitbucket.org/NickJosevski/rabbitloop">https://bitbucket.org/NickJosevski/rabbitloop</a></p>
<p><strong>Step 1</strong> &#8211; The Connection</p>
<p>I am using ConnectionFactory with a local machine address to create the connection the <em>client</em> and <em>server</em> will use to build the next required component.</p>
<p><pre class="brush: csharp;">
IConnection connection = new ConnectionFactory
  { 
      Address = &quot;127.0.0.1&quot; //localhost
  }.CreateConnection();
</pre></p>
<p><strong>Step 2</strong> &#8211; The Model</p>
<p>Using the connection create a <em>model</em> this is used to configure the rest of details on how communication will take place between the <em>client</em> and <em>server</em>.</p>
<p><pre class="brush: csharp;">
IModel model = connection.CreateModel();
</pre></p>
<p><strong>Step 3</strong> &#8211; ExchangeDeclare()</p>
<p>Declaring an exchange is the concept of setting up a named path for communication, the second parameter offers options on how messages are to be delivered, in this example I&#8217;m sticking with a simple choice of &#8216;Direct&#8217;</p>
<p><pre class="brush: csharp;">
var exchange = &quot;my.exchange&quot;;
model.ExchangeDeclare(exchange, ExchangeType.Direct);
</pre></p>
<p><strong>Step 4</strong> &#8211; QueueHelper.EnsureQueue()</p>
<p>This is my own helper <em>extension method</em> to help perform a few tasks; creating a <em>queueId</em>, using that <em>queueId</em> to declare a <em>queue</em> on the <em>model</em>, and then <em>bind</em> the <em>queue</em> and <em>exchange</em> together, finally returning the newly created <em>queueName</em>.</p>
<p><pre class="brush: csharp;">
public static class QueueHelper
{
    public static string EnsureQueue(this IModel ch, String exchangeName)
    {
        var queueId = String.Format(&quot;{0}.reply&quot;, exchangeName);
        var queueName = ch.QueueDeclare(queueId, false, false, false, null);
        ch.QueueBind(queueName, exchangeName, &quot;&quot;, null);
        return queueName;
    }
}
</pre></p>
<p><strong>Step 5</strong> &#8211; Subscription</p>
<p>The subscription is supplied to the <em>server</em> logic and is created using the <em>model</em> and the <em>queueName</em></p>
<p><pre class="brush: csharp;">
var sub = Subscription(model, queueName);
</pre></p>
<p><strong>Step 6</strong> &#8211; SimpleRpcClient<br />
Creating the client is just as simple, and we&#8217;re ready to send a message.</p>
<p><pre class="brush: csharp;">
var client = new SimpleRpcClient(model, queueName);
</pre></p>
<p><strong>Step 7</strong> &#8211; SimpleRpcClient.Cast()</p>
<p>The <em>Cast()</em> method on the SimpleRpcClient is the <strong>asynchronous</strong> way to send a message, I want to keep this post more straight forward so I am excluding the message class and how to serialize it but those steps are very basic.</p>
<p><pre class="brush: csharp;">
var myMsg = new SerializableClassYouHaveCreated().Serialize();

rpcClient.Cast(new BasicProperties(), myMsg);
</pre></p>
<p><strong>Step 8</strong> &#8211; NicksSimpleRpcServer</p>
<p>This is where things start to get a little more involved, but it&#8217;s relatively straight forward. In this approach I create my own RpcServer that extends <em>SimpleRpcServer</em>. </p>
<p><pre class="brush: csharp;">
public class NicksSimpleRpcServer : SimpleRpcServer
{
    private readonly SimpleRpcClient rpcClient;

    public NicksSimpleRpcServer(Subscription subscription, SimpleRpcClient client)
    : base(subscription)
    {
        rpcClient = client;
    }

}
</pre></p>
<p><strong>Step 9</strong> &#8211; HandleSimpleCast</p>
<p>All I do now is override the method that handles  <strong>asynchronous</strong> messages (it also needs to de-serialize the content form <em>byte[] body</em>). Just to follow along from my sample application the server also has a client private member so it can continue to forward a modified message on wards.</p>
<p><pre class="brush: csharp;">
//as an override method inside NicksSimpleRpcServer:
public override void HandleSimpleCast(Boolean isRedelivered, IBasicProperties requestProperties, byte[] body)
{
    //deal with incoming message, create new message to forward
     rpcClient.Cast(new BasicProperties(), msgToForward);
}
</pre></p>
<p>This is where our story comes to an end&#8230; As a final step we need to get our server running&#8230;</p>
<p>Using the <a href="http://msdn.microsoft.com/en-us/library/dd537609.aspx">Task Parallel Library</a> create a Task that kicks off another method of the RpcServer &#8211; <strong>MainLoop()</strong>. MainLoop simply sits there (blocks) and accepts incoming messages, each time an asynchronous arrives HandleSimpleCast will fire and the message will be processed.</p>
<p><pre class="brush: csharp;">
var server = new NicksSimpleRpcServer(sub, client);

new Task(server.MainLoop).Start();
</pre></p>
<p>Hope this is easy to follow.</p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1447/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1447/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1447/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1447&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/06/01/a-basic-walkthrough-of-rabbitmq-using-c-net-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>A trivial message loop using RabbitMQ in C#.NET</title>
		<link>http://blog.nick.josevski.com/2011/05/29/a-trivial-message-loop-using-rabbitmq-in-c-net/</link>
		<comments>http://blog.nick.josevski.com/2011/05/29/a-trivial-message-loop-using-rabbitmq-in-c-net/#comments</comments>
		<pubDate>Sun, 29 May 2011 07:14:27 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[Conference]]></category>
		<category><![CDATA[RabbitMQ]]></category>
		<category><![CDATA[.net]]></category>
		<category><![CDATA[C#]]></category>
		<category><![CDATA[demo]]></category>
		<category><![CDATA[rabbitmq]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1433</guid>
		<description><![CDATA[During the May 2011 meeting of the Melbourne ALT.NET group, 3 presenters each with their chosen functional language tackled a basic problem of transmitting a message along a chain, with the objective of all nodes contributing to a final output. Here&#8217;s some of their code in the the languages of; Erlang, Scala and F#. As [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1433&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>During the <a href="http://melbourne.ozalt.net/2011/05/may-meeting-functional-programming-take.html">May 2011</a> meeting of the <a href="http://melbourne.ozalt.net/">Melbourne ALT.NET</a> group, 3 presenters each with their chosen functional language tackled a basic problem of transmitting a message along a chain, with the objective of all nodes contributing to a final output. Here&#8217;s some of their code in the the languages of; <a href="https://gist.github.com/936268">Erlang</a>, <a href="https://gist.github.com/936274">Scala</a> and <a href="https://gist.github.com/984031">F#</a>.</p>
<p>As an introductory post to <a href="http://www.rabbitmq.com/">RabbitMQ</a> for my blog I thought I would cover how you go about setting up a simple RabbitMQ server-client in an asynchronous fashion. In this post I&#8217;m only going to cover the abstract concept and introduce some terms, I&#8217;ll go into more specific detail in another post as to the technical details of using RabbitMQ. I presented this concept as a very quick 10 minute lightning talk at <a href="http://dddmelbourne.com/">DDD Melbourne 2011</a>.</p>
<p>So stay tuned for more RabbitMQ based posts <em>(links will appear here when they&#8217;re complete)</em>.</p>
<p><strong>The objective:</strong></p>
<ol>
<li>Start with a message that contains a letter &#8216;A&#8217;</li>
<li>Send this message off to a node (N)</li>
<li>Have that node increment the letter, e.g. first node makes it &#8216;B&#8217;</li>
<li>Then that node sends it off, and so on looping for M number of messages.</li>
</ol>
<p><strong>A Node:</strong></p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/05/simplerpcserver_red.png"><img src="http://nickjosevski.files.wordpress.com/2011/05/simplerpcserver_red.png?w=300&#038;h=300" alt="Node Structure" title="Node Structure" width="300" height="300" class="aligncenter size-medium wp-image-1434" /></a></p>
<p><strong>The Algorithm:</strong><br />
My RabbitMQ and C# based solution (simplest version), this list will contain some RabbitMQ specific concepts that I&#8217;ll describe later in the post. This is the algorithm to create, wire up and kick off processing.</p>
<ol>
<li>Create the N clients <em>SimpleRpcClient</em>.</li>
<li>Keep a reference to the 1st client, this is what we use to begin messaging.</li>
<li>Create N <em>Subscription</em> elements.</li>
<li>Create N <em>SimpleRpcServer</em> elements these are the actual <em>nodes</em>.</li>
<li>Supply the second client onwards and subscibtion to the node</li>
<li>Create a new Threading.Tasks.Task() for each <em>node</em>.</li>
<li>To complete the loop, wire up the first client, to the last node.</li>
</ol>
<p><strong>Node Communication (click for larger view):</strong><br />
Each node, houses a client to continue on sending the message.</p>
<p><a href="http://nickjosevski.files.wordpress.com/2011/05/simplerpcserver_3red1.png"><img src="http://nickjosevski.files.wordpress.com/2011/05/simplerpcserver_3red1.png?w=237&#038;h=300" alt="Node Communication" title="Node Communication" width="237" height="300" class="aligncenter size-medium wp-image-1438" /></a></p>
<p><strong>The Code:</strong></p>
<p><pre class="brush: csharp;">
IConnection connection;
IModel model;

char[] letters; //A-Z, repeating
for (x = 0; x &lt; totalToCreate; x++)
{
    var nextLetter = letters[x];
    //this builds up a string in the format of comm.0.a, comm.0.b, etc
    var exchange = String.Format(&quot;comm.{0}.{1}&quot;, x, nextLetter); 
    model.ExchangeDeclare(exchange, ExchangeType.Direct);
    var queueName = model.EnsureQueue(exchange);
    subscriptions.Add(new Subscription(model, queueName));

    clients.Add(new SimpleRpcClient(model, queueName));
}

for (x = 0; x &lt; totalToCreate; x++)
{
    //note the use of [x+1] on the clients, 
    server = new SimpleRpcServer(subscriptions[x], clients[x-1]);

    new Task(server.MainLoop).Start(); //MainLoop is a RabbitMQ concept
}

//Inside RpcServer
public override void HandleSimpleCast(bool isRedelivered, IBasicProperties requestProperties, byte[] body)
{
    var messageToSend = body.Deserialize().IncrementLetter();

    rpcClient.Cast(new BasicProperties(), messageToSend);
}

</pre></p>
<blockquote><p>The code above had been simplified a bit more just to demonstrate the concept, please review the project code for further intricacies in it how it needs to operate.</p>
<p>Working demo code on BitBucket &#8211; <a href="https://bitbucket.org/NickJosevski/rabbitloop">https://bitbucket.org/NickJosevski/rabbitloop</a></p>
<p><strong>*Note:</strong> you&#8217;ll have to excuse some of the roughness of the code as it stands at 29th of May, I haven&#8217;t had a chance to refactor it to be more elegant.</p></blockquote>
<p>There is a long list of RabbitMQ concepts that are beyond the scope of this blog post, a new one will follow soon with my explanations of how they work:</p>
<ul>
<li>IConnection</li>
<li>IModel</li>
<li>QueueHelper.EnsureQueue()</li>
<li>HandleSimpleCast</li>
<li>rpcClient.Cast()</li>
<li>Subscription</li>
<li>ExchangeDeclare()</li>
</ul>
<p>Also check back I may have completed a <a href="http://prezi.com/mksj5f03e56n/rabbitmq-introduction/">Prezi</a> on the subject.</p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1433/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1433/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1433/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1433&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/05/29/a-trivial-message-loop-using-rabbitmq-in-c-net/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/05/simplerpcserver_red.png?w=300" medium="image">
			<media:title type="html">Node Structure</media:title>
		</media:content>

		<media:content url="http://nickjosevski.files.wordpress.com/2011/05/simplerpcserver_3red1.png?w=237" medium="image">
			<media:title type="html">Node Communication</media:title>
		</media:content>
	</item>
		<item>
		<title>AutoSave Form Fields using jQuery &#8211; Part Two of Three</title>
		<link>http://blog.nick.josevski.com/2011/03/18/autosave-form-fields-using-jquery-part-two-of-three/</link>
		<comments>http://blog.nick.josevski.com/2011/03/18/autosave-form-fields-using-jquery-part-two-of-three/#comments</comments>
		<pubDate>Fri, 18 Mar 2011 09:45:27 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1389</guid>
		<description><![CDATA[In my preivous post, I introduced &#8220;self submitting forms&#8221; with the help of some jQuery functions. I had 2 out-standing (todo) items from that post (and work). The first was to have some tracking around the input elements and when they&#8217;ve been re-modified before a delayed post has occurred. Item 1 &#8211; Tracking Recently Modified [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1389&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>In my <a href="http://blog.nick.josevski.com/2011/02/25/autosave-form-fields-using-jquery-change-focusout-and-the-deferred-when-functions/">preivous post</a>, I introduced &#8220;self submitting forms&#8221; with the help of some jQuery functions. I had 2 out-standing (todo) items from that post (and work). The first was to have some tracking around the input elements and when they&#8217;ve been re-modified before a delayed post has occurred.</p>
<p><em>Item 1 &#8211; Tracking Recently Modified</em></p>
<p><strong>Problem Definition:</strong><br />
There are 2 input fields: &#8220;Deadline&#8221; and &#8220;Task Name&#8221;, the user modifies &#8220;Task Name&#8221; then &#8220;Deadline&#8221; then &#8220;Task Name&#8221; again. Under the previous approach, the first delayed processing of &#8220;Task Name&#8221; would end up sending 2 pieces of data in the form submit as separate actions. This is not optimal.</p>
<p><strong>Solution Description:</strong><br />
Track when the input elements were modified, and if they&#8217;re modified in some &#8220;reasonable amount of time&#8221; again, then don&#8217;t send the previous value. This is for now is simply achieved by tracking the input element name with a &#8220;modified times&#8221; count value. Every time a change is made to an input element, we &#8220;push&#8221; the details onto a central collection, when it&#8217;s time to attempt to send the data we &#8220;pop&#8221; off that central collection.</p>
<p><strong>Solution Steps:</strong></p>
<p>1. Have somewhere to store the entries in a central collection, a simple dictionary style variable is fine for now.</p>
<p><pre class="brush: jscript;">
var activeInputs;
//initialised later
activeInputs = {};
</pre></p>
<p>2. When an input element is modified, we simply store it&#8217;s &#8216;id&#8217; and increment it&#8217;s modified counter in the &#8216;activeInputs&#8217; dictionary:<br />
<pre class="brush: jscript;">
var elemId = c.attr('id');
//c here is the input element that is associated with the handling event.

if(activeInputs[elemId] == null)
    activeInputs[elemId] = 1; //initialise
else
    activeInputs[elemId] = activeInputs[elemId] + 1; //increment
</pre></p>
<p>This method is the &#8220;push on to stack&#8221; approach, and does not need to supply feedback.</p>
<p>3. We next will need a method to decrement this, along with returning the modified count value:<br />
<pre class="brush: jscript;">
var elemId = c.attr('id');
if(activeInputs[elemId] == null)
    return -1; //erorr state

if(activeInputs[elemId] &gt; 1)
{
    countVal = activeInputs[elemId];
    activeInputs[elemId] = activeInputs[elemId] - 1;
}
else 
{
    countVal = activeInputs[elemId];
    activeInputs[elemId] = 0; //reset it
}
</pre></p>
<p>This method is the &#8220;pop from stack&#8221; approach; we need it to inform us if the input data was in fact ready to be &#8220;sent off&#8221;</p>
<p>So now if you recall the &#8216;startCountDownAndSendData&#8217; function from the <a href="http://blog.nick.josevski.com/2011/02/25/autosave-form-fields-using-jquery-change-focusout-and-the-deferred-when-functions/">preivous post</a> it had line to submit the form, this can now be wrapped by a check via the &#8220;pop&#8221; method to see if it should send. If there&#8217;s been a recent edit (i.e. the &#8216;activeInputs&#8217; value is greater than 1), then it will not send.</p>
<p>I didn&#8217;t name the methods earlier, and only showed their internal workings, as naming these functions was tricky, but in the next code snippet, I give the pop method a name, to see them in action as a whole check it out on <a href="http://jsfiddle.net/NickJosevski/pPjC9/19/">jsFiddle</a>.</p>
<p><pre class="brush: jscript;">
if(popProcessedControlFromStack(c) == 1)
{
    //if value &quot;1&quot; - active control then submit, otherwise it was editted recently                
    $('form#MyFormId').trigger('submit');
}
</pre></p>
<p><em>Item 2 &#8211; User Feedback on Progress</em></p>
<p>The second out-standing issue from the <a href="http://blog.nick.josevski.com/2011/02/25/autosave-form-fields-using-jquery-change-focusout-and-the-deferred-when-functions/">preivous post</a> was the user feedback. For now I&#8217;m just going to borrow the one from WordPress when you save a post/draft.</p>
<p>Once you actually submit the data, you just need to handle the success response, this will either replace the above section or be a link. But for a bit of a wrap up on this post with the jQuery focus here&#8217;s a skeleton function to show some feedback.</p>
<p><pre class="brush: jscript;">
function showSuccess(data) {
   $('#someDiv').html('&lt;img id=&quot;checkmark&quot; src=&quot;/Content/check.png&quot; /&gt;');
}
</pre></p>
<p>The third (and coming soon) post, will cover the MVC side of this.</p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1389/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1389/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1389/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1389&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/03/18/autosave-form-fields-using-jquery-part-two-of-three/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
		<item>
		<title>AutoSave Form Fields using jQuery &#8211; .change(), focusout() and the deferred .when() functions</title>
		<link>http://blog.nick.josevski.com/2011/02/25/autosave-form-fields-using-jquery-change-focusout-and-the-deferred-when-functions/</link>
		<comments>http://blog.nick.josevski.com/2011/02/25/autosave-form-fields-using-jquery-change-focusout-and-the-deferred-when-functions/#comments</comments>
		<pubDate>Thu, 24 Feb 2011 13:07:53 +0000</pubDate>
		<dc:creator>NickJosevski</dc:creator>
				<category><![CDATA[Concept]]></category>
		<category><![CDATA[jQuery]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://blog.nick.josevski.com/?p=1370</guid>
		<description><![CDATA[I have been prototyping some general approaches, some new functionality, and other various concepts, all part of how a larger system will work. After seeing some interesting and nostalgic things being done with jQuery, it gave me an idea for an approach that may be suitable to achieve some delayed asynchronous actions. Thanks to Aaron [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1370&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I have been prototyping some general approaches, some new functionality, and other various concepts, all part of how a larger system will work. After seeing some <a href="http://www.aaron-powell.com/doing-it-wrong/blink">interesting</a> and <a href="http://www.aaron-powell.com/doing-it-wrong/blinking-marquee">nostalgic</a> things being done with jQuery, it gave me an idea for an approach that may be suitable to achieve some delayed asynchronous actions. Thanks to <a href="http://www.aaron-powell.com/">Aaron Powell</a> for those neat walk-throughs.</p>
<p>My Idea is probably even simpler but focussed more around having elements of a form &#8220;submit themselves&#8221; in a way making use of new features of <a href="http://jquery.com/">jQuery 1.5</a>. I have not yet completed the polished version of this functionality, where it will handle errors and other complexities to be a robust solution. I do believe this approach  does align with the progressive enhancement objectives of good websites, if a clients browser does not support this functionality there is still a standard submission of the form data available. But none-the-less would like to share/document my approach and direction.</p>
<p><strong>Basic Flow</strong></p>
<ol>
<li>User types-in/modifies an input field.</li>
<li>jQuery code detects this.</li>
<li>Asynchronously sends this piece of data.</li>
<li>Provide elegant feedback when this is complete.</li>
</ol>
<p><strong>Improved flow (a future exercise)</strong></p>
<ul>
<li>Step 2 above, should count down and reset counting if that same field is changed before the data is sent. Still a &#8220;to do&#8221; item.</li>
<li>Step 4 isn&#8217;t exactly elegant at the moment; a confirmation message or icon shows up, which is rather crude.</li>
</ul>
<p><strong>Demo</strong></p>
<p>Again thanks to Aaron for reminding me of the awesome site: <a href="http://jsfiddle.net/">jsFiddle</a>, I used it to speed up my jQuery experiments without relying on Visual Studio and running an MVC application to create and test the jQuery logic.</p>
<p><pre class="brush: jscript;">
$(':input').change(function() {
    var c = $(this);
    $.when(
    c.focusout()).then(function() {
        $('#last-action').append(c.attr('name') + ' = ' + c.val() + '&lt;br /&gt;');
    });
});
</pre></p>
<p>Here is the <a href="http://jsfiddle.net/NickJosevski/qbJnC/4/">jsFiddle demo</a> of this functionality, simply type in any of the input boxes, and tab away and see the results be &#8220;submitted&#8221;. Of course no submit code is firing yet, we&#8217;ll look at that now.</p>
<p>Let&#8217;s refactor a little to support some more important functionality to get ready to submit our form. The line in particular about just appending the data can be replaced with a function to handle submitting the form, and just for the demo it will also still output the data in the little debug div. This is where I make use of Aaron&#8217;s demonstration of the <em><a href="http://www.aaron-powell.com/doing-it-wrong/blink">recursive setTimeout pattern</a></em>.</p>
<p><pre class="brush: jscript;">
$(':input').change(function() {
    var c = $(this);
    $.when(
    c.focusout()).then(function() {
        startCountDownAndSendData(c, 5) //delay by 5 seconds
    });
});
</pre></p>
<p>With this function, we&#8217;re going to supply the html element (c) and an integer (waitDuration) representing how many seconds to wait before &#8220;submitting&#8221;.</p>
<p><pre class="brush: jscript;">
function startCountDownAndSendData(c, waitDuration) {
    function go(){
        if(waitDuration &lt;= 0) //count down from a supplied duration value (in seconds)
        {
            $('#last-action').append(c.attr('name') + ' = ' + c.val() + '&lt;br /&gt;');
            $('form#MyFormId').trigger('submit');
            return;
        }
        waitDuration--;
        setTimeout(go, 1000);
    }
    go();
}
</pre></p>
<p>You can see this refactoring in <a href="http://jsfiddle.net/NickJosevski/zV8sd/2/">operation here</a>, but it won&#8217;t submit anywhere, that&#8217;s what we will handle next time in a post about Asynchronous MVC controllers. So steps from 3 and 4 are still to demonstrate to you dear reader, <em>stay tuned&#8230;</em> <a href="http://blog.nick.josevski.com/2011/03/18/autosave-form-fields-using-jquery-part-two-of-three/">part two is here</a>.</p>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<div style="float:right;"><sub><em>-<a title="Nick Josevski" rel="author" href="http://blog.nick.josevski.com/about?rel=author">From the desk of </a><a title="Nick Josevski is on Google+" rel="author" href="http://profiles.google.com/nick.josevski?rel=author">Nick Josevski</a></em></sub></div>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/nickjosevski.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/nickjosevski.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/nickjosevski.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/nickjosevski.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/nickjosevski.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/nickjosevski.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/nickjosevski.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/nickjosevski.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/nickjosevski.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/nickjosevski.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/nickjosevski.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/nickjosevski.wordpress.com/1370/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/nickjosevski.wordpress.com/1370/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/nickjosevski.wordpress.com/1370/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=blog.nick.josevski.com&amp;blog=6707260&amp;post=1370&amp;subd=nickjosevski&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://blog.nick.josevski.com/2011/02/25/autosave-form-fields-using-jquery-change-focusout-and-the-deferred-when-functions/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/75a826b461d28034e5adcffb39600640?s=96&#38;d=http%3A%2F%2F1.gravatar.com%2Favatar%2Fad516503a11cd5ca435acc9bb6523536%3Fs%3D96&#38;r=X" medium="image">
			<media:title type="html">nickjosevski</media:title>
		</media:content>
	</item>
	</channel>
</rss>
