Powered by Blogger.
I am doing a little catch up on Unit Testing today with some of the North 51 gang. Our particular flavour of unit testing generally which goes a little something like this:


The session today is mainly a hands on session but I wanted to just keep a list of recommended links to look at afterwards and I thought it might be nice to share them with others too. The list isn't well researched and is pretty much a dump of the main things I use on a regular basis. Please comment to add more if you like!

There's lots of other arguments that go on around unit testing such as Mocks vs Stubs etc.. etc... For the record, I find I am using Moq less and less. I have a fairly manageable amount of dependencies that are effected when I run my acceptance tests. In most cases I just swap them out with actual fake objects so for an IReadModelRepository we have an SqlReadModelRepository and we swap that out for an InMemoryReadModelRepository. In my tests I like to properly assert that the correct things were passed into those fakes. For smaller less used dependencies or for real unit tests I do still use Moq. 



We had a dev meetup this lunchtime and the subject today was Azure. I wanted to show the teams some of the things I use most in Azure.

The areas we covered were:

  • Creating websites
  • Auto deploying websites using a publish file and directly from a git branch
  • Storage Queues
  • Storage Tables
  • Creating SQL Databases

All of these are so comically easy it's crazy. Unfortunately I wasn't able to use my Surface with our meeting room screen so I had to borrow a laptop. This meant that I couldn't show my neat F# Example on sending messages with Azure Queue Storage. It's a really neat and light weight messaging system with few bells and whistles.

The example also shows off the support for Discriminated Union types in Json.net now which is fantastic.

I've included the packages file so you can see the azure packages that you will need.

My Phone Timeline

No comments
We were talking yesterday about the phones we owned so I thought I would list my phone timeline. I have had some truly amazing phones and some fairly mediocre ones too!

My phone timeline (not including the approx 150 I have now from collecting old phones)


  • Motorola MR201 - I dispatched of this beast almost immediately, it could store 10 SMS and didn't like the phone number to the SMS
  • Ericsson PF768 - I spent hours creating ring tones on this phone. Such a little beauty. 
  • Siemens C25 - This was a brilliant phone, it had a wicked 3d maze game on it. 
  • Nokia 702 - An absolute classic! 
  • Nokia 7110 - I now have a giant box full of these, I used to love playing wap games on them and don't forget about tennis. 
  • Motorola Timeport 250 - This was the first phone that I had where I thought, this is the future, wow
  • Ericsson T68 - A cool phone but fairly poor in terms of usability. I never really loved it. 
  • Nokia NGage - A true obscenity but I had some amazing games on it (Elder Scrolls, Tony Hawks)
  • Orange SPV - The first Windows phone (in the UK at least)
  • Orange SPV C500 - I loved these SPVs, they did everything for me. 
  • Orange SPV C550 - I loved these SPVs, they did everything for me. 
  • Samsung U500 - This phone was so so thin and had an amazing camera. My only real dislike was the circular design of the menu navigator. I was also dissappointed moving from a smart phone back to something that had very few features.
  • Nokia N70 - Probably my favourite phone when I think about it. It had absolutely everything. 
  • Sony Ericsson c510 - A very close second to my favourite phone. At this time, I think the phone manufacturers had really cracked candy bar phones. Incredible!
  • HTC Hero - My first Android phone, a brilliant phone. When I look at it now it looks like a prop from Battlestar Galactica!
  • Samsung Galaxy S2 - Such a good phone. Wowzers
  • Nokia 1020 - My current phone, I really like it. The camera is far and away the best I have ever seen on a phone. My only gripe is that so few things are compatible with Windows phone which is a real pity as the OS is fairly pleasant. 
My good colleague Paddington bear  has just asked me for some help with a marvellous mobile project he has devised. He has some locally stored JSON arrays that he needs to filter based on various fields throughout the code and he was looking for a nice way to reduce the complexity without having to do nasty loops everywhere and in different ways.

I came up with this example that we then turned into something for him (that you aren't allowed to see :-/) but I thought it might be of value to someone else.

Basically, the code takes the onus of doing the filtering out of the filter function so you then pass the array and the function upon which it is filtered at the same time.

Take a peek, I am sure there's some nicer ways of doing things but I just coded it as we were talking and now I am posting it. He has refined the production version and you guys can do the same if you like the idea!


I am working on a new distributed system at the moment and was using Msmq as my basic queue system (just because it's there, has no dependencies and I know how to use it already).

Anyway, I was doing some of the mess about work using F# Scripts (don't you love it!!!). I have tidied some of them up into a quick start Msmq guide for anyone that is interested. I doubt it's exhaustive but it's a start!

One annoying thing I noticed whilst doing this was that for some reason you have to #r reference the System.Messaging Dll. I have never understood why you had to do that when you can just directly reference other .NET framework Dlls like System.Xml (also used in the example). If anyone reads this and knows the answer, please let me know!


I have a Windows Forms program written in F# that can deploy a code base to n number of sites at once (you select the sites you would like to deploy to and it goes off and completes a number of tasks (backing up current sites, various unpacking and moving of files etc... ).

Once you start it, it begins it's merry journey and begins to update the UI with what has happened. At the moment this method of updating the UI is not pretty because the threads I am doing the work on can't update the UI so I perform some fiendery to make that happen (don't ask).

I knew there was a better way using some newer .NET features but I just hadn't got round to having a fiddle yet. I have now found that if you use the built in Task class but break your code up in a nicer way and then chain the tasks together you can then pass the correct context into the task that you want to talk to the UI.

Here's a little script to give you a feel for it. You can press the "start" button and as hoped, the UI isn't locked up because the work (the sleep) is done on a background thread but then the UI is updated afterwards, it's important to note that you wouldn't want to stick the update straight after task1 is started in the main code because it would just run immediately.


Oculus Rift

No comments
This morning I have been able to play with an Oculus Rift. I wasn't sure what to expect but the experience has blown me away. The control with the head movement is realistic and the feeling of immersion was crazy. I only had time to try the under the sea demo but that was enough for now until my own unit arrives.... I haven't included any video of the demo from my perspective as the various videos and youtube demos out there really don't do it justice.





In preparation of mine arriving I started watching the introduction to Unity videos on Digital Tutors http://www.digitaltutors.com/tutorial/1566-Quick-Start-to-Unity-Volume-1 and I think I will need to get back up to speed with some 3d drawing, it's been a long time since I used Autodesk Inventor or my all time favourite tool for 3d fooling about Sketchup. 

This would have been an amazing tool when I was doing 3d images and walkthroughs of proposed building solutions some years ago. I haven't thought of what our commercial angle will be on this yet but I am sure we will think of something!

Older Post →
Older Posts
Top