December 2006 Blog Posts

Next year's Microsoft events - just announced PDC 07

Apart from all the TechEd's out there Microsoft naturally has quite a few more events on their schedule. I went to PCD05 and it was really cool! Actually I went with all of my colleagues at Dotway I think we were about 14 at that time. Pretty cool investment if you ask me to bring the whole company from Sweden to Los Angeles for a week in order for us to keep up to date in the business - or rather ahead of most since that is a necessity when we're creating courses and seminars for our customers as well as for Øredev. Today...

Be careful when you override Equals (and use IEquatable)

Hi! Please, bare with me through this complex intro to the real goodies below! ;~) In a project I'm working on we decided we wanted a single instance cache so we'd not fetch the same data form the data store over and over again. We started adding weak references of instances to a dictionary. Worked nicely. We then added the functionality of lazy loading in our code. At times we needed the data in class A only and not all the data in the subclass B. The key for the instance of A then needed to be the same as the key for...

Don’t offend the advocates of (insert extreme interpretation of the newest trend here)

My post When quick and dirty becomes just dirty has sure raised some reactions! There is a common streak in those who invested too much credibility in one (usually the latest) trend. First they begin by going overboard in one direction and when the inevitable backlash comes they go into some kind of protective attack mode. These are the same people who didn't know when to stop in the first place! At the turn of the tide it is perceived that the critique is not only against the now not-so-novel-idea but also against the advocates of said idea. The idea which...

When quick and dirty becomes just dirty

Waterfall processes and it's heavy design-documentation likes had their definite flaws. Saying had certainly does not mean these processes are not used any more today. They are and some teams are successful using them. Can't point to any particular case at present but at least that's what I'm told. It is however a fact that many have come to seek other forms of development processes. Let's leave it as a postulate - heavy docs actually work for some. But mostly not! Many developers have instead today turned more Agile. This being one of the coolest newest terms of our trade to...

Use the SetUp/TearDown methods in your TestFixtures

An observation regarding nUnit: I’ve actually seen a case where a developer did not use SetUp, TearDown methods (or TestFixtureSetUp, TestFixtureTearDown either for that matter) with the motivation that it makes the unit tests harder to read and understand. As a consequence the repetitive tasks of a TestFixture are repeated again and again in each test. Say you are writing tests for a class called ‘AClass’. You are then quite likely to write a TestFixture class that looks like this [TestFixture]Public class AClassTests{} You start adding tests and note that each test begins by setting up your AClass and perhaps inserting a few...