Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • Domain: credit cards. Field: "Status" (or thereabouts). Range of values: "O" for open, "C" for closed, "I" for inactive, NULL for open or status unknown (have to check other variables to be sure).

    • Except for the gratuitous NULL, that doesn’t seem too bad?

      • Well, if it's MySQL it's bad since that data should probably be an enum and MySQL (particularly older versions) will insert an empty string if you get the enum value wrong. However, even then I wouldn't use an enum. That should probably link to a separate "cc_status" table or something like that. You can then more easily insert new statuses, add human readable descriptions for each status (often with enums I see human readable versions hard-coded in the program), and you don't have to worry about changing the data type for a column if a new status appears. It's far better to change the data than the data description!

        • You can then more easily […] add human readable descriptions for each status (often with enums I see human readable versions hard-coded in the program)

          The database is a terrible place to put any string that might be subject to i18n.

          I agree with the rest of your points.