Wednesday, April 18, 2007

Beta Testing Windows Home Server

Time to try another beta OS from Microsoft. This time, Windows Homer Server.  Thirty seconds in and I'm getting my first error (well, it's better than waiting 30+ minutes like back in the days of the Windows 2000 beta!)
The error was "Could not initialize UI subsystem". I looked around the forums and found suggestions to try and set the DVD
as the first boot device. Mine already was. I then found a suggestion to use different DVD burning software. Rubbish I thought and carried on searching.
Having come to a dead-end, I tried what was suggested and downloaded the free 'ImgBurn' utility. This software is great. Not only did it fix the installation problem, but it's also a light-weight utility to burn stuff to CD's and DVD's (190mb for Nero 7, 1.5mb for ImgBurn!).  Sold!

Monday, April 02, 2007

Framework Design Guidelines

Framework Design Guidelines is a fantastic book about er, guidelines for designing frameworks (API's). Krzyztof, one of the authors, has now posted a video of a talk he did about this very subject.

Monday, March 19, 2007

Running unit tests in Visual Studio Express

The brilliant TestDriven.net can't run in Visual Studio Express (well, from what I've heard, it can, but Microsoft asked for it to be removed).

Therefore, to run unit tests in Visual Studio Express, you must set your debugger application to point to NUnit.exe (or the brilliant MBUnit).  This isn't straightforward in Express and means editing the .csproj file by hand and telling it to run the NUnit exe.

Today, I wanted to run and debug some unit tests I'd written in the XNA Game Studio Express (Visual Studio Express with some XNA bits bolted on).  I couldn't have the excellent right click/run unit test feature and I thought there's got to be a better way than editing the .csproj file manually.

So I changed the unit test project to be a console application and added this to the Main method.

public static void Main( )
{
AppDomain.CurrentDomain.ExecuteAssembly(
@"C:\Program Files\NUnit-Net-2.0 2.2.9\bin\NUnit-console.exe",
null,
new string[ ] { Assembly.GetExecutingAssembly( ).Location } );
}


And it worked.  Which was nice.

Update:

Jamie recently left a message saying that the new Beta version DOES support Express editions!  Read his post here and get downloading straight away!

Sunday, February 25, 2007

Email certificate popups

I recently switched to Vista and Office 2007.  I set-up Outlook with the details of my email certificate.  The trouble is, whenever sending a message, Vista pops up a dialog asking whether to grant or deny permission to the certificate.  The exact text is:

"Grant or Deny this application permission to use this key".

The way around this is to not use Outlook to install the certificate but to right click on the certificate in Explorer and let Vista install it.  Another important thing when doing this is to NOT click the Strong option - this is what causes the prompting - leave it as Medium.

To reinstall the certificate:

  • Go to Internet Explorer/Tools/Option/Content/Certificates then Export your certificate (checking the box to delete it after export). 
  • Then, right click from Explorer and select Install. 
  • When this is done, reselect the certificate from Outlook - Tools/Trust Center/E_mail Security.

Sunday, February 11, 2007

A tool for converting animated GIFS to spritemaps

I'm having a lot of fun playing around with the XNA development kit. One day I'll get around to learning 3D but for now I'm still having too much fun with sprites! I wanted a tool that took an animated GIF and produced a spritesheet (a bitmap with each frame of the GIF).

From this:

... to this:

I couldn't find a tool forthis (although I'm sure they exist), so I did my own and uploaded it to my tools page

Saturday, February 03, 2007

New version of the Code Formatter Plugin for Windows Live Writer

Version 1.0.0.2 can be found here.  This update adds the ability to change the font - including the font name, size, style, and weight.

Thursday, January 18, 2007

A New Version of Microsoft Terminal Services Client (Remote Desktop) Version 6 of MSTSC now supports multiple monitors(!) as well as wide-screen resolutions and other features that I haven't yet tried. This is the version that comes with Vista but it's worth noting that there is a download for Windows XP SP2 and Windows Server 2003. It's also worth noting that the new features are only available if the machine you're connecting to is Vista or Longhorn Server.

Wednesday, January 17, 2007

FluentInterface

I've posted before about the StringBuilder tip in .NET.

Martin Fowler describes this as an ExpressionBuilder pattern.

More formal terms are described in his post, for instance, a FluentInterface which allows code like this:

customer.newOrder() 
	.with(6, "TAL") 
	.with(5, "HPK").skippable() 
	.with(3, "LGV").priorityRush();

I personally like this style but agree that if every object had these strange looking methods it would certainly pollute an API.

Another formal term describing how not to pollute an API is CommandQuerySeparation.  Basically, this means that a method that changes the observable state of an object shouldn't have a return value. 

The ExpressionBuilder pattern is the solution to this:  it is a seperate object that defines the FluentInterface and yet doesn't pollute the API. 

I'm glad that I now know more than 3 patterns, the Factory pattern, the Visitor pattern, and the Submarine pattern.

Friday, December 22, 2006

Settling into my XNA Development Environment

Microsoft recently released the XNA toolkit for XBox 360 and PC games development.  The supported IDE for this is Visual C# Express

I am quite picky about my development environment, for instance: I like the Consolas 12pt font;  I like 2 tab spaces instead of 4;  I like virtual space in the editor; etc. etc.

Visual Studio Express does not give the option to change tab size and virtual space settings so I immediately jumped into regedit and edited the values.  Then I thought that maybe I could export my settings from Visual Studio 2005 Professional and import them into Express.

This worked, with the exception of some command bar stuff that isn't supported in Express.  The added bonus was that the Options screen now displays more settings that before:

Options screen before import:

Options screen after import:

Very nice.  It's just a shame that Express doesn't support plug-ins as I really miss ReSharper.

Tuesday, December 12, 2006

ReSharper 2.5 Released

The download links don't seem to work at the moment (they're still pointing to version 2.0.2).  The link to the direct download is http://download.jetbrains.com/resharper/ReSharper-2.5-setup.exe  (which I rather cleverly deduced from the existing broken link of http://download.jetbrains.com/resharper/ReSharper-2.0.2-setup.exe)

Remember though, this is Visual Studio 2005 only.