Monthly Archives: May 2009

Switches for Windows Services

Brian Noyes just posted up about adding a –c switch to Windows Service applications (actually he was talking specifically about self hosted WCF services). I completely agree that this is a good practice, you would be surprised how many times I see developers doing crazy stuff like commenting lines of code in and out as they alternate between their debug and release code.

I’d like to add a few things to the list of recommended command line arguments for Windows Service executables:

/install <username> <password>

/uninstall

/help

As a practice I also recommend always adding a ConsoleTraceListener to the list of listeners at start-up of the executable (in code, not via configuration). I spend a fair bit of my time looking at the deployment challenges related to software development and getting this right significantly helps the deployment process.

Advertisements

I could have used Autofac!

Late last year I was working with Graeme Foster on a project which used ASP.NET MVC. We wanted the code base to be somewhat testable so when we built our controllers we were thinking about using some kind of dependency injection framework. Eventually, given the number of controllers we actually needed we decided that manual constructor injection would be the easiest way to go and just create a custom ControllerFactory.

This evening I’m reading through some of my feeds and I noticed this episode of .NET Rocks with Nicholas Blumhardt on the topic of Autofac. Just looking at the API it looks nice and tidy and minimal (which is what I want from my IoC container technology).

The cool thing is, it seems like it comes with a built in ControllerFactory. I haven’t used Autofac, but I think I will give it a shot next time I need a container.

P.S. The reason it triggered as I was reading my feeds is that I remember Graeme Foster saying that using Lambda expressions to initialise types in a container would be cool. Looks like Autofac supports something like this.

Effectiveness of Twitter

Recently on a locally focused .NET developer mailing list a participant (Greg Keogh) posted an item about his recent experiments with twitter and how he is now deleting his user account. This spawned a little bit of discussion on the mailing list both for and against twitter.

To give you some context Greg started using Twitter at Code Camp Oz when many of the other attendees were participating in a background conversation about the content of the presentations as well have having a bit of fun.

One of the criticisms often levelled at any mass communication format (blogs, twitter, forums, newsgroups) is that the signal to noise ratio is so more that it is ineffective. I can see a point to a degree, if I added up the total amount of data flowing towards me out of something like Twitter vs. what I actually find useful then that number would rapidly approach zero. But maybe that is the wrong equation?

Personally, I don’t use twitter every day, and in the rare occasions that I do use it I usually have one of the following agendas:

  1. I just want to vent.
  2. I want to ask a question of people I know watch Twitter.
  3. Watch for the response from #2.
  4. I’m bored, entertain me.

It is really #2 which is the most important. I’m not on Twitter because I want to tell the world whether my coffee is good or not, I’m on it because it is the appropriate medium to reach some people with low priority broadcast messages.

The reality is that if you use Twitter like I do, the signal to noise ratio is pretty good. I’m using it on my terms and I’m not letting it run my life.

How Microsoft is getting its groove back.

I’ve been watching the press around things like Windows 7, Visual Studio 2010 and Office 2010. It seems that for the most part the new operating system, tools and suite will be well received by the technical community.

I suspect that after Windows Vista (which I didn’t really mind by the way) most people are actually looking for a good news story to get them to upgrade from Windows XP. From a developers perspective, Visual Studio 2010 is going to be a stellar development environment with lots of good incremental enhancements in the runtime which extend its reach, but also a big focus on quality and architecture tools in the higher editions.

Things are looking up if you are a Microsoft developer.

Features on the cutting room floor.

When a collection of people get together to make a movie they use more film that ends up in the movie itself. For sure some of that film contains outtakes and errors which mean that they simply can’t be used, but other film contains perfectly good scenes – so why does it get left out?

The reason is that the director is trying to tell a story and sometimes scenes from the film that they have recorded, whilst related, don’t add value to the overall story.

I see this as an analogy for building the product backlog for a software development project. When the project kicks off everyone involved in the endeavour are going to put forward suggestions for things that can make it into the product. But ultimately you have a target budget (length) that you need to work to and if it isn’t going to add any value then you should cut the feature.

The question is – who is the director? Is the director the person who sold the idea of the project? Is the director the person who is paying for the project? Is the director the person who is using the software? Is the software developer or Scrum Master?

I don’t know, and chances are neither does your peers. This is why in the Scrum process we enshrine the role of Product Owner to help make these tough decisions. The Product Owner is an absolutely critical role on any Scrum Project and this person once identified needs to be given a pair of scissors so that they can make the appropriate cut.