Monday, November 07, 2011

Data Encoding

Today I had the misfortune to be looking at the latest draft output from one of the Ministries, those warded Grand Temples of the Meritokratia of Atlantis. The earnest young priests had coded two different functions with the same range of codes, then used that range of codes differently elsewhere.

Here is an hypothetical example of how it would have worked in practice.

Let's say that a person is the target of an imaginary ailment like Maladrach's Pyriferous Pustules. Then the possible procedures for treating it are MPP-01 (douse in water), MPP-02 (dowse for water), MPP-03 (pop the pustules), MPP-04 (pop the postulant), MPP-05 (postulate a pop). And the outcomes of the treatment might be MPP-06 (full recovery), MPP-07 (terminal spontaneous combustion), MPP-08 (referral to pyrothaumaturgic specialist) and so on.

Of course, you can't tell by inspection whether you're looking at a treatment or an outcome, since the code MPP is the same! Worse, if you have new treatments, you can't insert one after MPP-05, since you used running numbers for the outcomes that start immediately after MPP-05.

To make matters worse, these people decide that for smaller practitioners with fewer options, you could use MPP-01 (douse in water), MPP-02 (dowse for water), MPP-03 (full recovery), MPP-04 (referral to a specialist) and so on.

In other words, the same codes are used to represent completely different things in a different context.

If I had been coding, I would at the very least have used something more like MPPP-001 to MPPP-nnn for MPP Procedures, and MPPO-001 to MPPO-nnn for MPP Outcomes. And I would have reserved MPPP-nnnn and MPPO-nnnn for future use in case wonder-working turned out to be more complicated than the present state of the art.

It's a shame that the OSA probably prevents me from showing you, dear readers, the very slides themselves. Then you would see and be scandalized both by the great waste of your tax dollars and the calibre of the brains consuming said dollars.

Labels: , ,


Post a Comment

Links to this post:

Create a Link

<< Home