Kudzu World

"Programming is an art form that fights back"

Kudzu World  »  Blogspace  »  The User Interface Asylum
English - Română - Русский - عربي

RSS Feed

If you want to more easily stay informed of updates etc you can subscribe to the RSS feed. Just point your RSS reader at this page, auto discovery is enabled.




Stupid State Logic

11/18/2006

This one is called 'Stupid State Logic' for more than one reason. It's state machine is a bit stupid, but it also applies to the State entry field.

Don't Default

Here is an excerpt from a web ordering form. I live in Cyprus and my IP address is easily distinguishable as Cyprus. Defaulting all customers to the United States is not only impersonal, but a bit rude. There are many freely available IP address databases available that could have easily defaulted this to Cyprus. Worse yet, I had just come from a vendor website to this payment system. The vendor already knows my country from the profile I had to register there. At a minimum the country should have been passed in as a default. If a default cannot be determined, no country should be preselected. How would Americans feel if Russia were the default?

Stupid State Logic

With most data entry forms, residents outside of America and Canada are not asked for the State or Province or it is optional. In this case I filled out the form, and selected my country. I did not even bother to open the State drop down field as it defaults to blank (see previous screenshot).

We are all familiar with web entry data forms and required fields. It is common practice that if a required field does not have proper data the form is redisplayed and the invalid or empty fields are then highlighted. In this case you can see that it has been highlighted in red. When I pressed 'Complete Order Now' the form brought me back and highlighted 'State or Province'. I was a bit confused and I have even seen entry forms dumb enough to force me to select a state.

So when I opened it up, one of the options was 'Outside US or Canada' and I had to manually select it. Now I am all for writing efficient code, but in this day of GigaHertz processors is it too difficult to write:

if Country is US or Canada then
  State.Required = true;

Wow that was difficult! Is this some kind of secret algorithm? Should I patent this and sell it to the websites of the world?

Source

<< Previous Entry    Next Entry >>

Comments:

-- No Comments --

Post a comment

Use my contact form to contact me directly.