Encouragement increases self-efficacy: the belief in one’s ability to successfully perform a task. Because we are more likely to engage in tasks we believe we can perform successfully, encouragement may be especially useful for attracting women to male-stereotyped fields and helping them to persist in the face of difficult challenges. Faculty can help by explicitly noting students’ good work, by actively encouraging their computing pursuits, and by encouraging a “growth mindset”.
Some suggestions
Praise and encourage effort. Help your students develop a “growth mindset” by praising their effort and diligence (e.g., "I'm so impressed with the hard work you put into this!") instead of emphasizing that they are smart or talented (immutable characteristics). Having a growth mindset is associated with persistence and “grit”.
Work it into your course materials. Integrate language into course materials that provides encouragement along the way (e.g., "This next task is challenging, so make sure you allocate enough time to complete it, including time you might need to seek help.") and positive reinforcement for completing tasks (e.g., "Congratulations on completing that difficult assignment!").
Make it okay to make a mistake. Let students know that we all make mistakes, get stuck, and have to redo things. Help them uncover their mistakes and encourage them to persist (e.g., "I see what you're doing and that's a typical mistake students make. Try it this way and see what happens.").