Saturday, December 17, 2011

UI Forms - Server-based rules are anathema to me

Developers will often complain about implementing any but the simplest UI rules on the client (like, MAYBE, disabling the submit with appropriate indicators when some required fields haven't been filled out yet).

My kvetch on the subject:

Most times I think about server-based rules, I get this nagging compulsion to propose ways to make that rule client-based (or at least client/ajax-based).

The whole concept of a server-based rule is anathema to me.  It's saying that the all-powerful server knows something about what you're doing that you do not and will only grace you by contemplating your request after you've committed the form and then, sometimes, reject it for reasons you are only privileged to learn about after the fact. 

The whole point of computer-assisted user inputs is to surface what the user needs to know at the moment s/he needs to know it to avoid this 20-questions dialog between the supplicant and the silicon deity.

Ok, there's one exception: sometimes there's a business reason to be opaque about all of this, like when you are entering your userid and password.  The congenial UI design might be to say "you got your userid right, but you might have made a typo in your password?"  This would make it too easy for villainous scum to iterate hacking into your account.

Tuesday, March 22, 2011

Why are US Phone Numbers 7 digits?



A colleague recently asked me if I hadn't written an EID editor's column about how Al Chapanis had determined that the optimal length of a telephone number was 7 digits. Here is my response:

Dear xyz,
Fascinating question...

This may be the editor's column you remember:
http://musicman.net/EID_Comment-Winter02.pdf

However, the Chapanis work I was referring to wasn't about the number of digits in a phone number, it was about the layout of the keypad.

I have no information, other than the apocryphal anecdotes about Miller's "magic number 7" to explain why telephone numbers are 7 digits long in the U.S.A. (though I suspect the total population of phones in different areas might have something to do with it as well).

I saw several references to some working memory brain theories that affirm, if not explain the convention:
http://prl.aps.org/abstract/PRL/v103/i21/e218101

However, another reference quotes Miller himself as saying:

And finally, what about the magical number seven? What about the seven wonders of the world, the seven seas, the seven deadly sins, the seven daughters of Atlas in the Pleiades, the seven ages of man, the seven levels of hell, the seven primary colors, the seven notes of the musical scale, and the seven days of the week? What about the seven-point rating scale, the seven categories for absolute judgment, the seven objects in the span of attention, and the seven digits in the span of immediate memory? For the present I propose to withhold judgment. Perhaps there is something deep and profound behind all these sevens, something just calling out for us to discover it. But I suspect that it is only a pernicious, Pythagorean coincidence.

It gets messy when you start talking about "chunking". For instance, I don't think I remember phone numbers near my home as 10 digits. When I hear an area code or an exchange that I recognize, introspection tells me that I remember that as a single entity -- I actually sometimes visualize an area (or a mobile coverage map).

Even without chunking, I think the grouping itself is useful (nnn-nnn-nnnn) as a "performance cue". I find I can more easily transcribe a teleconference pin if the calendar host puts in the artificial hyphen (and if the number is 7 digits long -- if it's 8 digits then I start stressing about overseas phone number patterns ;-).

Perhaps it is because I'm a vocal performer, but I find it very comforting to slot arbitrary numbers into the rhythmic pattern neh-neh-NEH neh-NEH-neh-NEH. This is a 4-beat phrase of 7 eighth notes and a trailing whole note with a familiar "polka" emphasis on all but the first primary quarter note beat. (Though for music, I much prefer the jazz-style syncopations.)