<?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>Jamie&#039;s Space &#187; Personal</title>
	<atom:link href="http://www.jamiepenney.co.nz/category/personal/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jamiepenney.co.nz</link>
	<description>Thoughts and Works of a Software Engineer</description>
	<lastBuildDate>Wed, 05 Oct 2011 01:10:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Getting SimpleCov and Spork to play together</title>
		<link>http://www.jamiepenney.co.nz/2011/09/27/getting-simplecov-and-spork-to-play-together/</link>
		<comments>http://www.jamiepenney.co.nz/2011/09/27/getting-simplecov-and-spork-to-play-together/#comments</comments>
		<pubDate>Tue, 27 Sep 2011 04:12:17 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Useful Information]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[rails rpsec]]></category>
		<category><![CDATA[simplecov]]></category>
		<category><![CDATA[spork]]></category>

		<guid isPermaLink="false">http://www.jamiepenney.co.nz/?p=100</guid>
		<description><![CDATA[I have been using SimpleCov to measure the code coverage of my specifications, and it has been excellent. I would recommend it, if only for how easy it was to get it working with RSpec. I have run into one problem though &#8211; running it under Spork generates no results! As far as I can tell, this <a href='http://www.jamiepenney.co.nz/2011/09/27/getting-simplecov-and-spork-to-play-together/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I have been using <a title="SimpleCov" href="https://github.com/colszowka/simplecov">SimpleCov</a> to measure the code coverage of my specifications, and it has been excellent. I would recommend it, if only for how easy it was to get it working with RSpec.</p>
<p>I have run into one problem though &#8211; running it under <a title="Spork" href="https://github.com/timcharper/spork">Spork</a> generates no results! As far as I can tell, this is a problem with the way Spork caches your application files. SimpleCov uses the Ruby 1.9 built in profiling features, and either 1.9 or Spork need the files under inspection to be loaded after the profiling has started. Unfortunately your application files aren&#8217;t reloaded when you are using Spork, that&#8217;s kind of the point!</p>
<p>Some people seem to be able to get away with merely turning off application file caching in <code>config/environments/test.rb</code>, but that didn&#8217;t work for me. Instead, I have come up with a different solution: Only turn on code coverage reporting when I run RSpec outside of Spork. At the top of <code>spec/spec_helper.rb</code> I have the following block:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">if</span><span style="color:#006600; font-weight:bold;">&#40;</span>ENV<span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#996600;">&quot;RUN_COVERAGE&quot;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
  <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'simplecov'</span>
  SimpleCov.<span style="color:#9900CC;">start</span> <span style="color:#996600;">'rails'</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    add_filter <span style="color:#996600;">&quot;/spec/&quot;</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#CC0066; font-weight:bold;">puts</span> <span style="color:#996600;">&quot;Running coverage tool<span style="color:#000099;">\n</span>&quot;</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

<p>That way I can run <code>RUN_COVERAGE=true rspec spec/</code> in the root of my application directory, and RSpec will run with SimpleCov enabled. As an added bonus, the code coverage metrics aren&#8217;t running on every test run, so my tests are faster!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2011/09/27/getting-simplecov-and-spork-to-play-together/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Rails 3 Form builder for Twitter Bootstrap form elements</title>
		<link>http://www.jamiepenney.co.nz/2011/09/23/rails-3-form-builder-for-twitter-bootstrap-form-elements/</link>
		<comments>http://www.jamiepenney.co.nz/2011/09/23/rails-3-form-builder-for-twitter-bootstrap-form-elements/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 05:41:42 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Useful Information]]></category>
		<category><![CDATA[bootstrap]]></category>
		<category><![CDATA[form-builder]]></category>
		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://www.jamiepenney.co.nz/?p=103</guid>
		<description><![CDATA[I have been working on a website in my spare time to help me organise my life a bit better, and one of the things that always trips me up with these kinds of projects is the visual style. For a while I had a basic fixed width style I used, but it didn&#8217;t really <a href='http://www.jamiepenney.co.nz/2011/09/23/rails-3-form-builder-for-twitter-bootstrap-form-elements/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>I have been working on a website in my spare time to help me organise my life a bit better, and one of the things that always trips me up with these kinds of projects is the visual style. For a while I had a basic fixed width style I used, but it didn&#8217;t really fit properly with what I wanted to build. A little while after I had started, Twitter released <a title="Twitter Bootstrap" href="http://twitter.github.com/bootstrap/">Bootstrap</a>, a nice looking CSS framework. I decided to have a go at using it on my site (in a separate git branch of course) and it ended up only taking me less than an hour to get it all up and looks alright.</p>
<p>One thing that bothered me though was the repetition in my forms &#8211; the format for showing labels that line up nicely next to the form elements was the same across all input types, and so was the error handling. This got me thinking: why should I retype all of this when the Rails FormBuilder class is already doing half the work? Surely I could just override some of the methods to make this work?</p>
<p>I needed to learn more about Ruby metaprogramming to get it to work &#8211; I still wanted the core functionality of the default rails FormBuilder, just with some extra DOM nodes wrapped around it. Ruby lets you redefine methods at runtime, but also allows you to alias the old methods so you can refer to them inside your new version of the method. So I ended up writing a method that does the Bootstrap boilerplate DOM wrapper creation and calls the original method to generate the input element itself.</p>
<p>I still haven&#8217;t overridden all of the FormBuilder methods because I need to actually test them (and I don&#8217;t have a use for them yet), but the basics are here in this Gist: <a title="Form builder for Twitter Bootstrap form elements" href="https://gist.github.com/1236567">https://gist.github.com/1236567</a>. The methods I have overridden are in basic_helpers, the ones that output multiple inputs are in multipart_helpers. The great thing is I have only had to add method names to those two arrays as needed &#8211; none of the input types have needed special casing. This might not be the case for all of them, but one can only hope. If you do find this useful, or want to add and test some more of the helpers, please form my Gist and leave me a comment here.</p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2011/09/23/rails-3-form-builder-for-twitter-bootstrap-form-elements/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Testing content_for in Rails 3.x Helpers with RSpec</title>
		<link>http://www.jamiepenney.co.nz/2011/09/23/testing-content_for-in-rails-3-x-helpers-with-rspec/</link>
		<comments>http://www.jamiepenney.co.nz/2011/09/23/testing-content_for-in-rails-3-x-helpers-with-rspec/#comments</comments>
		<pubDate>Fri, 23 Sep 2011 05:37:43 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Rails]]></category>
		<category><![CDATA[Unit Testing]]></category>
		<category><![CDATA[rails rpsec]]></category>

		<guid isPermaLink="false">http://www.jamiepenney.co.nz/?p=98</guid>
		<description><![CDATA[After having a quick look around the net (and not finding anything up to date and useful) I came up with the following basic test structure for testing my ApplicationHelper methods that served up content_for things like page titles, javascript includes, etc: 1 2 3 4 5 6 7 8 9 10 require 'spec_helper' &#160; <a href='http://www.jamiepenney.co.nz/2011/09/23/testing-content_for-in-rails-3-x-helpers-with-rspec/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>After having a quick look around the net (and not finding anything up to date and useful) I came up with the following basic test structure for testing my ApplicationHelper methods that served up content_for things like page titles, javascript includes, etc:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
</pre></td><td class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'spec_helper'</span>
&nbsp;
describe ApplicationHelper <span style="color:#9966CC; font-weight:bold;">do</span>
  describe <span style="color:#996600;">&quot;title&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
    it <span style="color:#996600;">&quot;should call content_for(:title) with the title passed&quot;</span> <span style="color:#9966CC; font-weight:bold;">do</span>
      helper.<span style="color:#9900CC;">title</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#996600;">&quot;title stuff&quot;</span><span style="color:#006600; font-weight:bold;">&#41;</span>
      helper.<span style="color:#9900CC;">content_for</span><span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#ff3333; font-weight:bold;">:title</span><span style="color:#006600; font-weight:bold;">&#41;</span>.<span style="color:#9900CC;">should</span> == <span style="color:#996600;">&quot;title stuff&quot;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
  <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2011/09/23/testing-content_for-in-rails-3-x-helpers-with-rspec/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Dependency Viewer</title>
		<link>http://www.jamiepenney.co.nz/2010/03/24/dependency-viewer/</link>
		<comments>http://www.jamiepenney.co.nz/2010/03/24/dependency-viewer/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 05:07:35 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://jamiepenney.co.nz/?p=69</guid>
		<description><![CDATA[A while back I posted a quick app I wrote to display dependencies between visual studio projects using GraphViz (here). I&#8217;ve done a bit more work on it since then, cleaning up the project and adding support for custom processing of the graph elements before they are rendered using extensions. I&#8217;ve also put the project <a href='http://www.jamiepenney.co.nz/2010/03/24/dependency-viewer/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">A while back I posted a quick app I wrote to display dependencies between visual studio projects using GraphViz (<a href="http://jamiepenney.co.nz/2009/02/10/viewing-dependencies-between-projects-in-visual-studio/">here</a>). I&#8217;ve done a bit more work on it since then, cleaning up the project and adding support for custom processing of the graph elements before they are rendered using extensions. I&#8217;ve also put the project on GitHub for ease of updating. You can access that here: <a href="http://github.com/jamiepenney/VS-Dependency-Viewer">http://github.com/jamiepenney/VS-Dependency-Viewer</a></p>
<p style="text-align: left;">I&#8217;m going to talk about how the extension mechanism works. It uses the Managed Extension Framework (MEF), which you can read about here: <a href="http://www.codeplex.com/MEF">http://www.codeplex.com/MEF</a>. You don&#8217;t need to know a lot about MEF to write an extension &#8211; in fact you can get away without knowing anything apart from how to download it and which attribute to use on your extension class.</p>
<p style="text-align: left;">To create a custom graph processor, you&#8217;ll need to create a new Class Library project in Visual Studio. This project needs to reference Quickgraph.Graphviz.dll, System.ComponentModel.Composition, and DependencyViewer.Common.dll. The first two you can get from the lib directory in the Dependency Viewer project, and the Common dll you can get by building the DependencyViewer.Common project. Once you&#8217;ve got your project up and running, create a new class that implements DependencyViewer.Common.Interfaces.IGraphProcessor.</p>
<p style="text-align: left;">The IGraphProcessor interface is pretty basic so far. These are the important methods:</p>
<ul style="text-align: left;">
<li>PreProcessGraph
<ul>
<li style="text-align: justify;">This method lets you change formatting options on the graph before the other graph elements are processed. You could use this to set the size, background colour, etc.</li>
</ul>
</li>
<li>ProcessEdge
<ul>
<li>This method lets you change formatting options on a dependency connection after the defaults have been set (there aren&#8217;t any defaults yet though).</li>
</ul>
</li>
<li>ProcessVertex
<ul>
<li>This method lets you change formatting options on a project node after the defaults have been set. By default the Name is set to the name of the project and the shape is set to Ellipse.</li>
</ul>
</li>
</ul>
<p style="text-align: left;">You can have blank implementations of any methods you don&#8217;t need.</p>
<p style="text-align: left;">To get the main application to find your custom graph  processor, you just have to register it as an implementation of  IGraphProcessor by adding the Export attribute to your implementation.  So in this case, you&#8217;d put [Export(typeof(IGraphProcessor))] on your  class.</p>
<p style="text-align: left;">
<p style="text-align: left;">Once you&#8217;ve done that, build your project, copy the dll into the directory where you are running the main application, and then the magic happens. MEF will automatically pick up your implementation when you next render your solution.</p>
<p style="text-align: left;">
<p style="text-align: left;">There is an example implementation in the Dependency Viewer project called TestProjectProcessor. It finds non unit testing projects that reference NHibernate and colours them a different colour, so that you can see what projects refer to your data projects. I got the idea from Melle Koning&#8217;s <a href="http://www.mellekoning.nl/index.php/2010/03/11/project-references-in-ddd">blog post</a> on the subject here.</p>
<div id="_mcePaste" style="position: absolute; left: -10000px; top: 0px; width: 1px; height: 1px; overflow-x: hidden; overflow-y: hidden; text-align: left;">http://jamiepenney.co.nz/2009/02/10/viewing-dependencies-between-projects-in-visual-studio/</div>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2010/03/24/dependency-viewer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>NHibernate and the Repository Pattern</title>
		<link>http://www.jamiepenney.co.nz/2009/12/12/nhibernate-and-the-repository-pattern/</link>
		<comments>http://www.jamiepenney.co.nz/2009/12/12/nhibernate-and-the-repository-pattern/#comments</comments>
		<pubDate>Fri, 11 Dec 2009 20:43:43 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>
		<category><![CDATA[Unit Testing]]></category>

		<guid isPermaLink="false">http://jamiepenney.co.nz/?p=54</guid>
		<description><![CDATA[I&#8217;ve been writing a small time tracker web application to teach myself ASP.Net MVC, and am using NHibernate as the ORM.  I&#8217;m trying to use best practises while building this app, and one issue I was trying to deal with was whether to build a layer over the top of NHibernate. My first set of <a href='http://www.jamiepenney.co.nz/2009/12/12/nhibernate-and-the-repository-pattern/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">I&#8217;ve been writing a small time tracker web application to teach myself <a href="http://www.asp.net/mvc">ASP.Net MVC</a>, and am using NHibernate as the ORM.  I&#8217;m trying to use best practises while building this app, and one issue I was trying to deal with was whether to build a layer over the top of NHibernate. My first set of controller actions used NHibernate directly, with a dependency injected ISessionFactory. This was fine for simple queries (like get Task with id 1) but it meant more and more of my model concerns were leaking into my Controllers. I had thought that NHibernate provided enough of an abstraction over my model for this to not matter, but I was quite wrong.</p>
<p style="text-align: left;">Remembering I had seen some argument over whether using a generic repository was a good idea or not, I started searching around and found quite a few blogs saying it was a bad idea. They made sense, and one blog had a <a href="http://www.noctovis.net/blog/index.php/2009/01/22/my-thoughts-about-irepository/">great solution</a>: Create a Repository&lt;T, U&gt; abstract class for common CRUD style operations, inherit your specific Repository from that, and only expose meaningful methods in your interface to client code. The benefits of this approach are many &#8211; your client code can only see methods that are applicable to each model class, you don&#8217;t have to duplicate your common CRUD operations for each model class, and it is easy as pie to unit test.</p>
<p style="text-align: left;">This last point is the one worth mentioning in my books. The great thing about separation of concerns is it should make things easier to pull apart for unit testing. Because my Repository methods have meaningful names, and are pretty fine grained, my mocking setup looks almost readable. It is immediately obvious from reading my tests that TaskController.List(5) should call ITaskRepository.GetLatestTasks(5). Not only that, but most of the Controller actions have been reduced to &#8220;Get this from Repository, return to View&#8221; or &#8220;Save this thing to the Repository&#8221;. They are small, obvious methods, and that makes them easier to test, and easier to maintain.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2009/12/12/nhibernate-and-the-repository-pattern/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fun with the Symbian Emulator</title>
		<link>http://www.jamiepenney.co.nz/2009/08/08/fun-with-the-symbian-emulator/</link>
		<comments>http://www.jamiepenney.co.nz/2009/08/08/fun-with-the-symbian-emulator/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 00:52:16 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Mobile Development]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://jamiepenney.co.nz/?p=38</guid>
		<description><![CDATA[The other night I stumbled on the PyS60 project, an open source port of the python runtime to Symbian S60 based phones. I own a Nokia N95, and I got kind of excited about this because I would like to mess around with development for it but can&#8217;t bring myself to work with C++ in <a href='http://www.jamiepenney.co.nz/2009/08/08/fun-with-the-symbian-emulator/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>The other night I stumbled on the PyS60 project, an open source port of the python runtime to Symbian S60 based phones. I own a Nokia N95, and I got kind of excited about this because I would like to mess around with development for it but can&#8217;t bring myself to work with C++ in my spare time.</p>
<p>I thought it would be pretty easy to develop for as Python is interpreted, I thought I could just edit text files on the phone and run them to test them out. Turns out you can&#8217;t do that (not easily anyway), you need to package them on your computer, then upload the package to the phone, then install it, then run it. That killed that idea.</p>
<p>I looked at the Symbian emulator, and the PyS60 team have a mod for it that installs the python runtime so you can just run script files on the emulated phone. &#8220;This is great!&#8221; I think, before actually trying it.</p>
<p>For starters, the python runtime doesn&#8217;t work in the emulator when the emulator is running on Windows 7 x64 &#8211; damn. I have a VPC image with Windows XP on it though, so I fire that up, install everything, then try run it. The emulator crashes after about 15 seconds of loading.</p>
<p>After browsing the Nokia forums for a while, I find out the problem. VPC is actually connecting to the virtual machine over RDP, and so the audio drivers are the RDP Remote Audio drivers.</p>
<p>What do audio drivers have to do with a phone emulator I hear you ask? Good question, but it is one the Nokia forum dwellers have no answer for. Many people have complained that the Symbian Emulator does not work when connecting to the machine hosting it via RDP. There are other issues with particular sound card drivers or applications also causing it to crash. This is a prime example of bad error handling. Why, if the audio part of the emulator cannot work with some drivers, does it crash instead of continuing without audio?</p>
<p>So that brought down my plans for making<a href="http://www.wired.com/gadgetlab/2008/12/iphone-fart-app/"> millions of dollars from fart applications</a> for Symbian based phones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2009/08/08/fun-with-the-symbian-emulator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Monitor</title>
		<link>http://www.jamiepenney.co.nz/2009/07/13/new-monitor/</link>
		<comments>http://www.jamiepenney.co.nz/2009/07/13/new-monitor/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 10:20:35 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Contracting]]></category>
		<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://jamiepenney.co.nz/2009/07/13/new-monitor/</guid>
		<description><![CDATA[Today I got a new 24&#8243; Samsung T240 for my office at home. I&#8217;ve been working from home a lot recently and have really been missing my dual monitor setup from work, even though it is only my laptop with an old 17&#8243; LCD. Two monitors definitely make a big difference to my productivity when <a href='http://www.jamiepenney.co.nz/2009/07/13/new-monitor/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Today I got a new 24&#8243; Samsung T240 for my office at home. I&#8217;ve been working from home a lot recently and have really been missing my dual monitor setup from work, even though it is only my laptop with an old 17&#8243; LCD. Two monitors definitely make a big difference to my productivity when coding. I already had a 22&#8243; Samsung 226BW, which now looks thoroughly inadequate next to the 24&#8243; as you can see from the photo below.</p>
<p><img class="size-large wp-image-27  alignnone" title="Desk" src="http://jamiepenney.co.nz/wp-content/uploads/2009/07/13072009079-1024x768.jpg" alt="My New Desk Arrangement" /></p>
<p>Once I got used to the larger monitor I had a pretty productive day though. The T240 is a decent monitor for developing on, judging from one day&#8217;s usage. Text is clear, and after a little tweaking the colour looked about right, enough for my purposes anyway. Not to mention it is a nice looking monitor. All in all, it was well worth the money I/the business spent on it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2009/07/13/new-monitor/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Twitter, or How I Learned to Stop Worrying and Love Short Messages</title>
		<link>http://www.jamiepenney.co.nz/2009/02/10/twitter-or-how-i-learned-to-stop-worrying-and-love-short-messages/</link>
		<comments>http://www.jamiepenney.co.nz/2009/02/10/twitter-or-how-i-learned-to-stop-worrying-and-love-short-messages/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 07:10:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://65.99.219.219/wordpress/?p=23</guid>
		<description><![CDATA[Today I took a bold step, swallowed a chunk of my pride, and signed up for Twitter. I&#8217;m not usually a big fan of Social Networking, but Twitter is slightly different. For starters, I don&#8217;t think any of my friends are using it. Secondly, There&#8217;s no real &#34;profile&#34; like you get from Facebook or others. <a href='http://www.jamiepenney.co.nz/2009/02/10/twitter-or-how-i-learned-to-stop-worrying-and-love-short-messages/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Today I took a bold step, swallowed a chunk of my pride, and signed up for <a href="http://www.twitter.com">Twitter</a>. I&#8217;m not usually a big fan of Social Networking, but Twitter is slightly different. For starters, I don&#8217;t think any of my friends are using it. Secondly, There&#8217;s no real &quot;profile&quot; like you get from Facebook or others.</p>
<p>I got the idea from <a href="http://ayende.com/Blog/Default.aspx">Ayende&#8217;s blog</a>, kindof. His blog is quite interesting to watch, because it is made up of lots of small updates. It almost seems like more of a note taking system than a blog sometimes, in a good way. For myself, I tend not to write blog posts because they take a little longer than I&#8217;m willing to give during the day to write, so Twitter&#8217;s 140 character limit could work for me. It&#8217;s just a trial anyway, if it doesn&#8217;t work out I&#8217;ll dump it.</p>
<p>So how I think I&#8217;ll work now is: Post short messages to Twitter like reminders, helpful hints, and status updates, and post longer information like information about side projects and interesting topics on my blog.</p>
<p>If anyone wants to follow me on twitter, here&#8217;s my page: <a href="http://twitter.com/jamiepenney">http://twitter.com/jamiepenney</a>. Be aware that there will be a bit more personal stuff there, my blog so far has just been technical but I&#8217;ll probably use Twitter for personal and work messages.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2009/02/10/twitter-or-how-i-learned-to-stop-worrying-and-love-short-messages/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Ook Interpreter, Written in C# and F#</title>
		<link>http://www.jamiepenney.co.nz/2009/02/10/ook-interpreter-written-in-c-and-f/</link>
		<comments>http://www.jamiepenney.co.nz/2009/02/10/ook-interpreter-written-in-c-and-f/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 07:06:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://65.99.219.219/wordpress/?p=22</guid>
		<description><![CDATA[Another little short side project I worked on over the weekend was an interpreter for Ook, an odd little language &#8220;designed for Orangutans&#8221;. It only has a few syntax elements and 8 different statements so I figured it would be a fun use of my basic F# skills (I&#8217;ve been reading Fundamentals of F# and <a href='http://www.jamiepenney.co.nz/2009/02/10/ook-interpreter-written-in-c-and-f/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>Another little short side project I worked on over the weekend was an interpreter for <a href="http://www.dangermouse.net/esoteric/ook.html">Ook</a>, an odd little language &#8220;designed for Orangutans&#8221;. It only has a few syntax elements and 8 different statements so I figured it would be a fun use of my basic F# skills (I&#8217;ve been reading Fundamentals of F# and Expert F# on Safari Books through work). Using the example files on <a href="http://bluesorcerer.net/esoteric/ook.html">bluesorcerer.net</a> as test files, I successfully got it running in half a day. I can&#8217;t say it is the fastest or most efficient interpreter for Ook, but it is my first interpreter so it was a learning experience. If you have any questions or comments on how I implemented it, please feel free to add them below.</p>
<p>Enough talk, here&#8217;s the GitHub project: <a href="http://github.com/jamiepenney/ook-sharp">http://github.com/jamiepenney/ook-sharp</a></p>
<p>You&#8217;ll need the latest <a href="http://www.microsoft.com/downloads/details.aspx?familyid=61ad6924-93ad-48dc-8c67-60f7e7803d3c&amp;displaylang=en">F# CTP</a> installed to open this project in Visual Studio 2008.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2009/02/10/ook-interpreter-written-in-c-and-f/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing Dependencies Between Projects in Visual Studio</title>
		<link>http://www.jamiepenney.co.nz/2009/02/10/viewing-dependencies-between-projects-in-visual-studio/</link>
		<comments>http://www.jamiepenney.co.nz/2009/02/10/viewing-dependencies-between-projects-in-visual-studio/#comments</comments>
		<pubDate>Mon, 09 Feb 2009 18:03:00 +0000</pubDate>
		<dc:creator>Jamie</dc:creator>
				<category><![CDATA[Personal]]></category>

		<guid isPermaLink="false">http://65.99.219.219/wordpress/?p=21</guid>
		<description><![CDATA[A while ago there was a question on Stack Overflow about how one could go about mapping the dependencies between Visual Studio projects and solutions (see here: http://stackoverflow.com/questions/471154/how-can-i-map-out-which-visual-studio-solutions-use-which-projects). At the time I had been doing a little bit of work with GraphViz, and suggested that it could be used for the diagramming part. The problem <a href='http://www.jamiepenney.co.nz/2009/02/10/viewing-dependencies-between-projects-in-visual-studio/'>[...]</a>]]></description>
			<content:encoded><![CDATA[<p>A while ago there was a question on <a href="http://www.stackoverflow.com/">Stack Overflow</a> about how one could go about mapping the dependencies between Visual Studio projects and solutions (see here: <a title="http://stackoverflow.com/questions/471154/how-can-i-map-out-which-visual-studio-solutions-use-which-projects" href="http://stackoverflow.com/questions/471154/how-can-i-map-out-which-visual-studio-solutions-use-which-projects">http://stackoverflow.com/questions/471154/how-can-i-map-out-which-visual-studio-solutions-use-which-projects</a>). At the time I had been doing a little bit of work with GraphViz, and suggested that it could be used for the diagramming part. The problem itself seemed kind of interesting, so I decided to implement a solution myself for kicks.</p>
<p>My tool takes a visual studio solution, and produces a PNG image showing the dependencies between the projects in that solution. Pretty basic stuff, but it involves:</p>
<ol>
<li>Parsing a Visual Studio .sln file.</li>
<li>Parsing the .csproj files referenced in the .sln file. (I don&#8217;t think it is C# specific but have not tested it on other project types).</li>
<li>Creating an in memory representation of the solution structure.</li>
<li>Creating a graph in QuickGraph to represent that structure.</li>
<li>Creating a dot file for GraphViz from that graph.</li>
<li>Pass that file to GraphViz and display the output.</li>
</ol>
<p>This results in something like this:</p>
<p><img style="display: inline; border-width: 0px;" title="dv_output" src="http://lh4.ggpht.com/_TGyXpQbgdXc/SZ0EV6bDodI/AAAAAAAAABs/edRz8Pgnrbg/dv_output%5B5%5D.png?imgmax=800" border="0" alt="dv_output" width="314" height="168" /></p>
<p><span style="text-decoration: line-through;">The source code is here. </span></p>
<p><em>Updated</em>: I&#8217;ve put this project on GitHub, and added Melle&#8217;s changes to it. You can find it <a href="http://github.com/jamiepenney/VS-Dependency-Viewer">here</a>.</p>
<p>Feel free to do what you like with it, it only took me about 3-4 hours to get it all working. However if you actually use it as part of another project, please leave a comment.</p>
<p>You&#8217;ll need the latest version of GraphViz, which can be downloaded from here: <a href="http://graphviz.org/Download_windows.php">http://graphviz.org/Download_windows.php</a>. I&#8217;ve been using the development snapshot, but the stable release should be fine. When my tool first runs, it&#8217;ll ask you for the location of graphviz. You need to specify the location of dot.exe, which by default is in %Program Files%\GraphViz 2.21\bin.</p>
<p>Standard disclaimer: I&#8217;m not responsible for anything that goes wrong when using this thing. You have the source, you should check it out before running it. If it wipes your system and kills your firstborn child feel free to let me know, but don&#8217;t expect me to do anything about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jamiepenney.co.nz/2009/02/10/viewing-dependencies-between-projects-in-visual-studio/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

