On discrimination. A quick look around the blogoverse, and particularly at blogs by women in science shows that many (but not all) women have experienced sexism, both overtly and subtly as part of a pattern that is only noticed over time/after talking to others. I too have experienced this in my life (on the receiving end and as an observer). One of the reasons I decided to start a blog is because reading about the lived experience of all these other women is a huge benefit to me, making me realize that it isn't just me, that I am not alone, and that I am not crazy (an issue with subtle sexism). I think that is why there is such a high proportion of women bloggers with respect to their representation in STEM fields.
I also notice that many of the women who state that they have never experienced sexism are younger. This also is consistent with my experience. In my first few years as a PhD student, I would have said the same thing. As I move up the totem pole, sexism becomes both more noticeable and more of an issue in my life. In retrospect as well, I can see that as a women in a male-dominated field, I was expected to conform to (male) social norms, and that this is a form of sexism as well. Venting via the Internet and reading others' posts helps me to process these issues in my life.
On diversity. It makes a huge, huge difference if the leadership is committed to diversity rather than giving lip service. My old division at National Lab was a great place to work partially due to the diversity in my colleagues. This clearly came from the top, as the division leader promoted women and underrepresented minorities into leadership roles, which attracted top female and minority candidates in job searches, which led to improved diversity in the division, which reinforced all of this. When my spouse came to a work-related award ceremony, an unprompted direct quote was "wow--the other divisions are a lot whiter and maler than yours is."
When I was interviewing for faculty positions, I noted the number of women and underrepresented minorities on the faculty and in the student body. Several departments had just one woman and no visible underrepresented minorities. This was hugely unattractive to me, especially after working in my diverse division at National Lab. My current department has almost 20% women and several underrepresented visible minorities on the faculty. This was an important secondary consideration (after research fit and startup package, and on par with location and salary). I definitely prefer to work in my department with many women at all ranks than to be alone or 1 of 2.
This is clearly a recruitment edge for my department. I do understand that by not wanting to be a pioneer, this just passes the burden to someone else, and I am grateful to the women who came before me for doing just that. But in this day and age, foresighted departments/workplaces/divisions should get to reap the benefit of their hard work to diversify in the past. The presence of women in positions of leadership in the department and at the university is an important signal, as I learned at my National Lab. As an example, in my department, faculty meetings start at 2, not at 4 or 5 so people who need to be home by 5:30 can see to both work and home obligations.
In my own group, I am fortunate. Although early in my career, I have 3 men and 2 women in my group (in my sub-field about 30% of PhDs go to women). Based on the inquiries I have received for next year, it looks like I will maintain this ratio. I didn't really do anything special to recruit women, though I welcome this outcome. My management style is fairly hands off, and I don't require specific hours (as long as the work gets done in a timely manner), which I think appeals to both men and women. My research is fairly interdisciplinary, resulting in group members with a variety of academic backgrounds, which can be an advantage. I think that diversity recruiting can be a vicious or virtuous cycle, where groups that are all-male can have trouble recruiting female students due to the actual or feared lab culture, and groups that are more balanced are more attractive to women (as in the case for me when I was job searching).
On the leaky pipeline. One aspect of the leaky pipeline is almost certainly lack of role models. As a student, I never had a female professor for any of my science or math classes (in undergrad OR grad school). I never knew a female faculty member with children until I was in my 5th year of my PhD program, and the only tenured woman in the department got pregnant. As a student, I never met an employed women scientist in my sub-field in real life until I was interviewing for jobs--all of the women I knew in my area of interest were students, postdocs, or names on papers. Almost all of the seminar speakers were male, all of the professors in my area were male, and almost all of the students (90%!) were male. It is really, really hard to be the only woman. In fact, in my subfield and department, the graduation rate for women PhDs was 10%. It gives me great sympathy for underrepresented visible minorities (though I know it is not the same thing). I understand why many people, even in the absence of overt discrimination, give up. My department claimed it was because they quit to have babies (bs, btw) or to relocate with a spouse (more plausible, but not 90%). Science is hard enough without stacking the deck against success. Things are better now, but not by much. Not by enough.
Partially as a result, as a student, I didn't want to be a professor. I did, however, want to go into research science. When I was interviewing in industry, I saw many instances of institutional sexism that fairly scream out "Boys Club--No Girls". For example, at one place, I had to sign something stating that I understood that women at a particular worksite were 5-10X more likely to have a miscarriage than the general public. When I asked what happened to pregnant employees, I was told they take their chances, they quit, or they transfer out of research. Gee that is really welcoming. Not surprisingly, there were not many women working there. It is frightening that they thought this type of environmental exposure was just fine, since it only impacted pregnant women (that they knew of). Men never are expected to choose between a family and a career, yet this happens to women frequently, and it is a major source of frustration. The company was otherwise very family friendly, and didn't seem to understand the disconnect here.
Unfortunately, the pipeline problem also is at least partially a societal problem. The culture of research science (and of other high powered careers like partner in a law firm or investment banker) assumes that people are willing to put work first and everything else second. There are many people, men and women, who don't want to do this. At the same time, there is social pressure on women to have children, to cook and clean, and to take care of sick family members. Something has to give--the competing pressures on women only make the decision against unending work occur earlier for women than for men. We will never "fix" the pipeline without "fixing" society to be more balanced.