Thursday, July 9th, 2009

Review of TypeMock Racer

Multithreaded code is difficult to write and nearly impossible to get right without a significant amount of knowledge of the internals of the operating system; things like kernel mode, user mode, pre-emption, scheduling to name a few. What’s even more difficult is the task of trying to test code that is by its very nature designed to perform very complex tasks that can be quite difficult to simulate. At best, you can use the debugger to manually freeze and thaw threads and step through code to identify and fix problems with multithreaded code. The problem has always been that the tooling available for developers on the Microsoft platform has been nearly non-existent, save for that from Intel and some obscure third-parties. With the trend towards TDD, developers have long been able to create unit tests for code that typically is not running concurrently in multiple threads of execution. Leave it to the folks at TypeMock to rescue those of us tasked with creating, debugging and maintaining multithreaded code. They have created a really interesting product that, frankly, no one else has atempted; a unit testing framework for multithreaded code. The product is called TypeMock Racer and it’s priced at $890 per seat. Definitely not cheap, but if you are writing multithreaded code, you simply MUST have this in your toolkit. I downloaded a 21-day trial copy and ran thorough the sample code scenarios as well as skimmed thorough the documentation and I have to say that I’m impressed at the deliberate approach TypeMock have taken to make testing multithreaded code as simple as possible for developers. Basically, you decorate your test methods the same way that you would normally do with other unit test frameworks and Racer performs it’s magic by exercising your code in an attempt to detect concurrency violations for several known threading problems such as deadlocks, starvation, and a few other anti-patterns. What is especially nice is the ability to visualize the results of the test using a graphical flowchart-type dialog that is displayed and shows the flow of control for your threads and pinpoints the source of the problem so you can more easily correct the problem. Another cool thing that Racer does is provides support for saving metadata about the test which can be provided as an attribute if you need to re-run a test under the indentical set of circumstances. This is very helpful for working though Heisenbergs and other scenarios that would, otherwise, be early impossible to reproduce under test. I strongly recommend you take a look at what Racer has to offer and see if it might help you write better multithreaded code that can be proven to be robust through unit tests for a variety of scenarios.

1 comment » Filed under Racer, TDD, Tools, TypeMock by bcraun at 22:52.


Monday, January 12th, 2009

Balsamiq Mockups for Desktop

I recently had a need for a tool that would allow me to rapidly prototype a significant number of conceptual ui designs for a ASP.NET MVC project I am working on. My first thought was to use Visio since it has a stencil for nearly everything under the sun. So I fired up Visio and being looking in earnest for stencils with web-style widgets. After about five minutes of prodding, I gave up and decided I needed a better tool for the job.

A few months ago, I recall reading somewhere about a startup that released a product that was purpose-built for creating user-interface mockups. A quick exercise of Google-Fu brought me to the Balsamiq website where I found what I was looking for Balsamiq Mockups for Desktop. This looked promising.

image_thumb_11

Mockups for Desktop is a bit different from the traditional download and install model that most of us are familiar with. Instead Balsamiq takes a different tack and bills itself as a plugin for multiple Web Office platforms. Supported platforms include Confluence, JIRA and XWiki. The desktop version is the version I used which runs as a standalone app on Windows. Mockups for Desktop underlying technology to bring web applications to the desktop and is available for Windows, Mac and Linux. The only requirement is that you need to install the Adobe AIR runtime which is free from Adobe. In the case of Linux, Adobe AIR is still in beta at the time of this writing, but fear not, Balsamiq has instructions to get you up and running on no time. (As a side note, Balsamiq’s founder was a Senior Software Engineering Lead at Adobe and was responsible for Adobe ConnectNow, a free web conferencing tool.)

After installing and launching Mockups for Desktop, you are presented with an interface similar to this.

image_thumb1

Notice that there are three main “frames” of the ui; Application Bar, UI Library and Mockup Canvas. The Application Bar contains the menus of the app, the UI Library contains all of the widgets available for use. Also notice the primitive look and feel of the elements in the UI Library. This is intentional and is what I think really sets this tool apart from other similar tools. The point of rapid prototyping is that one has the freedom to make changes. Realize that you are only creating a high-level look-and-feel, not a formal document that must be rendered at pixel-level exactness. I was immediately comfortable with the idiom and found myself creating several concepts within the first 15 minutes of using the tool and without reading a single word of the extraordinarily well documented online help.

The main functionality of the app is found within the Mockup menu item. The desktop version contains a few extra items since this version enables one to work offline, without being connected to the host platform as the other versions require.

image_thumb_2

The export format options are especially interesting as they allow one to exchange mockups with others. Something that would be nice here is an option for version control integration or maybe some team-level collaboration. Since the other versions of Mockups for Desktop utilize collaborative platforms already, I imagine that teams using Mockups for this purpose would already have the tools required. Still, primitive integration is better that no integration.

Looking at the Application Bar, notice the search box labeled Quick Add. This is one of the coolest features and allows one to quickly add items from the UI Library to the Mockup.

image_thumb_3

Simply type a couple of letters in the box for the control you want to add and it’s added to your mockup. For example, typing “bu” will produce a dropdown containing the controls that begin with those letters. I found this to be a feature that I began to depend on once I learned most of the UI control mnemonics.

image_thumb_4

The UI Library, or UI Controls Library, is the long strip of UI Controls just below the Application Bar. It contains all of the different UI control types that Mockups supports, in alphabetic order. A horizontal slider is provided for convenient and quick access to the controls. I counted 66 available controls. Plenty for nearly any UI I would need to prototype. A sample list of available controls:

image_thumb_5

To add a new UI control to the canvas, simply select the control type you wish to add, then you can either “drag and drop” it to the mockup canvas below or simply double-click and Balsamiq Mockups will place it on the mockup canvas for you.

The mockup canvas is the main working area and it allows you to move, resize, adjust, tweak…you get the idea. The full list of actions is typical of a graphics program and includes:

  • Adding, Selecting, Moving, Resizing, Layering, Deleting and Grouping

To give you an idea of the variety of things that can be done, here’s a couple of screen shots I grabbed from their website.

image_thumb_7

image_thumb_8

Mockups for Desktop also has the ability to add over 60 hand-drawn icons to embellish your mockup.

image_thumb_61

All in all, I found the tool very intuitive to use without help and was quickly able to render several conceptual ideas electronically, print and save them for later. I would estimate that I was able to reduce the cycle time from beginning to end from 8 hours to about 2. That, my friends, is a saving of 75%. Considering the value of my time, $79 is a small price to pay for Mockups for Desktop.

My final thoughts are that I say enough good things about Mockups for Desktop and I feel it fills a much needed void in the world of UI development. If you are looking for a quick way to rapidly prototype UI concepts, do yourself a favor and give Balsamiq Mockups for Desktop a try and I think you’ll be as big a fan as I am.

Take a look at their website. They have some pretty neat ideas and are socially conscious in their pursuits. Balsamiq have published a brief video tour of Mockups for Desktop here. You can also read about the features on their website here.

Leave a comment » Filed under Balsamiq, Tools, UI by bcraun at 9:30.