I'm sorry you received those comments.
First, let's get something clear. I know of no man who codes with his penis, so I'm pretty sure it's not necessary for the job. I've been coding professionally for... well, longer than I can count on my fingers and toes, and I've never had to borrow one to complete an assignment.
Second, the reasons your friends give to explain why it's a man's job show they don't understand how programming works. The image of the loner programmer is obsolete - if it ever was a thing. A programmer must understand the problem being addressed, that means she (or he) has to communicate with the client or the rest of the organization to make sure the right problem is being solved. She also needs to communicate with the rest of the team, so the work gets done correctly, with all the pieces connecting well with the other pieces.
A programmer who works three days straight without sleep is not a good programmer, because lack of sleep is more likely to cause errors, and the programmer is generally much less productive on the third day. It may also be an indication that they didn't express clearly to their boss what could and couldn't be done given the time allowed, or just didn't manage their time well.
I don't know what being a CEO has to do with programming, but they're also pretty confused there too. Whether one has what it takes to be a CEO doesn't imply much about their ability to code. But your friends are also mistaken on how women in power behave. Do they even have female friends? do they honestly think that their mothers are likely to go crazy because they are women?
I find men who have pretty clear ideas of "how women are" or "how women act when they're on their period" are quick to qualify "but not my mom/sister/girlfriend". It's like "all women" are one way, except the ones they know personally. That's weird, don't you think?
Finally, as for being fragile, maybe they think any woman who stands up for herself or who disagrees with them is a bitch, because, well, she's not being all sweetness and kindness. A man acting the same way may be "strong" and "confident" but a woman? she's a bitch.
There is room in this world for women coders, programmers, and developers. Front end, back end, database, UX/UI, systems administration.
There is room in this world for you.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.