Tag Archives: Windows

Speccing my dream development PC

My main development machine is a 4 year old Dell desktop, PC running 32 bit Windows Vista. Time for a new PC. I have been doing a bit of research, mostly by looking through back copies of PC Pro magazine (which I recommend,  by the way). I am speccing it out here on my blog in the hope that I, and anyone else thinking about a new PC, can benefit from my research and (more importantly, given my limited knowledge of hardware) the assembled wisdom and experience of readers of this blog.

A system failure could lose me several days work and a lot of mental energy to sort out, so reliability is my number one requirement. After that I am interested in performance, particularly speeding up compilation and linking, as this has a significant effect on my productivity (my table planner software is now well over 100k lines of C++ code). Getting a fast machine also means it will last longer before it becomes obselete.

Form factor

Tower desktop. I don’t like using laptops for extended periods and there is plenty of space under the desk for a tower case. Having a bigger chassis means more options for upgrading and hopefully less chance of overheating. I like to have my PC physically locked to a ground anchor to reduce the possibility of theft. So the case needs to have a Kensington-compatible security slot I can attach a security cable to. Some LED bling wouldn’t hurt.

OS

Windows 7 64 bit Professional (or Ultimate is if I decide to use bitlocker drive encryption). Windows 7 is increasingly what my customers are using. 64 bit will allow me to address >4GB RAM.

As I develop for both Windows and Mac, I could use a Mac for my main development machine. But I am more familiar with Windows and its associated apps, you get more bang for your buck with a PC and I’m not keen on Apple’s authoritarian attitude to developers. So I prefer to use Windows for my main development machine and use a Mac Mini for porting.

RAM

8GB of DDR3 RAM. Maybe more, depending on cost. But I am not sure whether having more than 8GB of RAM will make much of a difference to real world performance. DDR3 memory seems to be fairly standard on high end PCs. I can’t imagine the clock speed of the memory (e.g. 1,333 MHz vs 1,600 MHz) affects development related performance much. I haven’t seen any data on this.

Storage

Possibly a 128GB Crucial RealSSD C300 SSD for storing \Windows and \Program files and a 600 GB 10,000 RPM WD Velociraptor HDD for storing everything else. SSDs seem to be increasingly the way to go for storage that is predominantly read-only and the prices are coming down. 128 GB should be ample for Windows and lots of applications. But there have been issues over the reliability and performance of some SSDs, notably those with Indilinx controllers. anandtech.com, Jeff Atwood and PC Pro all rate Crucial SSDs well. The WD Velociraptor is one of the fastest HDDs around and 600 GB is currently the biggest one you can buy. It is pricey though at around £0.30 per GB, with 7,200 RPM drives around £0.05 per GB. Especially if I buy an extra one to keep as a hot spare.

I am still making up my mind on this though. Having two separate drives means an extra possible point of failure. Also some people say that, while benchmark results are impressive, the difference in performance between SSD and fast HDDs isn’t that great in real world scenarios. I also wonder whether a 10,000 RPM HDD is going to be as reliable as a 7,200 RPM HDD, such as the Samsung Spinpoint F3. I don’t know of any independent data on HDD reliability between different makes and models. In the absense of such data I guess the next best bet is to look at how long the manufacturer warranties are. You need to be fairly confident on reliability to give a 5 year warrantly.

I am also considering encrypting the drives for extra security. This will keep my data secure in case of theft and it also means I can return a defective drive under warranty without worrying about the security of the data on it. The main alternatives are Truecrypt and Windows 7 Bitlocker. Tests show Truecrypt AES encryption adding a 5-12% performance penalty. Anecdotal reports seem to show that the difference is hardly noticeable in real world use, especially with a fast CPU. A comparison of Truecrypt and Bitlocker from April gives Bitlocker a small advantage for speed, but favours Truecrypt for its flexibility. Also Truecrypt is free, whereas Bitlocker is only available if you buy Windows 7 Ultimate.

My current PC has 2 disk HDDs in RAID1 (mirrored) configuration. This was intended to decrease the chance of data loss, but it has been a huge headache. I have had to replace one or other of the RAID1 HDDs 4 or 5 times while I have had this PC. I can only assume that RAID was responsible for this catastrophic failure rate, so I certainly won’t be going for RAID again.

Media

Any reputable make of DVD drive that can write dual layer DVDs should be fine. The 8.5 GB capacity of dual layer DVDs is useful for backups. I don’t see any need to pay a premium to get Bluray.

Motherboard

A Gigabyte or Asus motherboard with support for USB 3.0 and SATA/600. I have just bought a USB 3.0 external HDD for backup so I would like to make the most of the additional USB 3.0 performance and a fast SATA connection is necessary to get the most from a fast HDD. Gigabtye and Asus motherboards seem to do well in the PC Pro magazine tests.

Power supply

Any respectable make should be fine. If a power supply fails the power surge can wreck the whole machine, so it definitely isn’t worth risking a cheap and nasty power supply to save a few pounds.

USB ports

Lots, including some USB 3.0 ports.

Graphics card

AMD Radeon 6850. I don’t play a lot of computer games, but I want a graphics card fast enough to give me the option. I would also like to have the option of multiple monitors, so it needs to have at least 2 DVI outputs. PC Pro magazine are recommending the AMD Radeon 6850 as exellent value if you don’t need the fastest possible card.

CPU

Intel Core i5-750 (4 cores). Raw processor speed is obviously important, but you pay quite a premium to get the very fastest chip. The i5-750 seems like a good balance between price and performance. Multiple cores are useful for running VMs and compiling (apparently Visual Studio 2005 requires a tweak to use multiple cores for compilation). Quiet fans would be nice. I’m not interested in overclocking as I worry about the effect this could have on reliability.

Networking

Gigabit Ethernet.

VDU, keyboard and mouse

I will re-use my existing monitor, keyboard and mouse.

Software

The less crapware pre-installed with the OS the better.

Warranty

The longer and more comprehensive the better.

Manufacturer

I have neither the time, the inclination nor the aptitude to build a PC myself. So I will be looking for a UK company that can build a PC close to the above spec. I had a terrible experience trying to buy a media PC from gamingpc-guys.co.uk earlier this year (I had to do a chargeback to get my money back when neither PC or refund had appeared after a month), so I certainly won’t be approaching them. Thankfully they seem to have gone out of business anyway. Given the problems I have had with the current Dell and the ludicrous cost of Dell replacement parts, I won’t be going for Dell again either. UK PC manufacturers that regularly do well in PC Pro tests include:

So I will be investigating how close a system they can provide me to the above spec and for what price. Interestingly all these custom PC companies seem to have products aimed very much at gamers, not developers. Given that there are a lot of developers in the UK that seems surprising. I guess most developers get their PC bought for them by IT departments and don’t have the luxury of a custom built PC. I think these companies are missing a trick by not having a PC aimed at developers amongst their base specs.

If you had roughly £1000/$1700 to spend on a development machine, what would you choose differently from the above and why?

Free computer wallpaper

I got bored of looking at the standard Windows and Mac desktop wallpaper, so I decided to re-purpose some of the photographs I have taken on my travels. I have created standard and widescreen versions. They should be high enough resolution even for most developers’ monitors. Happy Christmas.

Licensing

You can freely use these images as wallpaper on your computer. However they may not be modified, used for any other purpose or distributed (except via http://www.successfulsoftware.net) without my explicit written permission. I retain the copyright and all other rights to these images.

Instructions

Left click on a thumbnail of the appropriate size/aspect-ratio for your monitor.

Right click on the full-size image and select:

  • FireFox: Set as desktop background
  • Internet Explorer: Set as background
  • Safari: Use image as desktop picture

1920 x 1200 wallpaper

These images are suitable for wide screen monitors (aspect ratio 8:5) including:

  • 1920 x 1200
  • 1680 x 1050
  • 1440 x 900
  • 1280 x 800

Stirling Falls, New Zealand.

Window reflection.

Peak 43, Nepal.

Palm, Queensland, Australia.

Lenticular clouds near Mount Sefton, New Zealand.

Kalahari sand at sunset, Namibia.

Heron Island, Queensland, Australia.

Waves, Hawaii.

A MiG-29 Fulcrum performing the 'cobra' manoeuvre.

Dead Vlei, Namibia.

Dead Vlei, Namibia.

Boyd Falls, New Zealand.

Great Barrier Reef, Queensland, Australia.

Great Barrier Reef, Queensland, Australia.

Aquarium, Plymouth, UK.

1600 x 1200 wallpaper

These images are suitable for standard monitors (aspect ratio 4:3) including:

  • 1600 x 1200
  • 1152 x 864
  • 1024 x 768
  • 800 x 600

Stirling Falls, New Zealand.

Window reflection.

Peak 43, Nepal.

Palm, Queensland, Australia.

Lenticular clouds near Mount Sefton, New Zealand.

Kalahari sand at sunset, Namibia

An MiG-29 Fulcrum performing the 'cobra' manoeuvre.

Boyd Falls, New Zealand.

Great Barrier Reef, Queensland, Australia.

Aquarium, Plymouth, UK.

Notes

Creating wallpaper wasn’t as easy as I thought (nothing ever is). You need images that are in landscape format, are not too saturated, contrasty or busy and are cropped and resized to exactly the right width and height. Thankfully I had some tools to help – I used PicCrop to do the cropping, BatchPhoto for batch creation of the thumbnail images, Xplorer2 for batch file renaming and Photoshop Elements for everything else. Some of the images are only available in wide screen format as they didn’t work as well in a 4:3 format.

All the photographs were taken by me with a Minolta Dynax 7D digital camera or scanned from slides taken by me with a Minolta Dynax 700si. Goodbye Minolta cameras, I miss you.

Ten mistakes microISVs make

Here is a video of the “Ten mistakes microISVs make” talk I gave at the Software Industry Conference 2009 in Boston. Total duration: 27 minutes.

The slides aren’t terribly easy to read, due to the resizing and compression of the video. But you can also download the paper and slides:

A big thank you to Alwin and Sytske of collectorz.com for doing the video. You can read Alwin’s excellent software marketing blog at alwinhoogerdijk.com.

Feel free to embed this video, as long as you include a credit and a link back to this blog.

How many of these mistakes have you made? How many are you still making?

Getting ready for Windows 7

windows-7I am currently downloading the new Windows 7 release candiate. It is 2.36 GB and the ActiveX download control predicts it will take around 10 hours in total (NB I am also doing a large FTP upload, which is probably slowing it down considerably). Once the download is complete I intend to install it in a VM to test my table planning software.

You can download the latest Windows 7 release candidate here. It is free to download and use, but  it expires on 01-June-2010 and will shutdown every 2 hours starting on 01-March-2010 (insert your own joke here). A couple of points to note from the Windows 7 FAQ:

While the RC is stable and has been thoroughly tested, it’s not the finished product. Your computer could crash and you could lose important files. So please back up your data and please don’t test the RC on your primary home or business PC.

When you use the RC, your PC sends information to our engineers to help them check the fixes and changes they made based on Beta tests.

Microsoft hasn’t officially announced when Windows 7 will be for sale. But there are rumours that it is planned for October 2009. Will you be ready?

Interview with Craig Peterson of Beyond Compare

craig-peterson

I am a fan of file and folder comparison utility Beyond Compare from Scooter Software. It is a very polished and powerful piece of software with a big following. But I was intrigued by some of the unusual decisions they had taken: competing in a market with lots of free alternatives; going 6 years between major upgrades; re-writing from scratch; releasing a Linux version; and having an extremely generous trial policy. How had they succeeded despite ignoring much of the conventional wisdom? Craig Peterson of Scooter Software kindly agreed to answer my questions.

Can you tell me a bit about your background before working on Beyond Compare.
I started at Scooter Software straight out of college.  I did a lot of programming for fun before then, but this was my first professional job and my first introduction to Delphi.

How long have you been working on Beyond Compare and what is your role?
I’m the lead developer and I started here in late 2000, a few months before significant development on v2 started.  Most of my time is spent working on the directory comparison and the virtual filesystem layer (ftp, zips, version control), but there are very few places in the program that I haven’t worked on.  My non-development tasks include managing the build process, interfacing with our component vendors, keeping track of any interns, and tech support, when there’s difficult questions or when the dedicated staff don’t have time.

How many other people work on Beyond Compare on the business side and on the development side?
There’s one other full-time developer, one part time developer, two in tech support, two in sales, and our president, who handles everything else.

There are lots of different file comparison tools. How do you manage to run a successful business with so many competitors, many of them free?
Competing with the free tools hasn’t been as hard as I expected.  The big advantage we have here is that people are paying us for the software, so we have strong incentive to provide good tech support and to provide the features they want.  We work 8 hours a day on it, which gives us more time to develop new features than someone doing it as a hobby, and we can afford commercial libraries that someone providing a free utility can’t.

As for the commercial competitors, it’s mostly a matter of providing something that they don’t.  In our case BC’s directory comparison is much more powerful than the alternatives, and we have viewers for other file types like images, binary files, and data files.  That allowed us to keep competing even when we were lagging in other areas.

What are the main methods you use to promote Beyond Compare?
We rely almost entirely on word of mouth.  We’ve had lots of customers tell us that they brought BC with them when they switched jobs and ended up getting their companies to spring for larger licenses.  We do spend some money on Google AdWords, and we hired a company to periodically submit our site to search engines and download sites, but we’ve never run a print or banner ad.

scootersoftware.com has an enviable Google page rank of 6 and ranks second for “file comparison software”. Have you spent a lot of effort on SEO?
We had a company help with SEO for a lot of the 2.x lifetime, and they’d suggest tweaks to improve things.  For v3 we took a different approach and redesigned the site to make it more accessible to potential customers.  I’m sure some of those changes helped, since we ended up adding more descriptions and using more synonyms, but it was primarily a case of asking how we could make it easier to find the information someone would want and expanding on that.  We still have a fairly wordy page title though, and I think that’s entirely for the search engines’ benefit.

Are most of your customers programmers, or does the software appeal to a wider audience?
I’d say more than 50% are programmers, but there’s definitely a wider audience.  System administrators use it for migrating servers, web developers use it instead of a traditional FTP client, and non-techs use it for backups or synching their laptops and desktops.

How long do you allow people to use the trial version?
The trial is for 30 days, but it only counts days you actually run it, so if you use it infrequently you could easily go six months or more before it times out.

I used Beyond Compare for ages before I bought a licence. I would have bought it sooner if you had been less generous with the trial. Why did you go for such a long trial period?
That goes back to competing with all the other products out there.  If someone installs two programs to evaluate, and then doesn’t have a chance to really try them out until a month later, the one that works is more likely to get the sale.  It also makes it more likely that potential customers will learn the application and start relying on it, so when it does come time to pay they’re less likely to throw out that investment and switch to another tool.

I understand Beyond Compare v3 is a complete re-write. Why did you feel a complete re-write was necessary? Was it a good business decision in hindsight?
There were two reasons why we felt a re-write was justified: (1) we had a lot of features we wanted to implement that wouldn’t work in the current framework, and (2) we over-estimated the speed that we could re-write it.

In the text compare we wanted inline editing with dynamic re-comparisons and 3-way merge, neither of which would have been easy to integrate into the v2 codebase.  The directory compare had similarly major changes, though a lot of that is internal and in preparation for other features, so it isn’t as visible.  There was also all the work we did to get a Linux release out.  It wasn’t a complete re-write though.  Anything that didn’t need significant changes, like our reporting engine, was brought over mostly as is.

I think it was a good business decision in that it allowed us to rethink and rework a lot of things without the old baggage, but it was bad in that it significantly limited what we could release in the meantime.  We ended up going 6 years between major versions and even though we were always busy adding new features, we couldn’t release them until we got back to feature parity with v2.

Beyond Compare is written is Delphi. What would you say are the advantages and disadvantages of Delphi compared to other development ‘stacks’?
I think Delphi is still the best tool for developing a native Windows application quickly.  It’s very easy to mock up interfaces and then fill them in with code.  The resulting exes don’t have any external dependencies, which makes redistributing them easy.  The VCL (UI framework) ships with source code,  and that has permeated the community, so the vast majority of third-party components also include source.

On the flip side, it still can’t produce 64-bit executables and isn’t cross platform.  It doesn’t have a garbage collector or as large of a class library as Java or C#.  The community isn’t as large either, so there’s usually only a couple of choices when you’re looking for specific components, and if that vendor stops developing it, there aren’t as many people to pick up the slack.

If you had to do it all again, starting now, would you still choose Delphi?
Probably, but I would seriously consider C# or Qt.  In our case we have a lot of experience with Delphi and we know the libraries, so starting from scratch in another language would be a significant barrier.

Beyond Compare has a very slick user interface. Did you do any usability testing?
Not as such.  Our primary usability improvements come from using our own product.  We use BC every day, for every comparison we do, so anything that sticks out tends to get squashed quickly.  We also get alpha/beta versions into customers’ hands as soon as possible, and keep iterating until they’re happy.  V2 and v3 both had private beta tests that lasted over a year and a half, and some of the features changed dramatically in response to that feedback.

Beyond Compare has a nice integration with Windows Explorer. Was that difficult to do? Were you able to do it in Delphi?
The first version of it was submitted by a user, so it wasn’t difficult at all.  It has taken a lot of refinement to get perfect though, and we were changing it all the way through to the final 3.0 release.  It is written in Delphi, though I did rewrite it in C++ in order to get a 64-bit version working.  FreePascal has since started producing 64-bit binaries, so we’re back to the single Delphi version again.

You have Windows and Linux versions. What did you use to write the Linux version?
We’re using a heavily customized version of Borland’s now-dead Kylix product, which was Delphi for Linux.  It does allow us to compile both versions from the same source code, but it’s showing its age and I wouldn’t recommend it to anyone else.  Our driving goal is to have the best Windows version we can, which means sticking with Delphi and using what’s available to produce the Linux version.  If OS X and Linux support outweighed that we would use a cross-platform option like Qt or Java, but we believe the Windows version would suffer in that case.

Do you sell many licences for Linux?
We sell enough to fund its development, so it’s a successful product.  It does introduce new challenges though, both in development and tech support, so if we were a smaller developer it probably wouldn’t be worth the overhead.

Do you think there will there ever be a web version of Beyond Compare?
I can see it as a possibility, and it would be interesting to explore, but it’s not something we’re looking into right now.  I think it would have a different audience than the current product, and would probably never be as powerful as what we can do locally.

How did you choose the price?
Our $30 standard edition is about the same price as our commercial competitors, and seems to be the standard shareware utility price.  The pro edition was priced based on our competitors, what our customers were telling us they’d pay, and what we felt the downward pressure of the freeware/opensource alternatives introduced.  We keep the price low in order to make our profits on larger quantities sold, instead of a larger margin per-unit.  We have increased our multi-user pricing considerably over the years though;  the discounts were very steep in v1 and v2, and the feedback we got was that it was just too cheap for what it provided.

I see some translator credits on the website. Is v3 available in languages other than English?
Not officially, but we have just released beta versions of a couple of languages.  The current credits are for the v2 translators, who are generally the same people working on v3 translations.

How important are resellers to your sales?
We get a lot of sales through resellers, but it’s generally from people who would buy it either way. Foreign resellers are a help to the customers though, because they allow them to order in their own language using the local currency.

Does Scooter Software have any other products besides Beyond Compare?
No, BC keeps us plenty busy.

Thank you Craig.

You can download a free trial of Beyond Compare from the Scooter Software website. I have no affiliation with Scooter Software beyond being a paying customer.

Mac OS X market share accelerates in 2008

2008 was a good year for Apple and Mac OS X. According to netapplications.com data (via sharewarepromotions blog) Mac OS X’s share of the OS market increased from 7.31% in Dec 2007 to 9.63% in Dec 2008. That is a 32% increase in market share during 2008, compared to a 22% increase during 2007.

macosx_market_share_2007_2008

Windows market share fell from 91.79% to 88.68% in the same time. While Mac OS X’s annual gains are impressive, it has a long way to go to catch Windows. 15 years if you project the 2008 gains forward.

macosx_vs_windows_market_share_2007_2008Of course, it is highly questionable to project 15 years from a single year of data, but it gives an idea how much work Apple still has to do.

I sell table planning software for Windows and Mac OS X. Mac visitors to my website have followed the general trend, up from 7.41% in 2007 to 8.5% in 2008 and accounting for around of 10% of visitors at the end of 2008.

macosx_visitor_percentage% Mac visitors to http://www.perfecttableplan.com

My data also shows that Mac users are twice as likely to purchase my software as Windows users (I have heard similar figures have reported by others). So Mac users currently account for 20% of my sales. I wouldn’t want to live off my Mac sales, but it is very useful additional income. Given the disparity in cost between Windows and Mac hardware it is hardly surprising that Mac users are more ready to reach for their credit card.

My software is built on top of the Qt cross-platform toolkit. The recent porting of Qt 4.5 to Cocoa gives me the opportunity to further improve PerfectTablePlan’s Mac look and feel and to release a 64 bit version. Hopefully this, coupled with increasing Mac market share, will further improve my Mac sales.

A beta of Windows 7 has just been released.  It will be interesting to see if it can repair some of the damage caused by Vista and slow the growth of Mac OS X. Personally, I doubt it – the Windows 7 feature list certainly doesn’t set my pulse racing.

CoverageValidator v3

The nice folk at Software Verification have done a major new release of Coverage Validator, and the new version fixes many of the issues I noted in a previous post. In particular:

  • The instrumentation can use breakpoint functionality to get better line coverage on builds with debug information enabled.
  • Previous sessions can be automatically merged into new sessions.
  • The default colour scheme has been toned down.
  • The flashing that happened when you resized the source window has gone.
  • It is now possible to mark sections of code not to be instrumented. I haven’t had time to try this yet, as it was only introduced in v3.0.4. But it should be very useful as currently I have a lot of defensive code that should never be reached (see below). Instrumenting this code skews the coverage stats and makes it harder to spot lines that should have been executed, but weren’t.

There are still a few issues:

  • I had problems trying to instrument release versions of my code.
  • It still fails to instrument some lines (but not many).
  • I had a couple of crashes during testing that don’t seem to have been caused by my software (although I can’t prove that).

But the technical support has been very responsive and new versions are released fairly frequently. Overall version 3 is a major improvement to a very useful tool. Certainly it helped me find a few bugs during the testing of version 4 of Perfect Table Plan on Windows. I just wish there was something comparable for MacOSX.

Sometimes the best way to recover Windows data is Linux

knoppixMy Windows laptop refused to boot into Windows. The ominous error message was:

Windows could not start because the following file is missing or corrupt:

\windows\system32\config\system

A quick Google suggested that the registry had been corrupted. I tried various things to recover the OS, including using the XP recovery console to manually restore a backup of the registry. It didn’t work.

No problem. I have a fairly paranoid back-up regime. All the important information on my laptop is also stored on my subversion server. I could just reformat the laptop, reinstall the applications (including subversion) and check out all the files again. Except that I hadn’t thought to include my wife’s files on the laptop in my back-up plans. Oops. After hours of making no progress recovering the data. I tried Knoppix. I got access to the data in not much longer than it took to download Knoppix.

Knoppix is a Linux distribution that can run from a CD (i.e. it doesn’t require installation on your harddisk). It is also capable of understanding Windows file systems. To use it:

  1. Download the latest Knoppix CD .iso file (approx 700MB). Note – The DVD version is much larger.
  2. Burn the .iso to a CD, for example using the free Active ISO Burner.
  3. Boot the stricken machine from the Knoppix CD. You may need to change your system to BIOS to boot from the CD first. How you access the BIOS varies between machines. On my Toshiba laptop you press F2 as the system boots.
  4. Drag and drop data from the stricken machine to a USB harddisk or memory stick. Or copy to another machine using FTP from Knoppix. The Knoppix user interface is easy enough to use, even if you haven’t used Linux before.

Note that you don’t have to enter your Windows password to recover the files. This brings homw how easy it is to get data off a password protected Windows machine, if you have physical access to the machine. Another good reason to encrypt sensitive data on your laptop, for example using the free Truecrypt.

Thanks Knoppix! I’ve added you to my mental list of worthy software causes to make a small donation to one day. Obviously you need access to a functioning machine to do the above. So why not make a Knoppix CD now, while everything is fine? You never know when you might need it.

Further reading:

Life hacker: Rescue files with a boot CD

Choosing a development ‘stack’ for Windows desktop applications

beauty_parade.jpgI have have heard plenty of people saying that desktop software is dead and that all future development will be done for the web. From my perspective, as both a buyer and seller of software, I think they are wrong. In fact, of the thousands of pounds I have spent on software in the last three years, I would guess that well over 90% of it was spent on software that runs outside the browser. The capabilities of web based applications have improved a lot in recent years, but they still have a long way to go to match a custom built native application once you move beyond CRUD applications. I don’t expect to be running Visual Studio, PhotoShop or VMWare (amongst others) inside the browser any time soon. The only way I see web apps approaching the flexibility and performance of desktop apps is for the browser to become as complicated as an OS, negating the key reason for having a browser in the first place. To me it seems more likely that desktop apps will embed a browser and use more and more web protocols, resulting in hybrid native+web apps that offer the best of both worlds.

So, if Windows desktop apps aren’t going away any time soon, what language/libraries/tools should we use to develop them? It is clear that Microsoft would like us to use a .Net development environment, such as C#. But I question the wisdom of anyone selling downloadable off-the-shelf software based on .Net [1]. The penetration of .Net is less than impressive, especially for the more recent versions. From stats published by SteG on a recent BOS post (only IE users counted):

No .Net: 28.12%
>= .Net 1.0: 71.88%
>= .Net 1.1: 69.29%
>= .Net 2.0: 46.07%
>= .Net 3.0: 18.66%
>= .Net 3.5: 0.99%

Consequently deploying your app may require a framework update. The new .Net 3.5 framework comes with a 2.7 MB installer, but this is only a stub that downloads the frameworks required. The full set of frameworks weighs in at eye watering 197 MB. To find out how much the stub really downloads Giorgio installed .Net 3.5 onto a Windows 2003 VM with only .Net 1.0 & 1.1. The result: 67 MB. That is still a large download for most people, especially if your .Net 3.5 software is only a small utility. It is out of the question if you don’t have broadband. Microsoft no doubt justify this by saying that the majority of PCs will have .Net 3.5 pre-installed by the year X. Unfortunately by the year X Microsoft will probably be pushing .Net 5.5 and I dread to think how big that will be.

I have heard a lot of people touting the productivity benefits of C# and .Net, but the huge framework downloads can only be a major hurdle for customers, especially for B2C apps. You also have issues protecting your byte code from prying eyes, and you can pretty much forget cross-platform development. So I think I will stick to writing native apps in C++ for Windows for the foreseeable future.

There is no clear leader amongst the development ‘stacks’ (languages+libraries+tools) for native Win32 development at present. Those that spring to mind include:

  • Delphi – Lots of devoted fans, but will CodeGear even be here tomorrow?
  • VB6 – Abandoned and unloved by Microsoft.
  • Java – You have to have a Java Run Time installed, and questions still remain about the native look and feel of Java GUIs.
  • C++/MFC – Ugly ugly ugly. There is also the worry that it will be ‘deprecated’ by Microsoft.
  • C++/Qt – My personal favourite, but expensive and C++ is hardly an easy-to-use language. The future of Qt is also less certain after the Nokia acquisition.

Plus some others I know even less about, including: RealBasic and C++/WxWidgets. They all have their down sides. It is a tough choice. Perhaps that is why some Windows developers are defecting to Mac, where there is really only one game in town (Objective-C/Cocoa).

I don’t even claim that the opinions I express here are accurate or up-to-date. How could they be? If I kept up-to-date on all the leading Win32 development stacks I wouldn’t have any time left to write software. Of the stacks listed I have only used C++/MFC and C++/Qt in anger and my MFC experience (shudder) was quite a few years ago.

Given that one person can’t realistically hope to evaluate all the alternatives in any depth, we have to rely on our particular requirements (do we need to support cross platform?), hearsay, prejudice and which language we are most familiar with to narrow it down to a realistic number to evaluate. Two perhaps. And once we have chosen a stack and become familiar with it we are going to be loathe to start anew with another stack. Certainly it would take a lot for me to move away from C++/Qt, in which I have a huge amount of time invested, to a completely new stack.

Which Windows development stack are you using? Why? Have I maligned it unfairly above?

[1] Bespoke software is a different story. If you have limited deployment of the software and can dictate the end-user environment then the big download is much less of an issue.

Coverage Validator

coverage_validator.pngThe sink is full of washing, I am wearing odd socks and I haven’t been out of the house in days. It must be time to put out that new release. But how can I be sure my testing hasn’t missed a hideously embarrassing bug? Maybe I introduced a major bug when I made that ‘cosmetic’ change at 2am?

In an ideal world I would just run a comprehensive automated regression test suite. Unfortunately it is difficult to automate graphical user interface (GUI) testing and the majority of lines of code in most applications are GUI. I estimate that the code for my own table planner software is at least 75% GUI code (not including generated code, which would push it even higher).

So I try to manually execute every line of my application before I release it. If I have to make any changes to the code, I start over again. This is very dull, but at least I have a tool to help me: Coverage Validator. Coverage Validator instruments code and shows, in real time, which lines have been executed. Click a few buttons on your application and watch the executed lines of code change colour from pink to yellow. Execute every line in the file and all the lines change colour to cyan. No recompilation or relinking is required and it doesn’t slow down the tested application too much. This real-time feedback is incredibly powerful for testing.

code_coverage_small.gif

Unfortunately it also has a lot of shortcomings:

  • The usability isn’t great. There is a confusing plethora of options for instrumenting your code that I would rather not have to know about.
  • It isn’t able to ‘hook’ (instrument) all the lines of code. Whole blocks get missed out for reasons I don’t fully understand. Single line branches are particularly likely to be missed.
  • The GUI isn’t great. For example, the display flashes horribly if you resize it.
  • The automatic results merging is just plain weird. At the end of a session it can merge your coverage results into a previous session. This information isn’t much use to me at the end of a session. I want to merge previous results at the start of a session so I know which lines I haven’t tested.
  • The GUI is quite ugly. They really need to update those tired old icons.

However being able to see line coverage information in real time is just so incredibly useful that I am prepared to put up with the many shortcomings. I just run my application alongside Coverage Validator and, file-by-file and function-by-function, I try to turn the lines of code yellow (or, better still, cyan). Every time I have used Coverage Validator I have found at least one potentially embarrassing bug that I hadn’t discovered by any other means. The support has also been responsive. It is just a pity about the flaws, without them this would be a ‘killer app’ for testing.

Coverage Validator works with C++, Delphi and VB on Windows NT4, 2000, 2003 and XP[1]. A single licence costs $199. A free 30-day evaluation licence is available.

[1]I am using it on Vista currently, and it seems to work fine.