I'm a woman who studied physics and astronomy at university. In my final year I taught myself programming in my spare time because I was interested in it, and knew the job prospects were better than in physics. I had other hobbies and an active dating life at the time, but I still managed to get a software job straight out of university, and it's evolving into a fruitful career.
Learning to program in no way requires 3 years of monastic devotion.
I see there is a lot of genius in this thread, having come across all these concepts and got a working understanding of all these things in a few weeks/months. I'm 10 years in and I still learn weekly. Either Dunning–Kruger is in full effect or you internalized so many thing you don't see them anymore.
One of my dormmates in college was in some engineering degree, I forget what, and decided to learn some programming from us, since so many of us were in CS. It was a pretty short time before he could do useful things, actually helping him finish his projects faster, but all that took was some very basic concepts: arrays, loops, conditionals. I think on the order of a week to get the concepts down and be able to write a C program from scratch, and another week or two before he had the concepts embedded in his mind enough to use it with his own work.
Thing is, even that was far faster than I typically saw for those same concepts, as a Teacher's Assistant for the introductory CS courses. The engineering mindset seemed to give him some sort of foundation to pick it up faster, even having never done it before.
And his code was absolutely terrible, he had a long, long way to go if he ever wanted to even consider programming as a profession.