Is the shortage of women in computer science caused by a failure to attract women or are women being chased away? That seems to be at the heart of some recent discussions I've been following on the subject.
Recently one educator talked about using games as a carrot to attract women into the field. While some debated the effectiveness of this method another educator objected to the use of the term "carrot" and the idea that women needed to be attracted to the field. That educator teaches at an all female school which gives a different perspective of course. No one disputes that the number of women in the field is at a low that is not healthy but the cause is clearly up for discussion.
On the "we're chasing them away" side I submit a list of "10 Programmers you'll encounter in the field" that I came across recently. While I don't think the list is intended to be all inclusive I find it telling that there are no types on the list that I can picture many people, let alone women, aspiring to be. Those are common stereotypes that are perpetuated by the media and I fear by some people in the field and they describe a very uncomfortable atmosphere. The popular media is not particularly helpful here either.
To overcome some of that uncomfortable atmosphere, especially in education, there are resources available for teachers. Recently in the CSTA blog, Leigh Add Sudol posted a link to a practice guide from the National Center for Education Research. This guide lists five recommended strategies for encouraging girls in Math and Science. Leigh Ann has a great summary of the guide which I recommend reading if you make time for anything at all.
Several years ago I attended a training event at Carnegie Mellon (where Leigh Ann is teaching these days) that included a lot of great information about how not to to scare girls away from CS classes once there were in them. I learned quite a lot and found that these techniques helped me with a lot of the boys in my class as well.
One of the things we forget is that in the range of attitudes, confidence levels, and learning styles there is real overlap between boys and girls. Things that make some girls uncomfortable can make boys uncomfortable as well. Likewise some girls will like the same things that some other boys like. We have to make sure we don't lose site of the fact that stereotypes are not a sound basis for categorizing all students.