Lack of encouragement is a major issue and it starts within the family as well as early childhood education. I was very lucky to have a family with very storing female figures, and a Mathematician dad who was very encouraging. I always had math (word) problems, puzzles and blocks to play with. My high school math teacher was a major influence. He noticed my passion towards math and created opportunities for me to teach certain topics to the class, prepare and post math questions for university entry exams, etc.
Schools have started addressing these. Hour of CODE (CODE.org) is a great initiative that got everyone's interest and made the concept popular. Many schools have incorporated hour of code to their program already. Scratch by MIT (
Make games, stories and interactive art with Scratch. (scratch.mit.edu)
) is another one that introduces basic concepts of programming in a story telling fashion where kids can create animations and games.
Media needs to also pickup and include women characters in the STEM fields, e.g. in children’s TV series or games.