Skip to main content

Software could be cleverer - but only if software designers think like people

Here's what happens if you type a properly formatted phone number
into many a web form. The error message in red appears.
In my dim distant past I did quite a lot of work on the design of the user interface between people and computers - how you interact with a computer (or these days, often, the web) - and it shocks me how stupid most software still is.

When I first programmed computers professionally I soon started exploring ways to make the interaction more friendly. My earliest work pre-dated graphic user interface. The user had to type commands into a console. And, surprise surprise, people made mistakes. So I put in a little routine to capture when errors occurred to see what they were typing wrong and then modified the software so it would cope with the most obvious mistakes. This isn't rocket science. Computers are much better at sorting out basic errors than people are, as long as they are pointed in the right direction.

Let me give you two examples.

In the UK phone numbers have always traditionally been written as two or three blocks. So, for instance, a Swindon number might be 01793 123456, while a central London number could be written as 020 7123 4567 (or more sensibly 0207 123 4567). Very often, websites ask you to type in a number. And surprisingly often what will happen if you type in a number like this is that the site responds, as above, with a warning that you have got the format wrong - because it didn't want spaces. In the example above, taken from an ITV website, they even go to the trouble of telling you not to use spaces (someone should tell them Not To Use Capitals in the middle of a sentence) - but this totally misses the point. That instruction is unnecessary, because people should be able to use spaces - and the fact they've had to include the warning shows that lots of people do.

Any C programmer will tell you that this is a brainless mistake on the part of the programmer, because there is a routine in the C language, which in various variants underlies much modern programming, that takes spaces out of string of text. The programmer doesn't even have to write something themselves - they can just whap the input through this routine, and their software will never even know that there was a space. But no, instead, they program it to complain and force the user to retype it. This is doubly irritating if, like me, you have your computer to set up to automatically fill in information like phone numbers in web forms, which the Apple software properly does with the space in place.

Here's another example. A full web URL is something like http://www.brianclegg.net Note what comes after the 'http' - a colon. Now a colon is a fiddly thing to type, as it's a shifted character. So I bet over the years many people have typed http;//www.brianclegg.net instead, with a semicolon after the http. And guess what? It doesn't work. Again, it's a trivial exercise for your software that reads an address to substitute colon for semicolon. (I know you don't usually have to type http://, but there are some circumstances when you do.)

Admittedly this kind of automatic correction isn't always appropriate. You can't always guess what someone meant. But if, as in the first example, the person typed the number correctly and you are just forcing a particular format, or, as in the second example, there is no sensible alternative interpretation, it's much more polite and efficient to do the right thing and make your software take the kind of imaginative leap that people do all the time without thinking about it.

Comments

Popular posts from this blog

Why I hate opera

If I'm honest, the title of this post is an exaggeration to make a point. I don't really hate opera. There are a couple of operas - notably Monteverdi's Incoranazione di Poppea and Purcell's Dido & Aeneas - that I quite like. But what I do find truly sickening is the reverence with which opera is treated, as if it were some particularly great art form. Nowhere was this more obvious than in ITV's 2010 gut-wrenchingly awful series Pop Star to Opera Star , where the likes of Alan Tichmarsh treated the real opera singers as if they were fragile pieces on Antiques Roadshow, and the music as if it were a gift of the gods. In my opinion - and I know not everyone agrees - opera is: Mediocre music Melodramatic plots Amateurishly hammy acting A forced and unpleasant singing style Ridiculously over-supported by public funds I won't even bother to go into any detail on the plots and the acting - this is just self-evident. But the other aspects need some exp...

Murder by Candlelight - Ed. Cecily Gayford ***

Nothing seems to suit Christmas reading better than either ghost stories or Christmas-set novels. For some this means a fluffy romance in the snow, but for those of us with darker preferences, it's hard to beat a good Christmas murder. An annual event for me over the last few years has been getting the excellent series of classic murderous Christmas short stories pulled together by Cecily Gayford, starting with the 2016 Murder under the Christmas Tree . This featured seasonal output from the likes of Margery Allingham, Arthur Conan Doyle, Ellis Peters and Dorothy L. Sayers, laced with a few more modern authors such as Ian Rankin and Val McDermid, in some shiny Christmassy twisty tales. I actually thought while purchasing this year's addition 'Surely she is going to run out of classic stories soon' - and sadly, to a degree, Gayford has. The first half of Murder by Candlelight is up to the usual standard with some good seasonal tales from the likes of Catherine Aird, Car...

Is 5x3 the same as 3x5?

The Internet has gone mildly bonkers over a child in America who was marked down in a test because when asked to work out 5x3 by repeated addition he/she used 5+5+5 instead of 3+3+3+3+3. Those who support the teacher say that 5x3 means 'five lots of 3' where the complainants say that 'times' is commutative (reversible) so the distinction is meaningless as 5x3 and 3x5 are indistinguishable. It's certainly true that not all mathematical operations are commutative. I think we are all comfortable that 5-3 is not the same as 3-5.  However. This not true of multiplication (of numbers). And so if there is to be any distinction, it has to be in the use of English to interpret the 'x' sign. Unfortunately, even here there is no logical way of coming up with a definitive answer. I suspect most primary school teachers would expands 'times' as 'lots of' as mentioned above. So we get 5 x 3 as '5 lots of 3'. Unfortunately that only wor...