Archive for the 'tools' Category



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.

Qt to be available for free under LGPL

qtToday Nokia announced that the cross-platform Qt framework is to be released under the LGPL, with no developer licensing fees or royalties. As someone who has been using Qt continuously for the last 9 years, this is of particular interest to me. Especially since the hefty annual renewal fee for my commercial Qt licence is due in a few months.

Here is the email I received from Nokia:

Dear Qt User:

Nokia is pleased to announce that with the release of Qt 4.5 you will be able to use Qt under the Lesser General Public License (LGPL) version 2.1 terms. When released in March 2009, Qt will be made available under three licensing options: Commercial, LGPL and GPL. Prior versions of Qt are not impacted by this announcement.

Nokia is committed to Qt and its continued development. By offering Qt under LGPL version 2.1 license terms alongside today’s licensing options Nokia hopes to:

- facilitate wider adoption of Qt across industries, desktop, web and embedded platforms.

- establish Qt as a de facto standard for application development.

- receive more valuable feedback and increased user contributions to ensure that Qt remains the best-in-class, cross-platform framework.

- extend Nokia’s existing platform commitment to the open source community.

By offering a cost-free LGPL license as well as commercial and GPL licenses to Qt, you can choose the license model that best fits your development requirements.

Irrespective of which license model you choose:

- Qt Software is committed to continuing to provide our customers with the same level of professional support, services and regular releases you have come to expect of Qt Software.

- We will continue to actively develop Qt, and with a greater degree of cooperation with the community through a new contribution model, we hope to make Qt even more valuable to our users.

For more information on the introduction of the LGPL license and what this means for you, please consult the Frequently Asked Questions section on www.qtsoftware.com.

Best regards

Tom Miller

Director of Sales

Nokia, Qt Software

I am a big fan of QT. Over the years it has evolved into an extremely polished and comprehensive framework, with: impressive cross-platform capabilities across a wide range of desktop OSs and embedded devices; C++ and Java APIs; excellent documentation and  a wide range of supporting tools (there is now even a cross-platform Qt IDE). The introduction of WebKit also takes Qt some way towards bridging the desktop/web divide. Widely admired by developers, the main stumbling block to Qt’s wider adoption has been the relatively high cost of commercial development licences.

Qt has been available for a while with both commercial and GPL licensing. The commercial version is expensive and the GPL version is free. However, using the GPL means you have to release the source of your own application, which is enough to make it unattractive to the vast majority of commercial software vendors. With the LGPL you can use the Qt libraries for free while keeping your own code proprietary.

So why would Nokia licence Qt under the LGPL? They even have a page on their site saying why they don’t think the LGPL is a good fit for Qt. A commercial licence for Qt is expensive, both in initial purchase costs and annual maintenance. Why is Nokia giving up a fat revenue stream? I am too cynical to believe that it is pure altruism. I guess the Qt licence fees are fairly insignificant to their new owner, Nokia, and they see it as an important strategic step to allow their mobile devices to compete against the free iPhone and Android APIs. Feel free to speculate on alternative motivations in the comments below.

As a commercial Qt licencee I am still working out the full implications of switching to LGPL Qt.

  • Including a copyright notice, the licence agreement and a link to the downloadable Qt source shouldn’t be a problem.
  • Shipping a linker and object files isn’t realistic, so I would probably have to dynamically link Qt. I much prefer static linking to avoid ‘DLL hell’ issues.
  • It isn’t clear whether all the Qt classes and widgets available in the commercial version are available in the LGPL version. Does it include the Qt 3 -> Qt 4 backward compatibility layer?
  • Will I still be able to get decent technical support, or will I need to buy a support contract?

I haven’t had time to assimilate it all yet. But I think a number of trends could make the free LGPL Qt into a big player in the future:

  • The increasing interest in cross-platform tools due to the growing Mac market share and an increasing numbers of mobile devices.
  • The neverending uncertainties about the future of Delphi.
  • The shortcomings of .Net for some types of development, e.g. ‘shrinkwrap’ software.
  • Microsoft’s apparent lack of enthusiasm for MFC and Windows Forms.
  • The many technical strengths of Qt.

It certainly looks like very bad news for directly competing cross-platform technologies such RealBasic and WxWidgets.

Further reading:

PS/ Thanks Nokia (I think)!

Getting website feedback with Kampyle

kampyleGetting good feedback from customers and prospective customers is essential to any business. I think I already do quite a good job of getting feedback from paying customers. But what about visitors who click around my site for a few minutes and then leave, never to return? I would love to know why they didn’t buy. This sort of feedback is much harder to come by, so I was interested to read about Kampyle in the article 14 free tools that reveal why people abandon your website.

Kampyle adds a clickable image to a designated corner of your webpage. If a user clicks on this image they are shown a simple (and customisable) feedback form. Any feedback is collected by Kampyle and presented through a dashboard on their website. All you have to do is register, customise your feedback form and add some javascript inside the <head> and <body> tags of each page. Best of all, the service is free. You can see it in action on Kampyle’s own website.

kampyle1

Click the floating image in the bottom-right corner to show the feeback form

kampyle2

Leave feedback

You can also have Kampyle pop-up a survey question for a given percentage of users as they leave your site. I find such surveys annoying and never fill them in, so I haven’t felt inclined to try this yet.

Kampyle sounds great. Users have a simple way to supply feedback which doesn’t distract them from my key goal (buying my software). Sadly, very few visitors actually supplied feedback through Kampyle. I ran it for a month on some of the highest traffic pages on my Perfect Table Plan site and got a grand total of 4 comments from 3 visitors. Only two of these comments had any really useful feedback and both were from a single paying customer who probably would have emailed support anyway. I don’t feel the feedback justified the ‘cost’, in terms of the potential distraction of visitors and another potential failure mode for my website. Consequently I am now only running Kampyle on a couple of peripheral pages. Maybe the results would be better for different types of site. It only takes 10 minutes of so to set up, so it might be worth a try.

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.

Virus Total

Virus Total is a free service that gives you aggregate results from 36 different malware scanners. Just browse to the file you want to check on your PC and click ‘Send file’. It will quickly return the results of all the scans, hash sizes and a list of Windows system calls that the software makes.

This is a great resource for checking software you are about to install doesn’t contain malware. It is also useful for checking that your own download files haven’t been tampered with and don’t trigger false positives. Note that some software protection systems have been known to trigger false positives from malware scanners.

Thanks to a poster on this BOS thread for bringing it to my attention.

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

Functional programming – coming to a compiler near you soon?

We can classify programming languages into a simple taxonomy:

Commercial programmers have overwhelmingly developed software using imperative languages, with a strong shift from procedural languages to object oriented languages over time. While declarative style programming has had some successes (most notably SQL), functional programming (FP) has been traditionally seen as a play-thing for academics.

FP is defined in Wikipedia as:

A programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data.

Whereas an imperative language allows you to specify a sequence of actions (‘do this, do that’), a functional language is written in terms of functions that transform data from one form to another. There is no explicit flow of control in a functional language.

In an imperative language variables generally refer to an address in memory, the contents of which can change (i.e. is ‘mutable’). For example the rather unmathematical looking “x=x+1″ is a valid expression. In FP there are no mutable variables and no state.

In an imperative language a function can return different values for the same input, either because of stored state (e.g. global or static variables) or because it is interfacing with an external device (e.g. a file, database, network or system clock). But a pure functional language always returns the same value from a function given the same input. This ‘referential integrity’ means an FP function call has no ‘side-effects’ and consequently can’t interface with external devices. In other words it can’t actually do anything useful – it can’t even display the result of a computation to your VDU. The standard joke is that you only know a pure functional program is running because your CPU gets warmer.

The functional language Haskell works around the side-effects issue by allowing some functions to access external devices in a controlled way through ‘monads’. These ‘impure’ functions can call ‘pure’ functions, but can never be called by them. This clearly separates out the pure parts of the program (without side-effects) from the impure ones (with side-effects). This means that it is possible to get many of the advantages of FP and still perform useful tasks.

FP is much closer to mathematics than imperative programming. This means that some types of problems (particularly algorithmic ones) can be expressed much more elegantly and easily as functional programs. The fact that a function has no side effects also means that it’s structure is much easier to analyse automatically. Consequently there is greater potential for a computer to optimise a functional program than an imperative program. For example in FP:

y = f(x) + f(x);

Can always be rewritten as:

z = f(x);

y = 2 * z;

Saving a function call. This is more difficult to do in an imperative language, because you need to show that second call to f(x) won’t return a different value to the first.

Functional programs are also inherently much easier to parallelise, due to the lack of side-effects. We can let the FP interpreter/compiler take care of parallelism. No need to worry about threads, locks, critical sections, mutexes and deadlocks. This could be very useful as processors get ever more cores. However imperative languages, with their flow of control and mutable variables, map more easily than functional languages onto the machine instruction of current (von Neumann architecture) computer. Consequently writing efficient FP interpreters and compilers is hard and still a work in progress.

Elements of FP are steadily making their way into mainstream commercial software:

  • Erlang is being used in commercial systems, including telecoms switching systems.
  • Microsoft Research has implemented F#, a .Net language that includes FP elements based on ML.
  • Work is underway to add elements of FP to version 2.0 of the D programming language.
  • Google’s MapReduce is based on ideas from FP.
  • The Mathematica programming language has support for FP.
  • The K programming language is used in financial applications.
  • The Perl 6 compiler is being written in Haskell. <insert your own sarcastic comment here>.

I recently attended ACCU 2008 which had a whole stream of talks on FP. All the FP talks I attended were packed out. That is quite something given that the audience is primarily hardcore C++ programmers. There seemed to be quite a consensus in these talks that:

  • FP is starting to move out of academia and into commercial use.
  • FP is more suitable than imperative style programming for some classes of problem.
  • FP is not going to replace imperative programming. The bulk of commercial development will still be done in an imperative style, but with FP mixed in where appropriate.
  • Hybrid languages that mix OO and FP will become more common.

I don’t see Haskell replacing C++ any time soon. But I can definitely see the benefits of using FP to tackle some types of problems.

Further reading:

The Functional programming reference in Wikipedia

This article is based loosely on notes I made at ACCU 2008 from attending the following talks:

  • “Caging the Effects Monster: the next decade’s big challenge”, Simon Peyton-Jones
  • “Functional Programming Matters”, Russel Winder
  • “Grafting Functional Support on Top of an Imperative Language”, Andrei Alexandrescu

Any mistakes are almost certainly mine.

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.

Animated GIFs

The human brain and visual system is highly optimised to detect movement. If you don’t believe me, watch what happens to people’s attention when you turn on a TV in a room. Even if the sound is off, the program is dull and the conversation is interesting, people will find it very hard not to stare at the TV. You can exploit this by using animation on your website to grab the user’s attention. Animation is also a useful way of packing a lot of content into a limited space on your web page.

Animated GIFs are a useful low-tech way of adding animation to a website. They work in pretty much any browser, without requiring visitors to download a plug-in or even click a ‘play’ button. I use them on the PerfectTablePlan home page to show rotating testimonials and on adwords landing pages to give a brief visual overview of what PerfectTablePlan can do.

animated gifs

Animated GIFs are quite easy to create. Here is how I created the image above (on Windows):

  1. I used Sizer (freeware) to size the PerfectTablePlan main window to 960×750.
  2. I used SnagIt (commercial) to capture various screenshots, resize them to 320×250 and save them as separate 7-bit GIFs.
  3. I dragged the GIFs onto UnFreez (donationware) and created an animated GIF. (You can also use Adobe Photoshop, if you have it).
  4. I dragged the animated GIF onto SuperGIF (commercial with trial) to reduce the file size (by about 5% in this case).

The final result isn’t a work of art, but it is hopefully enough to grab the visitors attention and whet their appetite for more information.

Animated GIFs can get very large if you aren’t careful. But it rather defeats the object if your website visitor clicks ‘back’ before the image has loaded. I used 7-bit GIFs, small image dimensions, a limited number of frames and GIF optimisation to keep the file above to 72kb.

A word of warning – use animation sparingly or the effect can be quite overwhelming (don’t click this link if have epilepsy or a refined sense of taste).

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.

« Previous PageNext Page »


Enter your email address to follow this blog and receive notifications of new posts by email.

Join 503 other followers

Blog Stats

  • 1,441,463 hits
When you are developing a software product it can be hard to
"see the forest for the trees"
see the forest for the trees
Do you need some affordable, independent advice on where to go next with your product?

Categories

Creative Commons License
This work is licenced under a Creative Commons Licence.

Follow

Get every new post delivered to your Inbox.

Join 503 other followers