DOH! It’s the DaftOperationHandler

   Probably my least favourite question in the world, professionally anyway, is “Does your software support <choose a technology>”. Well, first off, define support. Dictionary.com provides for no less than nineteen definitions for that particular word, and I can probably think of about a dozen more.

   If my answer to this question is “yes”, and when I say “yes”, it means that the program has been documented, tried, and thoroughly tested, the fun is yet to begin. When customers ask this question, eight times out of ten it’s purely rhetorical, and it’s about to slap you in the face with a “well, we tried it, and it doesn’t work” reply.

   For example, we get a phone call about a log shipping problem in our backup application. “Do you support log shipping”?

“Yes, we do.” (It’s right there in the manual)

“Well, it doesn’t work!”

*sigh* “Fine, tell me about the problem.”

“Every five seconds, we do a log backup at our site in Los Angeles, copy the file over a Virtual Private Network over a T1 to La Paz, where it is copied via FTP over a 56Kb modem to Tel Aviv.”

“Uh-huh.”

“The log backups are only 200 megabytes each”.

“Uh. Huh.”

This is why the new frontier of software supportability features should be DOH, or Daft Operation Handlers.

The first generation of error messages in software told you that something has gone wrong.

The second generation of error handling messages had told you exactly what went wrong.

The third generation tell you what to do about the problem.

DOH is the fourth generation of error handling (4G!), in which you are told that you are about to do something that is more than likely going to result in an error because it defies the immutable laws of physics or would require some sort of time machine to work.

My DOH provides for four types of daft operations:

public enum DaftType

{
Insane=0x01,
NotVeryBright=0x02,
ExpectTheImpossible=0x04,
HaveLotsOfSpareTime=0x08
}

When the program detects that it is about to be used in a supported, but nevertheless impossible fashion, it should trigger a DaftOperationHandler.

public

delegate void DaftOperationHandler(object o, DaftOperationArgs e);
public class DaftOperationArgs : EventArgs
{
public DaftType TypeOfDaftness;
public DaftOperationArgs(DaftType e)
{ TypeOfDaftness = e;
}
}

The registered DOH should display the appropriate message to the user:

static

void f1_DaftStatus(object o, DaftOperationArgs e)

{

if ((e.TypeOfDaftness & DaftType.Insane) == DaftType.Insane)

MessageBox.Show(“Are you out of your mind?”, “Questioning your rationality”, MessageBoxButtons.YesNo);

if ((e.TypeOfDaftness & DaftType.ExpectTheImpossible) == DaftType.ExpectTheImpossible)

MessageBox.Show(“You can’t get blood out of a stone”, “Think again…”);

if ((e.TypeOfDaftness & DaftType.HaveLotsOfSpareTime) == DaftType.HaveLotsOfSpareTime)

MessageBox.Show(“For pete’s sake, get a real job!!!”, “Thinking about being a writer?”);

if ((e.TypeOfDaftness & DaftType.NotVeryBright) == DaftType.NotVeryBright)

MessageBox.Show(“There is a reason why software comes with a manual”, “RTFM warning!”);

}

Hopefully, implementing DOH! will prevent many unnecessary calls to the support desk and improve the customer experience and make everybody all-round more productive.