February, 2010

Process Improvement

It's interesting to see how different people react to the idea of process improvement. Most people fall into one of two camps - I'll term these the Conservatives and the Radicals.

Conservatives don't see any need for change at all: "That's just the way we do things around here, we get the job done, and I've got work to do anyway." They put no effort into process improvement, and therefore realise no improvements. They never make things worse - but they never make them better either.

"Evil" ToString()

Courtesy of a tweet from Scott Hanselman, here's a nifty ToString() extension method that allows you to name properties and fields directly.

It works like this:

var p
    = new Person
    {
        Name = "William Williams",
        BirthDate = new DateTime(1936, 1, 1)
    };
 
Console.WriteLine(p.ToString("{Name}, born {BirthDate:d}, Age {Age}"));

See the original on pastie.org.

Validation shouldn't be a Blunt Instrument

As developers, we know that data validation is important - the security of our systems and the integrity of our data is vitally dependent upon it. Unfortunately, security and integrity seems to be the limit to which most systems apply

An Obscure FxCop feature

This has to qualify as an obscure FxCop feature:

DoNotDeclareReadOnlyMutableReferenceTypes is a rule that checks for visible read-only fields that are mutable reference types (classes). A mutable type is a type whose instance data can be changed once it has been constructed.

MSDN Magazine downloads

If you're interested in reading MSDN magazines on screen, there are PDF downloads of MSDN magazine available from Microsoft.

A Great Upgrade Experience

It's helpful when applications let me know that new versions have been released, especially when it's a browser letting me know about a security update.

In most cases, though, the timing sucks - just as I open the application with a specific goal in mind, I'm given a choice to make. Either I allow myself to be hijacked down a upgrading detour, taking me away from my immediate goal, or I dismiss the upgrade dialog and have to remember to do it myself later on. Neither option is particularly helpful.

A Discovery in Linq

I've been using Linq to Objects for quite some time - so it was quite a surprise to me when I discovered something new recently - the LookUp class.

LookUp is much like the more familiar Dictionary class, but with a few differences that make it easier to use with Linq.

Improving on POCO: The ORM Problem

One area where improving on POCO has potential to impact greatly is that of database persistence - the domain of the object relation mapper, or ORM.

Adding AzMan Operations

If you ever find yourself using AzMan and can't work out how to add a new operation (as I did today), here's the key (and hard to Google) step.

Wierdness with Fitnesse

I ran into something really weird with FitNesse (the acceptance testing framework) today. --Chances are, it's something I've done wrong - but I can't work out what. If you know, please comment below!-- Updated below with the solution.

Boiling the whole thing down into a simple test case, what I've found is the following.