Wednesday, September 26, 2007

Windows ReadyBoost

The first time I really looked at Windows Vista was at the 2005 PDC in Los Angeles. I remember learning about this cool feature that allows you to use a USB key as virtual memory to enhance performance.

Unfortunately, I only have a pathetic 128MB USB key so now that I have Vista, I've never felt the need to actually use Windows ReadyBoost. I've also been concerned that ReadyBoost would simply wear out the drive after a few months.

However, after reading Tom Archer's blog on ReadyBoost, I think I'll buy a 4GB USB 2.0 flash drive and give it a try. Apparently you need a USB 2.0 flash drive with at least 1:1 flash memory to system memory.

Technorati Tags:

Tuesday, September 25, 2007

NOD32 Antivirus System

I've been running Windows Vista on my notebook for several months now, but only recently installed an antivirus product. It's easy to be lulled into a false sense of security given that Windows now includes a firewall and Microsoft have become very efficient at delivering hotfixes. I'm also pretty conservative with my web browsing so I think the risk of infection is low.

But the fact is that viruses can be difficult to recover from once they infect your operating system. I recently tracked down and eliminated several Trojans on a older Windows notebook and was really annoyed to discover that the malware had hacked the registry to break Windows Update! The shortest path to recovery at that point was a format and reinstall.

Since then I've reviewed a few different antivirus products for Windows Vista. The first step was to view the list of Microsoft Antivirus Partners. I tested both Norton Antivirus and the free AVG  Antivirus but was unimpressed with both products.

Norton Antivirus 2008 certainly looks the part but it dramatically slows down your operating system. I uninstalled this bloatware after 30 minutes because I refuse to accept that a virus scanner should lead to noticeable loss of performance.

AVG Antivirus Free Edition fares better in the performance stakes and it has the added appeal of being free! Grisoft make no guarantees about grade of service for automatic updates and I couldn't help but feel that Free AVG is a very basic product. I quickly dragged it to the recycle bin.

After spending some time on Google Blog Search, I noticed that ESET NOD32 is highly regarded and boasts the least performance impact of any solution. NOD32 isn't the cheapest solution on the market but I can vouch for its fast scanning throughput and minimal memory footprint. NOD32 isn't bloated with antispyware, a firewall or phishing detection. It's a streamlined virus scanner and I can highly recommend it to anyone who is currently shopping. NOD32 just sits in the background and you'll hardly know its there.

Monday, September 17, 2007

Windows Vista Service Pack 1

Microsoft are planning a service pack for Windows Vista in early 2008. I've been using Windows Vista for several months now on my notebook and on my work desktop. However, I'm not sure I see the need for a service pack since Windows Update installs hotfixes as they are released. The service pack will rollup all the hotfixes and provide minor enhancements to system software such as BitLocker and Defragmenter.

Paul Thurrott has written some articles about the service pack on his site. He seems to be of the opinion that Microsoft is co-releasing the service pack with Windows Server 2008 to encourage business users who typically wait for the first service pack before buying Microsoft products. I can understand that perspective but must point out that Microsoft have become much better at delivering quality software.

Sunday, September 16, 2007

Russian and Portuguese MFC Resource Files

A college recently pointed out that MFC8.0 does not include support for Russian and Portuguese. This presents a small problem if you want your common dialogs to display localized information for Russian and Portuguese clients.

However, localized MFC resources are available for both of these languages, you just need to know where to look. I spent some time trawling through Russian developer forums, making use of Google translation. I eventually found some translated MFC6.0 resource files and managed to update them to MFC8.0 with the assistance of a Russian college.

Sorry I can't help with the Portuguese resources just yet. However, I'm happy to share the Russian resource files with anyone who needs them. You can download the bits here.

SYSTRAN Translator and Dictionary

Take a look at this useful Vista sidebar gadget from SYSTRAN.  It includes a bilingual dictionary and machine translator for 52 different languages.


Sunday, September 9, 2007

Free Disk Defragmenter

If you need to compress a virtual machine hard disk, I highly recommend using Dave Whitney's free defragmenter before running the Virtual PC compactor. This tool is more efficient than the standard Windows defragmenter and will make a massive difference to the size of your virtual machine.

Thursday, September 6, 2007

Virtual Disk Pre-compactor

Have you ever tried running the virtual hard disk compactor in Virtual PC 2007? Before running this utility, you must defragment the hard disk inside the virtual machine and run the virtual disk pre-compactor.

Virtual disk pre-compactor is available as an ISO on your host machine under C:\Program Files\Microsoft Virtual PC\Virtual Machine Additions. Mount the ISO inside the virtual machine and it will self install.

Virtual Machine Additions are installed by default with Virtual PC 2007 but you must install the service pack to get the pre-compactor in earlier editions.

Saturday, September 1, 2007

Doctor International

I was recently reminded of a developer I worked with several years ago at Boeing named Jim Bunting. Jim has moved up the chain these days and now works as a contracts manager but back then he was a gun MFC developer. Jim is a great guy and I'll always remember the time he was mistaken for the infamous John Bunting from Snowtown in South Australia.

Jim had a standard response whenever I had a programming question: "... open the MSDN and ask Dr. GUI". In case you haven't met Dr. GUI, he was the author of a regular column in the MSDN and posted some interesting articles, including this one on Conway's Game of Life. The articles are quite useful if you're learning to program with the .NET framework.

However, it turns out that Dr. GUI is not alone! Dr. International has a similar column on the Global Development Portal. If you're a little confused about Windows Multilanguage User Interface (MUI), I suggest reading this Dr. International article.

CultureInfo meets Windows MUI

Culture information is tightly integrated in the .NET framework but often overlooked by developers. Every time you format a string, parse a number or load an embedded resource, the .NET framework takes the current culture into consideration. Culture information is encapsulated  by System.Globalization.CultureInfo and is active on every thread.

Consider the following simple console program and you will see that the current thread has two properties of type CultureInfo: CurrentCulture and CurrentUICulture. CurrentCulture supplies the culture for the thread and is referred to by default when formatting numbers, dates and currency. CurrentUICulture is used by the resource manager to look up culture-specific resources at run time. These properties are easy to confuse and can refer to two different cultures at runtime.

class Program
static void Main(System.String[] args)

Thread culture information is inherited from the operating system. Paste the above code into Notepad and compile it on the command line [csc.exe program.cs]. Run the program and provided you have an English version of Windows you will see "en-US" printed twice. Now open the regional settings control panel, change the format culture to French (France) and run the program. This time you should see "fr-FR" followed by "en-US".

The CurrentCulture is easily changed by setting the format culture in the regional settings control panel. CurrentUICulture is a different story and cannot be changed using regional settings on most versions of Windows. What would you expect to see if you could change the UI Culture for the operating system?

Most versions of Windows are localized by Microsoft for a single neutral culture so you can't change the language for strings displayed on operating system menus and dialogs. Microsoft ships localized versions of Windows for English, Japanese, Spanish, Russian and many other cultures. However, you need a specific build of Windows if you want to change the UI Culture for the operating system.

Windows Multilanguage User Interface (MUI) Version is available for Windows Vista Ultimate and allows you to conveniently switch your UI Culture. Language packs are also available for Windows XP Professional.

I highly suggest a copy of Windows Vista Ultimate if you're building globalized .NET software and want to test the display of localized UI strings. However, if this isn't possible, you can always override the CurrentUICulture in code, shown below. Many applications provide a languages menu to allow the user to set the UI Culture at runtime.

class Program
static void Main(string[] args)
System.Threading.Thread.CurrentThread.CurrentUICulture =
new System.Globalization.CultureInfo("fr-FR");