Thursday, 31 May 2012

When is a bug not a bug?

Is it a bug or a feature?
I spent a fair number of years at British Airways both programming myself and working with programmers. Arguably the most fascinating sociological aspect of the computer programming environment is the concept of the bug. The error in the code that makes it do the wrong thing. I might not be rich, but I could probably afford a pint of beer if I had 10p for every time I heard a conversation between programmer and user going a little like this:

User: 'There's a bug in this software. It does X and it should do Y.'
Programmer: 'Sorry, that's not a bug, it's a feature.'
User: '??!?'

I need to briefly dive into the origins of this word 'bug' before exploring the sociology. You will see it said that the word originated from the early days of computing. A (valve) computer failed and on investigation it was found by the early computer expert Grace Hopper that there was a large insect in the machine had caused a short circuit. The insect was stuck in the computer's log book with a write up that said there was a "bug" in the system. And so the term started to be used.

This would be a good story for the origin if the term hadn't been in use by engineers in Victorian times. While it probably did refer to some such incident in the dim and unrecorded past with a mechanical device, the early computing example was just making use of a term that already existed.

Meanwhile back at that programmer/user conversation - a bug is when a computer program does something it shouldn't because of an error in the code. A (bad) feature is when it does something the user doesn't want it to, but there is no actual error. The code is operating fine. It isn't making any logical errors. It's just that (say) it won't let you put more than nine passengers on a plane. Not much use in a system for calculating loads on a 747, but it is a feature, not a bug.

This all came back to me when I had an argument with the support department of a software company called Yabdab. (Boggle.) As a result of my move to Mac I've started re-writing my websites, as my old website software doesn't have a Mac version. I'm using a product called RapidWeaver, which has lots of bolt-ons called stacks. And I'm using a nice little stack from Yabdab called PaySnap that makes it easy to take payments on a website. With me so far? A big advantage of this over using Paypal direct, as I did previously is that it sets up a nice little shopping cart/trolley on your site and you only go off to Paypal to handle payment when all the items are in the cart. Excellent.
Hang on, that was £10.99 a minute ago...

I was implementing this on my Hymn CDs site, which has two versions, one operating in UK pounds, the other in US dollars. This is appreciated by US customers, who prefer to pay in their own currency - and why not?  But here's the thing. As far as I can see, Paysnap only sets up one shopping cart on a computer. If I put an item into the cart from the UK site, then go to the US site and add an item in dollars, then the first item is still in the cart - but its price has been switched from pounds to dollars. Put it in at £10 and it is now $10. A bargain.

Yabdab aren't interested in doing anything to fix this because as far as they are concerned it's a feature. So stuff stays in the cart? Not ideal, but hey. I argue, though, that because it crosses the line and makes an actual mistake (converting from pounds to dollars or vice versa by simply changing from £ to $) it's a bug. They still won't fix it - but I feel I have the moral high ground.

Top illustration from Wikipedia

No comments:

Post a Comment