<?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 Junior Software Engineer</description>
	<lastBuildDate>Tue, 06 Jul 2010 04:39:48 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>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 [...]]]></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 [...]]]></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 Developement]]></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 [...]]]></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 [...]]]></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>
<div id="attachment_27" class="wp-caption alignnone" style="width: 624px"><img class="size-large wp-image-27 " title="Desk" src="http://jamiepenney.co.nz/wordpress/wp-content/uploads/2009/07/13072009079-1024x768.jpg" alt="My New Desk Arrangement" width="614" height="461" /><p class="wp-caption-text">My New Desk Arrangement</p></div>
<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. [...]]]></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 [...]]]></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>
	</channel>
</rss>
