Skip to main content

Posts

Showing posts from June, 2012

I no longer build C# apps

Okay so the title is slightly misleading, I'm still writing   code in C# (.Net) but I'm no longer manually building the solution inside Visual Studio, no F5, no Ctrl+Shift+B... You might be thinking huh? What I mean is I no longer go round the continual cycle of  write code, compile code, test code, refactor code etc. We've managed to remove the compile & test  phases from the development process and I can't elaborate how liberating this is. This has been achieved by using a continuous testing framework - tests are executed as you write the code. I found this article back from 2007 stating all the benefits you'll get from using such a framework - ' It’s turning the knob on Test Driven Development up to 11 ' - so true... I'm currently working in an environment where the main constraint is not the tools we're using but the underlying OS. We're stuck with 32 bit Win XP machines for at least the short to medium term and our biggest pro

Understanding RefCount in Reactive Extensions

A couple of weeks ago  @LordHanson  & I ran into an issue converting a stateless async service exposed as an Rx cold observable to a  connect-able   hot observable. The issue was solved after a couple of hours, what follows is how we how got there. The service is an Rx wrapper around the Caplin messaging API. The Caplin API is designed around the idea of opening a connection, subscribing on subjects and then receiving messages asynchronously - pretty standard and nothing unusual. When used in an app where there's only ever one subscriber for a subject then a service designed around Rx cold observables is suitable - we had something similar to what's shown below, in this example I've substituted the Caplin part with an observable timer to spit out messages every second: So this is a cold observable because every time the Listen method is called a new stream is created with it's own set of messages being published - Lee Campbell has a good explanation of hot

Getting MSpec working with Visual Studio 2012 RC & R# 7 EAP

These are the steps are used to get MSpec working with the release candidate for Visual Studio 2012 and the EAP for Resharper 7. I'm using the build 64 (09/06/2012) of R# 7 EAP - latest releases can be found here . Firstly, I have the following MSpec style fixture shown below, as you can see the Resharper icons aren't showing up on the left hand side: The next step is to add the correct Nuget package for MSpec - you have to get the pre-release version, not the current production release. I installed it using the package manager console in Visual Studio - don't forget the ' -Pre ' suffix to get the right version of the package: At this point you're probably thinking you're good-to-go, but there's one important step left - the pre-release MSpec assemblies have to be copied to the app data folder for Resharper. Luckily the MSpec guys have this in-hand and have created a set of batch files as part of the Nuget package installer. Browse