I remember that in our first programming class with Java, while explaining data types, the following occurred (kinda):

Professor: So, what data type would you choose if your program needs
to store the user's gender?

Someone: How about a boolean? You know, true for male and false for
female.

Professor: Sure, that may work, but some people may hesitate about that. There
have been disputes about calling men "true" and women "false" in the
past...

*laughter *

He ended up recommending us to consider chars (like 'm' and 'f') although booleans should be fine.

I tried searching a bit if there has been any kind of historical entry regarding a major dispute based on this programming practice with no luck.

I'm not asking what data type to use for gender nor if it is fine or not to use booleans. I'm asking if, historically, there has been a dispute regarding the usage of booleans to determine the gender in programming because of the apparently "wrong" (I'm not saying it is wrong - I don't care about that) behavior of calling a woman "false" as the professor seemed to suggest.

Searching around related questions, the results happen to be only about software efficiency.

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.
If this question can be reworded to fit the rules in the help center, please edit the question.

2

As written, that looks more like a pun than a serious description of historical programming conflicts...
–
Mason WheelerFeb 14 '13 at 1:10

8

One problem with using a boolean instead of some kind of enum for modeling real world phenomena - one might want to model transgender, XXY chromosomes, etc. I have seen transgender (2 types) in a real world database as a permissible gender value. I don't know if it was the result of a dispute.
–
psrFeb 14 '13 at 1:18

7

@PhillipBurch: you can still use a boolean. Just use "FileNotFound" for the third gender.
–
kevin clineFeb 14 '13 at 1:44

2

@YannisRizos: I find it unpleasant that, as a man, you would close a question that matters a lot to people who don't identify as either male or female, and that could matter to women as well, just because you don't care about it. Especially as it has been upvoted.
–
NiphraFeb 14 '13 at 8:59

3

@Niphra If you disagree with the closure, feel free to post a question about it on our Meta site.
–
Yannis Rizos♦Feb 14 '13 at 9:04

To add weight, I work with data from the NHS in England, this is national data covering the whole population. Gender is stored as an int, 1 for male or 2 for female which would raise the same sudo-ethical questions. Here an int is used over a Boolean because other values are used (e.g. unknown, transgender, etc.) but there's no hesitation about using a coding system where it improves efficiency. You wouldn't hesitate about coding other values, so why hesitate here?
–
MattFeb 14 '13 at 10:06

Never use a boolean just because there are only two values. Unless the meaning of true and false will be obvious, use an enumeration if available, and string constants or symbols or whatever if not. And all too often, there are initially two values and then later there are three. Or four.

Very good advice, thank you, but doesn't address the question.
–
OmegaFeb 14 '13 at 2:01

1

Which is are there historical facts about a dispute when using booleans for gender due to the apparently "wrong" moral behavior of calling a woman "false"? (I realize that the title doesn't include the moral part, but the contents of the question do focus on it)
–
OmegaFeb 14 '13 at 2:09

1

There are actually been disputes when using booleans due to the fact people who don't identify as female or male felt ignored or rejected - they were forced to choose a gender (see google+). The use of true/false is less of an issue.
–
NiphraFeb 14 '13 at 8:46

Considering that most programming languages use a full word to store a boolean anyway, and "gender" is decidedly not a true/false property (semantically), then you're absolutely right. Having a "false" gender isn't a social thing at all, it's just semantically incorrect and you're not even gaining a performance advantage.
–
Scott WhitlockFeb 14 '13 at 15:11