A really interesting take I heard on NPR was from a woman from GirlsWhoCode and her take on why women fare worse in programming than men.
She told a story about a high school CS class where the students were given an assignment and told to code it. An hour goes by and the boys in the class all turn their assignment in before the class is over, some got the best solution, some got an acceptable solution, some turned in code that didn't even compile. The girl in the class walked up for help because she said she just didn't know where to start. The teacher replied, "Well what did you attempt to do?" only to find her code editor was completely blank. After 45 minutes not a single line of code written.
The interesting thing is that for every girl that does this, she will start hitting Undo and it will reveal that she in fact coded a solution that was partially complete or almost there but she ended up erasing everything before asking for help. The boys almost never had shame in turning in sloppy or unfinished code.
The important takeaway from this is that girls are raised in our culture to strive for perfection. They are constantly bombarded with perfect ideals from the time they are children to the time they are adults. They are actively disservicing themselves by sabotaging their own efforts when they are not immediately perfect at what they are trying to accomplish. They would rather turn in nothing or give up on interviews than present something less than ideal.
This explains why women fare worse and give up sooner in interviews than men. Boys are taught from a young age to keep getting up, keep trying, failure is okay and is how we learn. Praises and complements don't make us stronger, failure and pain make us stronger. Girls are taught that the prettiest girl gets a free ride in life. She was innately born to be beautiful, she was perfect without trying. Their self worth is programmed to be externalized from a young age to where validation and praise from others defines who a young woman is.
Women suck at programming because the patriarchy programmed them to be that way.