Skip to main content

Spaced out

** Grumpy old man alert **

A genuine web form
There's a campaign in the US saying that every student should have the opportunity to learn to write computer code. And I agree - it is a great thing to be able to do. However I do warn people who take that step into coding that it may turn them into a grumpy person, when they know how easy it is to do something... yet discover that so many idiot coders have failed to do so.

My particular gripe today is web forms that ask for telephone numbers. The standard format for a phone number in the UK is something like '01793 765432' with a dialling code,  a space, and the local number. Of course you don't type the space into your phone, but it is the correct format. Yet increasingly web forms are rejecting phone numbers with spaces in. Use one and you will get an error message pointing out the folly of your ways.

But here's the thing, and the reason why I bring up coding skills in the same breath. Once upon a time I used to write code in C, the programming language (in various variants) most used to write software for personal computers. In C there is a standard, built-in function that does a pretty simple, but occasionally useful thing. It takes a string of characters and returns that same string with the spaces removed. That's all it does. Frankly it's easy enough to write yourself, but it usually comes in the library of functions. Plain and simple. So guess what? If you have a form and put the text in it through this routine, you will get a phone number without spaces. No need to wrap the user on the knuckles for getting it right - simply change the format to the one you want.

This is a fundamental of good user interface design. If you know what's wrong, don't complain, just fix it. If your programming can't cope with the input it's your fault, not the users.

Get your act together guys. This is pathetic.


  1. Completely agrre with you, Brian. And these nerdy programmers often wait until the end of a lengthy input of other data to point out your error.

    May I add also my peeve of the many websites I have encountered which invite you to select your country of residence from a drop-down menu of every country in the world only to point out much, much, later that they will only deliver to the UK, US, or whereever.


Post a Comment

Popular posts from this blog

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

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 recent 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 ex

Which idiot came up with percentage-based gradient signs

Rant warning: the contents of this post could sound like something produced by UKIP. I wish to make it clear that I do not in any way support or endorse that political party. In fact it gives me the creeps. Once upon a time, the signs for a steep hill on British roads displayed the gradient in a simple, easy-to-understand form. If the hill went up, say, one yard for every three yards forward it said '1 in 3'. Then some bureaucrat came along and decided that it would be a good idea to state the slope as a percentage. So now the sign for (say) a 1 in 10 slope says 10% (I think). That 'I think' is because the percentage-based slope is so unnatural. There are two ways we conventionally measure slopes. Either on X/Y coordiates (as in 1 in 4) or using degrees - say at a 15° angle. We don't measure them in percentages. It's easy to visualize a 1 in 3 slope, or a 30 degree angle. Much less obvious what a 33.333 recurring percent slope is. And what's a 100% slope