I experienced this kind of bullying not in school, but at work. I used to be very cheerful and helpful until in a particular work situation, I finally realized guys were randomly pinging me or stopping by to disturb me with how to write a quick unix command to do X or how to make some regex, just to see how cute I look when I'm stressed and how fast I can give them an answer. And I'm pretty good, and they joke with each other about it and keep doing it like you play with a dog. Its also the power thing, some people like demanding an answer from across the room. I totally relate to "quickly finish assignments and bury her nose in her book". Now I work in a less difficult environment, but this is basically how I deal with work now -- efficiently, then get out of there, offer nothing personal. I went to college that had a pretty good gender balance and was self-taught before that so I never experienced it before work. So in conclusion, this may be good preparation for your daughter good preparation for technical work in certain environments. There are many good workplaces but you can't be guaranteed that all your life, so dealing with this kind of thing is important to learn. You should tell her that this is a career that pays well. You may have to be smarter and a more hardworking than your peers to make up for the lack of networking, but actually the extra self-reliance that you need to exercise will make you a better and more confident programmer. Also as a woman, you need to be careful of accepting mentorship, especially male mentorship. Sometimes there's no reason for it other than the mentor wants to spend some time with a young woman.