Since well-meaning people have often made insensitive comments about women and other marginalized groups in the sciences, I have put together an FAQ (Frequently Answered Questions) about some of these issues.
This FAQ is targeted at the men who make up the comfortable majority among computer science graduate students, but all may find it relevant. My experience shows that these questions are highly relevant; if you are skeptical please contact me to discuss.
Q: I make fun of my Canadian friends all the time and they don't mind. Why should making misogynist or homophobic jokes be any different?
A: Making fun of Canadians is different from making fun of women/minorities because 1) it is a two-way thing based on a rivalry rather than historically harmful prejudice and 2) the targets of the jokes are not in a position (either due to having fewer numbers of them or not having as powerful of a voice) to stand up for themselves. Making jokes about the intellectual abilities of women or the personal decisions of homosexuals enters much more sensitive territory--it is inappropriate to speak lightly about reasons for which these sgroups have been oppressed/persecuted . Just as mature graduate students should not tolerate glib comments about the Holocaust or slavery, they should not tolerate misogynist, homophobic, or otherwise culturally insensitive comments.
Q: What would be considered a misogynist or homophobic joke?
A: There are many things people say that should be obviously offensive. For example, "Chores? That's what the women are for." There are also more subtle things that are as harmful: any statement that implicitly suggests it is bad to be a woman/gay/other minority is not appropriate. Examples include: "that's so gay" and "stop being such a woman."
Q: Why should I think twice about coming on to women with whom I work?
A: Your co-workers deserve to have a comfortable working environment free from unwelcomes advances. Everyone should be able to have a professional and productive work life.
Q: What if I just like to hit on girls for fun?
A: If you are making them feel uncomfortable, you should stop--and apologize. If someone else liked to joke by hitting you in a sensitive region every day, you would also like to be able to make them stop. This is not appropriate behavior for a work environment; you should discourage this behavior in others as well.
Q: Then how do I get a girlfriend?
A: Do extracurricular activities--there are many women in other departments and in the city/town where you lives. It is not the responsibility of the women in your department to date you just because you don't meet a lot of women. If you are really in love with someone who works with/near you, be respectful and be careful.
Q: Is it appropriate to check out other students? Is it appropriate to check out students if I am a teaching assistant?
A: Put yourself in the shoes of an employee, at say, Google, where you would find it important to maintain a professional relationship with your coworkers. If you are a TA, pretend you are a group leader responsible for evaluations that lead to promotions, etc. Graduate students should be held to some standards of professionalism.
Q: Why should I care so much about making minorities feel comfortable in my department?
A: It doesn't cost you that much and everyone is better off if smart people can do good work without always being made to feel they don't belong. If you're asking this question, I'm assuming people don't give you a hard time for being who you are--return the favor for everyone else. It does not benefit the field to push out those who may be different. Intolerance of homosexuality drove Alan Turing to his suicide; his death is one of the greatest losses in computer science.