There's another discussion of women in programming raging on the Internet. This time, it's in Ben's digital humanities world, about expecting and teaching humanities students (often women) to code. One comment on the post is by Stephen Ramsay who teaches a digital humanities course. He encourages his students, often women, to continue by taking computer science classes. They almost always drop out, even after being highly competent in his introductory class. Here are some of my thoughts on how to keep that from happening.
1) Critical Mass is having enough women (or some other minority group) that you don't stick out. From my observations, 10 is the bare minimum to reach critical mass. Only 2 is not enough. So 2 in a group of 20 are still extremely self conscious. 10 in a group of 250, however, "works". I personally consider 10% a "successful" number.
2) Build your own posse. If you have people to sit with, to do homework with, to make fun of the obnoxious, under socialized geeks in the room with, it helps. It takes a while to do this organically -- I found a CS major roommate and then started dating another one. The class ahead of my had a particularly high performing posse of two women and a man. Some of the later-joining CS majors in my class came over as a group of 3 women. When Stephen takes one of his students to a programming contest, it doesn't work. All the imposter syndrome comes out in force. The fix? Take a *group* of students. (Even if you have to drag them or bribe them. :) ) You can also build posses by finding older female mentors for beginning students, or starting or joining
3) Go meta. I spent my senior year of high school reading about women and achievement, then followed it up with a major in the Study of Women and Gender. Most people won't have to go so extreme, but finding one good survey article about women's experiences in CS gives you a framework and vocabulary for understanding, analyzing (the geek's favorite way out of an awkward situation), and talking about what's going on.
Hope that helps, Stephen. Good luck!