This may be the saddest code ever
-
:laugh: I've just added a Select as the first value in my Gender enum to force the user to select either Male or Female, but before I renamed it to Select it was Unknown. I later thought users would find that too great a source of office or site mirth.
What have you got against the hermaphrodites? Hmm?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
What have you got against the hermaphrodites? Hmm?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
Nothing, the gubment does though. The official stance is, pick a gender and stick with it. :laugh:
-
if (sex == NOT_PROVIDED)
{
borrowerInfoRequest.HmdaInformation.Sex = 0;
}
else
{
borrowerInfoRequest.HmdaInformation.Sex = sex;
}Not good design to have NOT_PROVIDED not equal to 0.
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
-
Nothing, the gubment does though. The official stance is, pick a gender and stick with it. :laugh:
Do they have any major objections if I pick a gender and try to stick with the other one? I'm just old fashioned that way...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
Do they have any major objections if I pick a gender and try to stick with the other one? I'm just old fashioned that way...
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
As long as they don't have to work, you're probably A-OK
-
What have you got against the hermaphrodites? Hmm?
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
Tell that to the ISO people.
The four codes specified in ISO/IEC 5218 are:
0 = not known,
1 = male,
2 = female,
9 = not applicable.I guess they would be a 9.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
-
if (sex == NOT_PROVIDED)
{
borrowerInfoRequest.HmdaInformation.Sex = 0;
}
else
{
borrowerInfoRequest.HmdaInformation.Sex = sex;
}The SparkFun electronics site allows "Yes" as a gender option.
See if you can crack this: b749f6c269a746243debc6488046e33f
So far, no one seems to have cracked this!The unofficial awesome history of Code Project's Bob! "People demand freedom of speech to make up for the freedom of thought which they avoid."
-
Tell that to the ISO people.
The four codes specified in ISO/IEC 5218 are:
0 = not known,
1 = male,
2 = female,
9 = not applicable.I guess they would be a 9.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
8 = none o' yer durn bidness!
-
:laugh: I've just added a Select as the first value in my Gender enum to force the user to select either Male or Female, but before I renamed it to Select it was Unknown. I later thought users would find that too great a source of office or site mirth.
Here, in Amazing Thailand, your Gender Enum would really need to be extended, unless there's some "localization" functionality for Enum's I'm unaware of. Here, you'll find ads, at times on the front-page of one of the two major English-language newspapers, advertising sex change (male to female) for around US $1600. In fact, I can see in trying to "model" gender-identity in Thailand the necessity for a special ... new ... Type, a nested Enum ("EnumEx" ?), for reasons I won't go into here in depth. The fact that .NET demands an Enum contains only named constants providing the rationale for this ... uhhh ... thought. best, Bill
"Last year I went fishing with Salvador Dali. He was using a dotted line. He caught every other fish." Steven Wright
-
Tell that to the ISO people.
The four codes specified in ISO/IEC 5218 are:
0 = not known,
1 = male,
2 = female,
9 = not applicable.I guess they would be a 9.
Light moves faster than sound. That is why some people appear bright, until you hear them speak. List of common misconceptions
I notice they leave a lot of space for new genders, just in case we (as a species) decide to create some new ones... :laugh:
Ideological Purity is no substitute for being able to stick your thumb down a pipe to stop the water
-
Not good design to have NOT_PROVIDED not equal to 0.
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
-
Why not? I usually use -1, but having it at the beginning means that the literal value doesn't change when you add new entries to the enum (not that that is particularly likely for this case but still).
BobJanova wrote:
Why not? I usually use -1, but having it at the beginning means that the literal value doesn't change when you add new entries to the enum (not that that is particularly likely for this case but still).
I reckon that's C++ code and NOT_PROVIDED is more likely a macro than an enum (although it could be an enum too). I meant the design where his user code and data model code use 2 different values to represent the same thing. NOT_PROVIDED may be coming from a 3rd party data layer, but that's just a probability.
Regards, Nish
My technology blog: voidnish.wordpress.com Part 2 in my WinRT/C++ series : Visual C++ and WinRT/Metro - Databinding Basics
-
if (sex == NOT_PROVIDED)
{
borrowerInfoRequest.HmdaInformation.Sex = 0;
}
else
{
borrowerInfoRequest.HmdaInformation.Sex = sex;
}I was once working on a database designed by someone else. Gender was stored in the customer records as a CHAR(1). That field was a foreign key into a "tblGender" table, which had the following rows defined:
GenderKey GenderValue
M M
F FAnd yes, they had manually written CRUD routines to maintain that table, and included JOINS to it in views that extracted data from the customer table etc.. etc.. :sigh: :doh: Derek TP
-
Here, in Amazing Thailand, your Gender Enum would really need to be extended, unless there's some "localization" functionality for Enum's I'm unaware of. Here, you'll find ads, at times on the front-page of one of the two major English-language newspapers, advertising sex change (male to female) for around US $1600. In fact, I can see in trying to "model" gender-identity in Thailand the necessity for a special ... new ... Type, a nested Enum ("EnumEx" ?), for reasons I won't go into here in depth. The fact that .NET demands an Enum contains only named constants providing the rationale for this ... uhhh ... thought. best, Bill
"Last year I went fishing with Salvador Dali. He was using a dotted line. He caught every other fish." Steven Wright
How does a sex change, i.e. a change from one of two genders to the other of two genders, necessitate anything more than those two genders?
-
I was once working on a database designed by someone else. Gender was stored in the customer records as a CHAR(1). That field was a foreign key into a "tblGender" table, which had the following rows defined:
GenderKey GenderValue
M M
F FAnd yes, they had manually written CRUD routines to maintain that table, and included JOINS to it in views that extracted data from the customer table etc.. etc.. :sigh: :doh: Derek TP
DerekTP123 wrote:
I was once working on a database designed by someone else. Gender was stored in the customer records as a CHAR(1). That field was a foreign key into a "tblGender" table, which had the following rows defined:
GenderKey GenderValue
M M
F FThe school where my kids go has us fill out the usual forms at the beginning of the year. In the identification section for the parents, instead of using the usual M=male or F=female, they have the coding as M=mother or F=father. The database has lotsa mistakes...
-- Harvey