Tuesday, August 01, 2006

 

When Your Code Doesn't Work, Make It the End-User's Problem

I had occasion to use the American Heart Association's Web site to make donation in the name of a former colleague who had passed away. I was somewhat taken aback when I arrived at the donation page and saw the following:



The instructions for including a personal message states "Do not use special characters such as #, $, or & as they will harm the printing of your note." Is it that the American Heart Association has been the recipient of a bunch of donated, dysfunctional printers which choke on special characters?

Not really. The underlying problem is that special characters passed between programs frequently require "escaping" using a protocol which both programs must implement. If one end implements the protocol and the other end doesn't, then strange things will happen. A little bit of experimentation with the donation page showed that use of a # or & would truncate the message at the point of the special character. This was obvious on the "preview" page -- no printing was necessary!

So obviously, the implementers of the Association's donation application hadn't a clue as to the proper way to handle special characters. I can just imagine the following conversation:

Head of Solicitations: We've been getting complaints from donors about their personal messages being incomplete.

Programmer: By any chance did they use any special characters in their message?

Head: How should I know?

Programmer: Well, they shouldn't. This is a known problem with the XYZ for Java Package and there's nothing we can do about it. [Notice the deft shift of the blame to a third party].

Head: Well then we at least ought to tell our donors not to use the characters.

Programmer: Ok, I'll get right on it and change the instructions on our Web site.

So we've now shifted the burden to fixing the problem onto the customer.

Comments: Post a Comment



<< Home

This page is powered by Blogger. Isn't yours?