Creating a generic test base class that will mock dependencies

castle windsor    dependency injection    design patterns    unit testing
A base test class using Castle Windsor and the ILazyComponentLoader so I don't have to manually setup my mocks. Uses NSubstitute and NUnit too.

Creating https bindings for IIS on the command line

iis
I've got a script 'ResetEnvironment' that developers can use to reset their developer environment when something goes screwy, or to create the environment when they are first starting on the project. The script has fully automated new environments, except for adding the HTTPS binding to the website in IIS. This always had to be done manually. Another developer has joined the project and I thought this was a good time to really sort this problem out, so we don't have to manually do this step whenever we reset our environment.

Building your own custom FluentValidation validator

asp.net    asp.net mvc    fluentvalidation
How to make your own fluent validator for the FluentValidation framework for .NET

Utilising the render field pipeline when using Glass for Sitecore

Glass Mapper    sitecore
How I invoke Sitecores RenderField pipeline when using Glass.Mapper.Sc without having to use magic string (gimme type safety!)

Getting started with Sitecore MVC as an ASP.NET MVC developer

Glass Mapper    asp.net mvc    sitecore
Sitecore introduced MVC back in version 6.6.0 in the middle of 2012. I'm just now getting started with it. Here's a getting started guide from the perspective of an experience ASP.NET MVC developer. Hopefully it's also useful for people who aren't experienced MVC developers.

Using HTML5 video and knockoutjs

HTML5    knockoutjs
I've been playing with video in HTML5 for the last few weeks and trying out a few javascript video players. I settled on JWplayer for use with my knockout.js view model.

Selecting the previous event from a schedule

c#
How I went about selecting the activities / event from a schedule of defined activities when I needed the last performed set of activties.

Encapsulating repository queries

design patterns    domain driven design    linq to sql    nhibernate
I've moved away from putting query (eg GetCondition / FindCondition) o n my repositories. Now I create queries objects for each would be method. Why?

Updated Web Essentials 2012 and now Visual Studio 2012 crashes?

visual studio
Did you just install Web Essentials 2012 version 2.5.1 and now Visual Studio 2012 crashes? The fix is simple. Disable, delete, renable.

A knockoutjs binding for twitter bootstraps popover

javascript    jquery    knockoutjs    twitter bootstrap
A custom knockoutjs binding for twitter bootstraps popover. This provides declaring popover using knockoutjs, assigning custom html, ensuring only one popover is open at any one time, and closing the popover from a button or link within the popover.

iRacing Star Mazda Round 1 2013.1 review

iRacing    simracing    star mazda
My first race for the Vortex team, racing in iRacing's Star Mazda series. This week visited Spa, in the Belgian forest. I was initially only going for 1 race but ended up doing 4.

When to use Response.CreateResponse versus HttpResponseException with Web Api

Web Api    nhibernate
You need to use throw HttpResponseException if you're returning a HTTP error status code if you want Transactions to roll back.

Triggering validation from a custom knockoutjs binding

knockoutjs
This post explains how to successfully use the knockout validation library with your custom knockoutjs bindings. The basics is you need to add a call to the validation library validationcode binding at the end of you binding's init method.

Cancer

health    personal
How to get in a panic at work? Have your wife phone you and tell you the Dr just informed her she has Cancer. However, it's not all that bad - My thoughts as we (my wife) has a battle with Cancer.

Ordering child items with NHibernate

c#    fluentnhibernate
I recently had to implement an ordered collection of items within it's parent. I stumbled around for a while trying to get he FluentNHibernate mapping to work.

Has iRacing instigated it's own demise?

iRacing    simracing
iRacing has made some pretty drastic changes to the scheduled some of the most popular series in the game. It seems they taken the desires of the majority, and in doing so are weaking the strength of the field in the game itself and therefore reducing it's value and going against it's own original mission statement.

The oval experiment

iRacing    oval-racing    simracing
It's that time of the Star Mazda season. Race 5 and Iowa. Iowa is an oval track and it's usually a wreck-fest. Partly because most of us roadies can't drive ovals and partly because a bunch of oval guys usually join in and cause chaos. Most decent driver treats it as a drop week and stays well clear of Iowa. Myself included, along with my usually SM buddies.