[Tfug] Stored settings

Bexley Hall bexley401 at yahoo.com
Tue Dec 9 13:37:35 MST 2008


Hi, Jim,

> >So, are there any other reasons why you might opt for the
> >"easy way out" (non-human-readable forms)?
> 
> Only the ever-popular LP (Lazy Programmer) Syndrome.

Well, it can also be argued (?) that it is more robust
(in that the range of legal values is more tightly constrained
as in your comment below).

OTOH, one could argue that a "textual" representation tends
to have a larger Hamming distance and, in theory, easier to
recover from database corruption  :-/

(though I sure as hell wouldn't want to be writing the
code that makes those judgement calls!)

> I agree - these days there is no reason for info or config
> files to be in a
> machine-readable-only form.  Of course, using "3"
> in your example instead
> of "Never" simplifies things so that the
> programmer doesn't have to look
> for "Never" "never" "NEVER"
> "N3ver" "NotInMyLifetime" etc.

strcmp(tolower(value),  TOLOWER("Never"))

but your point is understood.

--don


      




More information about the tfug mailing list