Posts

Showing posts from January, 2013

TDD and Unit Testing with Moq

In my last post, I mentioned that I've been using TDD and mocking quite a bit this year, and I've fallen in love. It's something I'm very keen on continuing with, as I've now seen that the benefits outweigh the extra time needed to develop your tests. I've written my fair share of stand alone unit and integration tests throughout the years, but until recently I've not used object mocking or stubbing. I've never really appreciated what tests are, and what benefits they give me as a developer, other than they let me write a quick bit of throw-away code that enables me to test the functionality of a class or a method. Only now - 16 years in to my career - do I realise how critical unit tests are to an application, especially in enterprise level systems that have a lot of code reuse and crossover. Not only do well written tests test the functionality of your code base, they also allow you to modify anything with complete confidence that your changes aren...

2012: The Year The World Would End

Image
Despite my growing cynicism towards anything even remotely joyous and celebratory, 2012 has been the best year of my life so far. I married my wonderful wife; celebrated 30 years on the Earth; visited a number of historic landmarks and cities in the UK; spent August travelling through nine American states, sampling a vast array of cuisine and witnessing some amazing sights; and dug my teeth in to a lot of patterns and technology that's really interested me. I've also started on the path to clearing out all of the junk I've accumulated over the past 15 years, which has turned out to be an extremely liberating experience, even if it means I had to bite the bullet and chuck out a vast number of things that "I might use before I die". Fig 1. A shit tip I could prattle on about how awesome married life is, or regale you with my adventures across land and sea, but this isn't one of those god-awful social networking sites whe...