Thursday, July 9th, 2009
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.
Thursday, July 9th, 2009
Typemock have launched a new Unit testing tool, Typemock Racer, and for the launch they are offering a free license for bloggers who will review it.
Get the full details on Typemock’s blog.
Saturday, April 4th, 2009
Ruby 1.8.6 ships with Rake 0.7.3 which I recently needed to upgrade to the latest version 0.8.4. This post describes the simple process to accomplish the upgrade using the Ruby gem system on Windows.
Open a cmd.exe window and type the following:
gem install --remote rake
You’ll see some information progress messages and in no time, Rake will be upgraded to the latest version. You can confirm the upgrade by typing the following:
rake --version
Sunday, February 22nd, 2009
I have migrated my blog to WordPress and am now hosting it externally. We’ll see how this goes.
Wednesday, February 18th, 2009
Once the availability of the iPhone SDK hit the streets I have been very interested observer. I still don’t actually own an iPhone (just yet), but I did receive an 8GB iPod Touch for Christmas. The iPod Touch is basically an iPhone without the phone. It supports nearly all the same apps and as a development platform, matches the iPhone specs. I am surprised at how often I use my iPod for things that I always wished I could use other phones for.
- Internet access – check
- Simple interface – check
- Useful embedded apps – check
- Ability to store and access music, videos and podcasts – check
This little thing has really become an indispensable part of my life and I while I’m perfectly happy with Verizon as a carrier I am strongly debating dumping them for a new plan for my wife and I. She couldn’t care less about having an iPhone, but there are lots of free phones she would be perfectly happy with so I’m not worried about the cost of switching. On the other hand, the two-year contractual agreement with the added stipulation of carrying a data plan for those two years is a significant consideration these days, especially with the current pace of technology churn in mobile electronics. Still, I really do feel that I would use the data plan. Oh yeah, I said that before too. See a pattern here?
What I haven’t attempted to discuss which is no less important and certainly shouldn’t be discounted is the argument that there are still other viable options available for mobile application development; namely, the G1 and Android. Java-based platform…nice, deep Google integration with geolocation services…very nice, open platform…very very nice, platform adoption rate…hmm we’ll have to get back with you on that.
I did read over the weekend that the Android Store was open for developers to begin publishing apps. That’s certainly a good sign. To wit, Microsoft is going to offer a similar service for WinMo apps as well. For me, at least, it’s a situation where I need to pick my poison as it were. While it would be nice to have the option, I really can’t justify the purchase of an unlocked development G1 phone from Google for $499. The ability to write Java is a powerful incentive since I’m going to need to become an Objective-C / Cocoa Touch ninja which I feel is quite achievable, but within what timeframe? I am certain I could crank out Java-based apps quicker, but I guess the anecdote “if it were easy anyone could do it” is true. When you consider that, as of EOY 2008, Apple has sold roughly 4 million iPhones. Next, how many of those are software developers or have the skills to enter the market; smaller number. Next how many of those developers either have a Mac or are willing to burden the cost of the hardware to enter the market; much smaller number, I’d argue. Next, how many of those Mac owners are application developers either experienced with or want to learn Objective-C; significantly smaller number, certainly. Next, how many of those developers are even interested in developing for the iPhone; smaller number yet. Get the picture? The vast majority of iPhone users are perfectly happy with using the iPhone to make and take calls and the total pool of talent for the iPhone development is quite small by comparison. When you plot that against the number of Java developers, the simple economics of supply and demand make a strong argument in favor of the iPhone. I for one hope to capitalize on my investment in learning by earning a few dollars on my application. If I do that’s great. If I don’t I’ll still be happy that I can choose to work on an alternative development platform if I choose to. Seriously, it’s C and I know C very well. To me, it’s a win-win. I can always do Java just like 3-5 million other developers.
Tuesday, February 17th, 2009
I’ve owned several Windows CE-powered devices and have written both commercial and personal apps utilizing that platform and while the familiarity of the Windows idioms, Win32 API and other developer-friendly attributes from Microsoft, I’ve always felt that there is a certain sterility and ho-hum quality to the end product. There was always something missing; graphics quality, marginal OS stability, kludgy device integration are just a couple that come to mind. Regardless of my perceptions, the applications were usually developed for business use and not really targeted at a consumer market. I know this and for the intended purpose, development on the Windows CE platform was straightforward and presented few problems that I wasn’t able to work around. But, this expected in early 2000-2001. The platform was immature and Visual C++ and Visual Basic were the development languages able to target the variety of targetable processors available in the handful of devices on the market. Typically I used a Compaq iPaq or the HP Jornada for commercial development. Since I was an experienced Visual C++ programmer, the Win32 API was plenty fast and didn’t require the monolithic runtime that Visual Basic imposed. It was the only real choice for professional development.
Over the years, I have also owned several Windows Mobile OS-based phones and have still felt that each successive release of the OS brought less functionality and more robust hardware requirements. The tradeoffs didn’t seem interesting to me, but I still bought the phones out of necessity. I wasn’t interested in the rapidly-declining mindshare of Palm OS. Even now, my “daily driver” is a Palm Treo 700W phone running Windows Mobile 5. It does the job, but in all honesty I’ve never used the SD slot for anything, I don’t store any MP3s on it, I don’t use any of the Pocket Office apps. Hmm…why do I use it? Well, back when I bought it, having a full-blown Web browser on a phone was avant garde and I justified the cost of the phone and the exorbitant monthly cost of the data plan from Verizon as something I would use all the time for things like Googling the address of a store, using Google maps, instant Wikipedia access for those situations where I had to know the MSA data for Pocatello, Idaho for an argument I might find myself in. You get the picture and I’m sure you have also rationalized the same kinds of things. You know what, I never found myself in a situation where knowing the MSA data for any city in any country was useful, I never needed Google maps since I have a GPS device in my car, and I never really needed to use Google while driving. Basically, the only times I needed the Web browser was to surf the web while waiting in line somewhere or while waiting at the dentist’s office. Fun stuff, sure, but certainly not enough fun to justify a $49.95 data plan on top of a $39.95 voice plan. I decided I would find an Internet-connected PC if I needed to perform any real stuff. Bingo, problem solved and I canceled the data plan within 6 moths of buying the phone.
To be honest, I have always missed the convenience of knowing I could access anything on the Internet from my little phone on a moment’s notice. So, I have continually been on the lookout for something that was could deliver an immersive user experience at a reasonable price point. What I’ve had been looking for was the iPhone. I finally saw a device that much more than a something to place and receive calls. I marveled at the overall simplicity and quality of construction. It seemed to possess most important attributes I felt lacking in the available phone, small size, useful embedded applications, fast Internet connectivity, a brilliantly designed user-interface that is both immersive and simple to use and, finally, and most importantly, an extensible development platform which could be leveraged for a broad range of customers and application types.
I didn’t rush out and get an iPhone as some did. I wasn’t interested in the cool factor so much as the stability and uptake beyond the early adopters. Remember, I mentioned that an extensible development platform was a deal breaker for me and I didn’t see that Apple had a story to tell here. So I waited and finally rumors surfaced that Apple was, indeed, going to have a developer story to tell. Flash to now…availability of the iPhone SDK.
Monday, February 16th, 2009
I am planning on writing a series of blog posts which chronicle the progress of the development and publication of my first iPhone application. I am an experienced Microsoft developer and want to share my experiences. I have a lot to learn about Macs, the Xcode, iPhone SDK and a bunch of stuff I don’t even know yet. Maybe something I write here will help or inspire someone else. I don’t make any promises about the outcome other than to say that I am highly motivated to see this through as I think I will learn a set of valuable skills which is never a bad thing. I don’t really have a set format as I’m sure that circumstances of my progress will dictate the content both in terms of length and level of detail.
Tuesday, January 27th, 2009
Scott Guthrie announces the availability of ASP.NET MVC RC1 here. Final RTM bits should be shipped next month. Download the RC 1 bits here.
Monday, January 12th, 2009
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.

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.

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.

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.

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.

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:

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.


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

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.
Monday, November 24th, 2008
Typemock are offering their new product for unit testing SharePoint called Isolator For SharePoint, for a special introduction price. it is the only tool that allows you to unit test SharePoint without a SharePoint server. To learn more click here.
The first 50 bloggers who blog this text in their blog and tell us about it, will get a Full Isolator license, Free. for rules and info click here.