Thursday, December 6, 2007

Mount Cook and the Mueller Glacier

I recently travelled to Mount Cook on the south island of New Zealand for a few days of hiking. The Mount Cook area is fantastic for mountaineering in the summer and equally fantastic for off piste skiing in the winter. I've posted some of the photos on picasa and if you like what you see, I highly recommend getting in contact with Alpine Guides.

Friday, October 26, 2007

The Death Star Canteen

Eddie Izzard believes there must have been a Death Star Canteen.

 

Tuesday, October 16, 2007

TFS 2005 Power Tools

Brian Harry recently posted about the Sept 2007 version of the TFS Power Tools. Apparently this will be the final release of the Power Tools for TFS 2005 client. The package includes a command line interface for TFS, Process Template Editor, Check-In Policy Pack, etc.

The command line interface looks particularly useful and allows you to rollback committed changes, undo a changeset, query work items, and many other tasks.

Click here to learn more about TFS Power Tools and download the Sept 2007 release.

Technorati Tags: , ,

Wednesday, October 3, 2007

How to Create a Test Code Signing Certificate

I recently needed a code signing certificate to test with signtool.exe. Creating test certificates is a bit of nightmare because the required command line utilities are reasonably complicated. I hope this will save you some time.

makecert.exe -r -n "CN=Sign Test" -eku 1.3.6.1.5.5.7.3.3 -b 01/01/2005 -e 01/01/2020 -sv signcert.pvk signcert.cer
cert2spc.exe signcert.cer signcert.spc
pvk2pfx.exe -pvk signcert.pvk -pi pwd -spc signcert.spc -pfx signcert.pfx -f

The required command line utilities are included in the Windows Vista SDK. You can use the resulting PFX file to sign any DLL or EXE:

signtool.exe sign /f signcert.pfx /p password /t http://timestamp.verisign.com/scripts/timstamp.dll /v app.exe

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)
{
System.Console.WriteLine(
System.Threading.Thread.CurrentThread.CurrentCulture.Name
);
System.Console.WriteLine(
System.Threading.Thread.CurrentThread.CurrentUICulture.Name
);
}
}

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.Console.WriteLine(
System.Threading.Thread.CurrentThread.CurrentUICulture.Name
);
System.Threading.Thread.CurrentThread.CurrentUICulture =
new System.Globalization.CultureInfo("fr-FR");
System.Console.WriteLine(
System.Threading.Thread.CurrentThread.CurrentUICulture.Name
);
}
}


Monday, August 27, 2007

Microsoft Terminology Translations

Microsoft have published a glossary of terms that are used in Windows with translations for 59 different languages. The glossary is quite useful when localizing Windows applications, especially if using a tool like Sisulizer that performs machine translation.

The value of the glossary really depends on your particular application but I've experienced automatic translation rates of 20% for menus and 10% for dialogs. That's great news if you need to localize your application for several cultures.

My only gripe is that the glossary uses a CSV file instead of TMX. This isn't a problem if you use Sisulizer though. I can't seem to get the glossary to work with Lingobit so please leave a comment if you have any luck.

Wednesday, August 8, 2007

Philips 3D Display

Philips has created a new display technology for 3D visualization without the need for 3D glasses. The technology is conceptually simple, involving a sheet of transparent lenses interfaced with a liquid crystal display. The sheet causes both of your eyes to view a slightly different image and your brain perceives these differences as depth.

Of course, 3D technology isn't really new at all. Philips have simply packaged  a solution that is targeted at advertisers and video gamers. Don't expect to get 3D HDTV any time soon. This technology is dependent on a digital signal processor that combines a regular 2D image with a depth map before rendering. Regular 2D video cannot be shown in 3D without a depth map. However, Philips have created an OpenGL control that extracts depth information from existing 3D models so that they can be viewed in 3D.

Click here for more information on Philips 3D products.

Technorati Tags: , , ,

Sunday, August 5, 2007

Visual Studio Team System Rosario CTP

Microsoft has released the August CTP for Visual Studio Rosario. The CTP is delivered using a Virtual PC image so feel free to download the image for evaluation without polluting your development machine. Be warned that the VPC setup is a little involved. There is a CTP white paper if you're just after an overview. Otherwise, here are the basic CTP features:

  • Enter, edit and track work items using Excel or Team Explorer
  • Link work items in a parent-child relationship
  • Identify track and report work item dependencies
  • Query requirements test coverage
  • Perform manual testing

Here are the links:

Download Virtual PC 2007
Download Rosario August CTP
Download Rosario CTP White Paper

Thursday, August 2, 2007

Visual Studio Team System Future Releases

Are you interested in the upcoming features in VSTS 2008 and Rosario? Microsoft has published some useful information here. It looks like Geoff will have to wait until Rosario for hierarchical work items.

Wednesday, August 1, 2007

Bascule.co.jp


Wow ... we need faster residential broadband in Australia. If you have any doubts about the future of the web, check out what the guys at Bascule are doing. I know, I know. The site takes about 10 minutes to load unless you're on T1 but believe me, it's worth the wait. Save this link until you have some free time.

 

Technorati Tags: ,

Sunday, July 29, 2007

Sharepoint and TFS

I've been doing some work with Sharepoint (WSS 2.0) lately in an effort to improve online collaboration with the team at work. I've found that meeting workspaces are a convenient way to manage meeting agenda, attendees, documents, discussion and tasks.

However, I'd really like my WSS tasks and shared document libraries to integrate with TFS. Meeting workspaces are a  great way to capture information but TFS offers some advantages for work item tracking and version control. Apparently help is at hand!

There is a project on CodePlex to build a TFS Migration and Synchronization Toolkit. The toolkit includes samples that convert data from WSS to TFS. One sample migrates and synchronizes data between a WSS Shared Document Library and TFS version control. Another sample migrates and synchronizes data between a WSS Task List and TFS work items.

The toolkit can also be used to integrate many other systems with TFS. I haven't downloaded the toolkit and tried it out yet so I'm happy to receive comments from anyone who has experience.

Thursday, July 26, 2007

Visual Studio 2008 Beta 2

Visual Studio 2008 Beta 2 is now available for download with RTM likely before end of 2007. You can also expect to see the first CTP for Visual Studio Rosario in the next week! I'll post a link for the Rosario CTP virtual machine when it becomes available.

Sunday, July 15, 2007

Google Search Appliance

I discovered today that Google sells intranet search appliances, allowing you to search your business systems using Google technology. The basic model indexes up to 50,000 documents and retails for around 2300 AUD. You can scale the solution by adding additional appliances. Click here for an online demo.

Thursday, July 12, 2007

Chuck Norris

I was watching Family Guy last night and heard this Chuck Norris joke:

There is no chin behind Chuck Norris' beard, only another fist.

I guess it was funny at the time. Click here for more.

IEEE 802.11

Like many of us, I have a wireless router installed at home because I like the flexibility of portable network access. My Netgear router boasts pre-N technology meaning that the PHY is based on a draft version of IEEE 802.11n. But what does this mean?

IEEE 802.11 specifies 3 physical (PHY) layers which define how digital signals are modulated.

Protocol Frequency Modulation Max Rate
802.11a 5 GHz OFDM 54 Mbps
802.11b 2.4 GHz DSSS 11 Mbps
802.11g 2.4 GHz OFDM 54 Mbps


I've deliberately left 802.11n off the list because it's still a draft protocol. However, 802.11n will be interoperable with 802.11a/b/g and will support greenfield mode offering up to 248 Mbps between 802.11n peers.

Why does 802.11n have such a high maximum data rate? There are a few reasons. The first is that greenfield mode operates in the 5 GHz band which is relatively quiet compared to the 2.4 GHz band shared by microwave ovens and Bluetooth devices. The higher band means that channel bonding can be used to increase theoretical data rate. The second reason is that 802.11n supports OFDM, a multiplexing technique that significantly reduces the impact of transmission errors due to multipath and inter-symbol interference at high frequencies. The third reason is MIMO or multiple-input multiple-output, which is an antenna technology that increases channel utilization.

However, very few notebooks are fitted with pre-N wireless cards, so the highest data rate most of us can expect is 54 Mbps unless we install a non-WiFi certified card. Hence the problem with pre-N.

Pre-N wireless technology is based on a draft standard and interpretation varies among vendors. It's therefore very difficult for the WiFi-Alliance to certify interoperability for pre-N hardware. Furthermore, pre-N hardware is unlikely to be compatible with 802.11n hardware, meaning that the notebook you buy in 2008 with an 802.11n card won't support greenfield mode if peered with a pre-N router.

I actually run my pre-N Netgear router using 802.11g only and use WPA Personal and TKIP to create a robust security network in accordance with 802.11i. When configuring your wireless router, remember to steer clear of WEP because the encryption algorithm is cryptographically weak and is considered insecure.

Technorati Tags: , ,

Tuesday, July 10, 2007

VS Orcas SDK - MPLEX & MPPPG

I was recently looking at the Visual Studio Orcas SDK and discovered that it contains two tools, MPLEX & MPPG, which allow you to create your own managed language. I took a closer look at the documentation and found that the author of the tools is none other than John Gough, QUT.

I took a class on compiler construction at QUT earlier this year so I'm interested in seeing what mayhem I can cause with LEX and YACC. I probably won't give up weekends though.

Windows Installer XML

Software developers rarely give much thought to the setup and installation experience of end users. First impressions usually stick and a mediocre setup experience can seriously impact perception of software quality. 

I've created several setup projects in Visual Studio but always felt frustrated by efforts to customize the installer, often resorting to Orca to hack the MSI database. The resulting installers are difficult to maintain and fit poorly in the overall build process.

However, there is an open source solution called Windows Installer XML (WiX) that offers a powerful DSL and compiler for customizing installers. WiX also installs several MSBuild targets for build process integration.

WiX simplifies many installer tasks including database creation, progress updates, UI localization, and launch after install. UI Wizards are fantastic and offer four different flavors depending on desired sophistication.  The Mondo flavor includes welcome page, license agreement, setup type (typical, custom, complete), feature customization, browsing for target directory, disk costing and maintenance mode dialogs.

Unfortunately, the power and flexibility of WiX comes with a steep learning curve so it may not be the best solution for all applications. However, it's worth pointing out that WiX was used to build the installer for Microsoft Office 2007 and was originally developed by Microsoft.

Technorati Tags: , , ,

Visual Studio 2008

Visual Studio 2008 will be launched in February 2008 together with Windows Server 2008 and Microsoft SQL Server 2008 according to this press release. I wonder when the RTM will be available to MSDN subscribers? I'm still keeping an eye out for Visual Studio Orcas Beta 2 which should be available in the next month.

Technorati Tags:

Thursday, July 5, 2007

Zero Gravity

Check out this neat Silverlight game! Thanks Shane.

Technorati Tags:

Monday, July 2, 2007

VS Orcas Beta 2

After searching the web this morning, it looks like Microsoft will release VS Orcas Beta 2 this July or early August. The Acropolis team is also looking to release CTP2 in the interim with a supplementary CTP shortly after Orcas Beta 2.

Sunday, July 1, 2007

Outlook 2007 Connector for Live Mail

Microsoft have released an updated Outlook Connector that allows you to access and manage your full Live Mail account from Outlook 2007.  I stumbled across this component because I was looking for a faster way for Outlook 2007 to synchronize email headers over http! The connector seems to have done the trick. It is a beta product so I recommend reading the FAQ before installation.

Tuesday, June 26, 2007

Test Driven GUI Development

I read an interesting article today about test driven development and GUI applications. Unit testing is rarely seen in the context of user interfaces because the presentation and business logic are often tightly coupled. Many developers view the task as being too difficult or not worth the time. However, with the right tools and the right client architecture, test driven development is really quite simple and can help to build quality into your software.

Download one of the presenter first examples available from Atomic Objects and you'll quickly see just how easy test driven GUI development can be.  Also take a look at NMock.

Technorati Tags: ,

WPF Commands

Irena Kennedy has a WPF ApplicationCommands sample on her blog. The sample is very simple but shows how to hook cut/copy/paste/undo/redo commands for a textbox in WPF. However, there are some minor issues. The sample explicitly sets the command target which prevents each of the commands from targeting the control that has focus. A better approach is to add each of the commands to a toolbar or menu:

<Menu>
    <MenuItem Header="Edit">
        <MenuItem Command="ApplicationCommands.Cut" />
        <MenuItem Command="ApplicationCommands.Copy" />
        <MenuItem Command="ApplicationCommands.Paste" />
        <MenuItem Command="ApplicationCommands.Undo" />
        <MenuItem Command="ApplicationCommands.Redo" />
    </MenuItem>
</Menu>

Menus have native support for ICommand.CanExecuteChanged so the MenuItems correctly reflect ICommand.CanExecute using Control.Enabled.

Have a look at the Commanding Overview in the MSDN for more detailed information.

Technorati Tags: , ,

Wednesday, June 20, 2007

Windows Live Writer

I'm testing out the latest beta for Windows Live Writer and so far it looks great. The main advantage is WYSIWYG editing of blog entries since Live Writer downloads style information from your blog. My only pain at the moment is that Blogger doesn't support image uploads!

Technorati Tags:

Zurich Airport

Check out the Zurich Airport XBAP. WPF really is a whole new world. Also take a look at Silverlight Surface.

Dominoken XBAP

I’ve been having a play with some WPF & XBAP code lately. If you haven’t heard of XBAP, it's a smart client technology that allows you to deliver rich WPF applications via web browser. Take a look at this impressive app I found courtesy of Bascule. Note that if you’re not running windows vista, you might need to install .NET Framework 3.0 but the XBAP will prompt you to install the bits.

http://wwwbeta.microsoft.com/japan/xbap/dominoken.xbap

Technorati Tags: , ,
 

Wednesday, June 6, 2007

Acropolis CTP

I've had an initial look at Acropolis and I must say that it's very interesting. It has a strong SCSF influence but the experience is simplified and improved. Acropolis provides a DSL to help you assemble the components in a module. With SCSF, you needed to assemble a module in code using a WorkItemController. Acropolis achieves the same result by providing a design surface with drag and drop to configure services, views, connection points etc.

Acropolis provides product line templates, targeting different application types. When you create an acropolis solution, you nominate the targeted product line, e.g. document based application, wizard based application, etc. You then use a wizard to configure the application workspace and user interface extension sites. For example, you could choose a document style application with tabbed workspace, a main menu bar and a status bar.

Inside your application, there is a very clear distinction between views and business logic. Acropolis provides a DSL for designing parts. A part is similar in concept to the view & presenter combination in SCSF. However, you use the part DSL to configure connection points between the view and presenter. In this context, a connection point could be a data provider, notification, property etc. The idea is that you can define the relationship between view and business logic in a very concise way.

WPF plays a pivotal role in Acropolis. Don Box wrote an interesting blog entry that highlights the role of WPF in separating model, view and presenter. Acropolis formalizes this approach by introducing a design surface and components that lead to clear MVP separation.

Remember that although XAML is the enabling technology for WPF, it is only mark-up and is ultimately used to generate code. With code and partial classes, you can write whatever rubbish you like under the bonnet. WPF and XAML are a great part of the overall solution but insufficient on their own to make sure that developers correctly follow the MVP pattern. The DSL introduced in Acropolis goes a long way towards bridging the gap.

Checkout the video introduction on Acropolis and if you're interested, download link for the Acropolis CTP.

Technorati Tags: ,

Sunday, May 27, 2007

Managed Add-Ins for .NET 3.5

A new architecture for managed add-ins is introduced with .NET 3.5. The new functionality shipped in System.AddIn addresses common tasks such as discovery, activation, isolation and sandboxing. Add-in version problems are also addressed by allowing developers to isolate version adapters into separate assemblies.

Add-in discovery and activation is simplified with two new classes: AddInStore and AddInToken. AddInStore helps you to find add-ins based on type and location while AddInToken allows you to activate. Here's some sample code:

IList<AddInToken> tokens = AddInStore.FindAddIns(typeof(AddInType), addinPath);
foreach (AddInToken token in tokens)
{
Token.Activate<AddInType>(AddInSecurityLevel.Internet);
}

The framework SDK also includes a tool called AddInUtil.exe that makes it easy to manipulate the AddInStore.

A variety of isolation & sandboxing modes are supported upon activation. Isolation and pooling allow you load add-ins in-appDomain, cross-appDomain and cross-process. You can also conveniently apply standard and custom permission sets to the sandbox.

Jesse Kaplan has a recently written an article on managed add-ins in the Architecture Journal and is a regular contributor to the CLR Add-In Team Blog.

Technorati Tags: ,

Thursday, May 24, 2007

SCSF May 2007

The SCSF May 2007 release provides support for WPF. Visual Studio tooling for WPF is still in development so you need to go through a few simple steps prior to installing the factory.
Fortunately, the SCSF installer shows a prerequisites page listing the required components.

All you need is the February 2007 guidance extensions and optionally the guidance toolkit and studio extensions for WCF and WPF. Note that the factory also requires SQL 2005 Compact to enable disconnected service agents! I'm really looking forward to having a closer look at the offline capabilities.

It's interesting to note that you don't need to install the composite UI application block or enterprise library any more. The binaries are actually shipped with the factory and you have the option to install the source code. The smart client guys have done a fantastic job on the installer.



Technorati Tags: , ,