Planning the Spontaneous

It's more than just a blueprint.

Posts Tagged ‘Ninject’

Snow Go From Here

Posted by Robert Chow on 08/01/2010

If you haven’t heard, Britain’s having one of it’s coldest winters for a long time – cold enough to rival that of 1963 where the snow was at some places 6 metres deep.

I was suppose to go back to Devon to work last Tuesday, and unsurprisingly, due to the weather conditions, this wasn’t the case.

Instead I’ve been stationed here for another week.  Another week spent in Manchester, and some might say lucky you.

I thought so too, but that only lasted so long.  I actually wish I was back in Devon for now.  Ok, it might not be the most exciting of places, but regardless, I do enjoy my time at work.

I’m trying to do some now, but “working from home” is literally “working from home”.  Nothing is as productive as it can be, and nothing goes according to plan.

Sure, I have done some.  But it’s not quite the same.


I’ve had a request to show how to do the multiple Bézier curves I did earlier – that post also seems to be the most popular topics of the blog.  Lucky for some, I am currently trying to write a toolkit for the Renderer library, and being able to create fancy Bézier curves will feature in the near future.

For now, whilst I’m out of office, I’m looking at a few topics me and my supervisor have been meaning to touch upon.


A tool used for dependancy injection, a form of Inversion of Control.  The traditional flow of programming is to use a central piece of code to control the flow; Inversion of Control takes away this design principle.  Dependancy injection introduces the notion of both high and low level modules independant of each other, and should only depend on their abstractions.


M.Spec is a testing framework, and as far as I’m aware, it uses a similar principle to BDD (Behaviour Driven Development) – it uses Given/When/Then statements.  I find these statements can be easily read as given initialState, when performing anAction, then newState.


I’ve been meaning to try and get to grips with this new(ish) language for the past couple of months, but never really gave myself enough time.  A dynamic language, it looks to promise an increase in readability and productivity.

Fluent Interface

This is one thing I am most definately interested in.  Using a fluent interface increases the readability of code, trying to make it read like normal English.  To achieve this, an object may invoke a method, and return itself, allowing the client to invoke another straight afterwards.  Creating a fluent interface also takes the advantage of extension methods in C#.  Read this.


To achieve this, create an int extension Minutes(), returning a class representing time of x.minutes (this case 20).  To create the Ago(), add an extension to the time class (or add it as normal if the time class is self-written), and return an object of the same class, but representing the time now minus x.minutes.

Apparently it takes a rather lot of effort, but to achieve better readability, especially something something close to fluent English, is something I’m definately willing to spend time on.

Let’s hope I’m back soon.


Posted in Computing, Placement | Tagged: , , , , | Leave a Comment »