UI Custom Action Guidelines

Windows Installer provides a rich set of standard actions that handle the typical needs of an installation: installing files and folders, manipulating the registry, searching for existing resources in the registry or the file system, controlling Windows services and so-on. Custom actions are handy things for when you need to do some custom processing that isn’t covered by one of the standard actions. You can customize your UI experience by invoking an action when the user interacts with a control by publishing a DoAction control event for the control. This post describes some guidelines (and one workaround) for custom actions invoked by the user interface in a Windows Installer MSI package.

Read the rest of this entry »

Branching Wizard Sequences With WiX

Wizard dialog sequences are common in Windows Installer packages as they lead the user through a series of questions to customize the installation of a product. Welcome to the install, select the installation directory, ready to install and so-on are common dialogs present in the wizard dialog sequence. Sometimes you need to make a choice between two dialogs based on the user’s input, however:


So you’ll need to branch to different dialogs on the Next button of the Installation Type dialog (and the Back button of the Install Location dialog) based on the user’s input. This post describes the best way to achieve this branching dialog behavior in Windows Installer, using Windows Installer XML (WiX) as the authoring tool.

Read the rest of this entry »

“Xcode 3 Unleashed” by Fritz Anderson

My first exposure to Macintosh programming was with THINK’s Lightspeed Pascal in 1988. I was a graduate student at the University of Utah and the teaching assistant for the introduction programming course using Pascal. The student machines were Mac SEs running Macintosh System 2. Pascal provides a fairly encapsulated runtime environment to simplify its use in teaching programming, so it wasn’t really “Macintosh programming” although you could interact with the toolbox if desired.

Twenty years later, I find myself working at a digital content company and our content creation applications support both Windows and Mac OS X as a customer platform. While we largely rely on UI toolkits to isolate our applications from UI differences between platforms, we still need to build and debug code on Mac OS X. All of this work is done in Xcode. I was in a weird situation: I needed to know how to use Xcode, but I didn’t need to know how to program Mac native applications. I needed a book that would tell me about Xcode and how to accomplish typical developer tasks in it, but I didn’t need a book that would spend too much time on Objective C, Carbon APIs, Cocoa APIs and other Macintosh specific coding tasks. “Xcode 3 Unleashed” by Fritz Anderson is just the book I needed.

Read the rest of this entry »

Unit Testing Concurrency

Jonathan House passed along a link to Testing Race Conditions in Java, a post from google’s open source blog. It describes ThreadWeaver, a tool for unit testing concurrency in java.

This reminded me of a recent article in MSDN magazine Code Coverage for Concurrency. It describes SyncCover a tool for measuring code coverage in unit tests involving concurrency.

Java and C# both provide language level primitives for synchronization. This makes it difficult to write unit tests that force the code down different paths relating to concurrency and synchronization. The nature of the language level primitives doesn’t lend itself well to faking them out by encapsulation through interfaces or virtual methods.

C++ takes a library approach to concurrency and synchronization. While I haven’t tried this yet myself, I have a feeling that the library approach would make it easier to control the playout of various synchronization and concurrency scenarios when writing unit tests.

Direct3D Programming Tip #9: Use The Managed Resource Pool

Resource management can be a challenge for Direct3D applications. Before DirectX, display adapters had limited amounts of fast device memory and programmers had to manage that memory manually in order to achieve the best performance. The Direct3D API provides different memory pools to allow the application to specify the lifetime management policy of a resource.

Read the rest of this entry »

Agile Code Reviews, Part 2

In my post on agile code reviews, I described how we were attacking our code through automated refactorings that we trusted to apply without tests. Mostly we applied a series of Extract Method refactorings to long methods in the process of performing a Compose Method refactoring on the long method. Eventually, your team will run out of situations where you can apply automated refactorings to improve the design of your code and you’ll have to start applying actual code changes. Several of the commenters on my previous post remarked that making changes without unit tests implies risk that can only be averted with sufficient manual testing and that such risk is better mitigated by automated tests. In this followup post, I’ll describe the results from our team at applying the decoupling techniques described by Michael Feathers to our legacy code so that we could backfill unit tests onto the legacy code in preparation for a design change we want to make.

Read the rest of this entry »

Exploding Software Engineering Myths

Gery Derbier forwarded a link on the agile list for “Exploding Software Engineering Myths”, an article by Janie Chang at Microsoft Research. Chang describes the research of the Empirical Software Engineering and Measurement (ESM) research group at Microsoft . The group investigated a number of software engineering myths empirically using the large software engineering teams at Microsoft.

Read the rest of this entry »

Agile Roundtable Notes: October 1st, 2009

The Salt Lake Agile Roundtable meets the first Thursday of every month at the Borders bookstore in Murray, UT from 2pm to 5pm. These are my notes from the October, 2009 meeting.

Read the rest of this entry »