Thursday, May 27, 2010

Windows Phone 7 Series running on a modified Samsung Omnia

Looks very slick...voice in French.

Installing Windows 7 on a netbook

I recently bought an Asus Eee PC 1001 HA netbook for my wife to use for a really good price as it was an ex demo (end of line). This model has been superseded by a better model that includes a slightly faster CPU Intel Atom 1.66Ghz as the 1001 has a Intel Atom 1.6Ghz N270 processor. The newer model also comes with Windows 7 as oppossed to Windows XP which is what the 1001 model comes with. I have to say, I think it is brilliant.

As mentioned it came with Windows XP Home Premium edition but as this was for my wife she didn't care. But after getting home I relised I couldn't join it to the Windows Server 2008 domain controller because Home Premium doesn't support Windows Domains. So she couldn't print, fax, access family pictures, get an IP address from the DHCP, access TFS..(not really, shes not a coder!) etc etc You can't even access a network UNC path from Home Edition.

So XP clearly had to come off. So we installed Windows 7 Ultimate x86, bearing in mind this little machine only has 1gb of DDR2 RAM and it runs very well indeed.

But the problem I found was installing the Windows 7 OS without a CD drive and no access to a network share? All I have are USB ports. So as I don't have a optical USB CD drive, I simply downloaded Windows 7 USB/DVD Download Tool from codeplex, found here: It is actually written in C# under Visual Studio 2008, with full source code available to download.

This tool allows you to create a bootable USB flash card. So all I had to do was create a bootable USB flash card using the Windows 7 ISO, configure the BIOS on the Asus to boot from USB, install Windows 7, then job done.

Windows 7 USB/DVD Download Tool

In fact this tool works with DVD's as well, so it will be useful for future DVD burning.
This blog talks about disabling various Windows 7 services for optimization on a netbook pc, but to be honest I didn't need to disable anything, it just works really nicely.

I did forget to mention that I download Asus's drivers for optimal WLAN, display adapter etc to better performance and to get the machine to behave correctly.

Good job Asus...

Saturday, May 22, 2010

Moving Windows Azure CTP account over to RTM - don't forget to remove any unwanted services!

If like me you recently moved your Windows Azure CTP account over to an RTM account, ensure you delete any services that you don't want as you might be charged. I completely forgot I had 2 services deployed in Staging and 2 services deployed in production when I moved my account over. So a few weeks ago I had a bill for £187.10! I had been viewing my bills regularly and didn't see any charges until 24/04/10. So the charges were from 25/03/10 - 24/04/10.

The important thing to note here is the pricing model in Windows Azure - I'm talking about hosting services which is the deploying of services and running services in the cloud bit of Windows Azure - not the Service Bus or SQL Azure - they have different pricing models.

The charges are based on "compute hours". Although do note there are two types of pricing models within Azure. The first is a pay as you go type model so you only pay for what you use. The other model is a fixed contract where you agree to a fixed discounted monthly fee for a given time frame and any excess usage is charged at the standard rate.

Do be aware, no matter whether your services are being used or not even if your services are not running this still eats into your "compute hours". It sounds unfair from the outset, but I don't think it is unfair as for those charges you get a dedicated VM, CPU, memory etc to your services. So you can be sure you'll have the resources available to serve up requests when needed.

So as I am an MSDN Premium subscriber, I opted for the promotional offer of "free" services. So under this offer you get 750 "compute hours" under Windows Azure, 1,000,000 ACS transaction requests on AppFabric, 3 web edition databases etc. See here for more info on this promotional offer:

Utilization over the "free" 750 hours will be charged at the standard rate.

Of course that works out to be one service constantly deployed in the cloud for 24 hrs a day for 31 days. So essentially free.

Now regarding my bill I received, the good news is Microsoft refunded me the £187.10 due to the fact I forgot to remove the services and the fact that I didn't realize they were still deployed as I have only been using the Service Bus within Windows Azure lately (now known as the AppFabric). So I am grateful to Microsoft for doing this as they legally didn't have to.

So when I noticed the bill, the first thing I wanted to do was delete the services to prevent further costs mounting up.

So I went to the Windows Azure maintenance portal over at clicked on Windows Azure and noticed the services. But the Delete button was disabled:

This is not particularly intuitive, but you have to click "Suspend" which is the same as stop. Then the Delete button becomes enabled that allows you to delete the services!

Wednesday, May 12, 2010

MSTest: Not Executed after aborting a debugged MSTest

If you try to debug a MS Test unit test in VS 2008 but stop the debugger before the test is completed (abort the test) the test status will be marked with "Aborted". Which is fine and expected. But if you then try to execute any other test, whether this is debugging a test or just executing a test, it will fail and the status of all attempted tests will be "Not Executed". And from here in no tests will ever execute again..until you kill process "vsperfmon.exe". If you kill that process, then unit tests will then continue to execute.

This defect seems to be fixed in VS 2010 which is great but it still exists in VS 2008 which is a pain as Windows Mobile developers still require VS 2008 to develop WM apps (this defect applies to both desktop and device tests).

There is a bug report on Microsoft Connect:

As always, if you find this defect annoying, then use the site above to vote for a fix.

This bug has been around for sometime and it's only today I learned the workaround!

To inject IServiceLocator or not to inject

I had a discussion the other day about it being a bad idea to inject the IServiceLocator as a dependency into the constructor of consuming types. Now I'm talking about the Common Service Locator by the p&p team at Microsoft ( but to be honest this applies to the Service Locator pattern in general.

The argument was based on the fact that it makes testing more difficult as you not only have to mock or provide types to the constructor but you have to add them to a service locator if injecting the service locator interface.

There are valid reasons for not doing this but we don't live in an ivory tower and sometimes we need to pull types from the container at runtime that we simply do not know at design time. In this case it makes perfect sense for using a service locator, right? as the whole point of the pattern is to abstract container from implementation code.

I'm curious of other developers feel for this and their approach as to whether they do this or not, and if so why.