"Not being attractive is a function of your genes"
No. Genes play a role, but attractiveness is not so much about looks as it is about confidence and self esteem (and smell, of course).
I was considered very ugly in my youth.
And yes, I compensated with computers. I did not got much experience with girls in teenage years.
Then I traveled, studied and grew in my mind and confidence.
And today, well, lets just say, sometimes I am still confused, when very attractive women flirt with me, as my old me would have considered them to be way out of league.
Now I know how to play the game, so to say, but in the beginning, I know I hurt quite some feelings and was probably considered arrogant, when I simply did not know how to respond.
So, I got out of the basement.
But:
"I don't see at all how an environment full of unattractive and not well-socialized people create an environment that is in any way hostile to women."
many nerds never did. They long for women, but never learned the game and sometimes think, they are too ugly etc. bullshit.
So when you have lots of men with unfullfiled desires and weak confidence or knowledge regarding women ... then yes, they act awkward towards women. They would like to bond, but don't knowmhow and think they never can. So not hostile, but awkward, so quite some women feel uncomfortable and rather leave.
Now to be clear, no, not every IT nerd is like this. But too many. I was one of them once.