Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Does this logic make sense to you?
Message
 
 
To
25/07/2012 10:33:51
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Environment versions
Visual FoxPro:
VFP 9
Miscellaneous
Thread ID:
01548988
Message ID:
01549225
Views:
29
>>>If you implement more options than !empty() via the char field, you are already well along the slippery slope of magical constants -
>>>the usual remedy being a lookup table with text and perhaps logic to be balanced against existing fwk support and update frequency.
>>
>>This particula field right now will have just to values, 'Y' and 'N'. The database default will set the value 'Y' and user could change it to 'N'. That is all.
>
>You're lucky that you can do so. Most often, such a field is an afterthought, when you already have trucks full of records in such a table, and you can't rely on having the value in old records properly filled in. So you go with .f. being a default for new boolean field in old records, and then name it so that the value of .f. is the default. Thus my forced choice for such fields is "Inactive", "Deleted", "Removed" and such words with implied negative.

During designing of this feature that involves this field, as may have read my threads here, I have changed the name and the type of the field at least 3 times. What I thought would take me a couple of hours, ended up taking a few days. And I am glad that I took the time and I am happy with the result.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Previous
Reply
Map
View

Click here to load this message in the networking platform