For me it was all relationships. I was out there from '94-'99 when the rig counts were at historic lows and the money was awful ($300/day for a lead geologist and $75/day for a mudlogger). So much so that almost everyone got out to work for their brother-in-law, went back to ranching, driving truck, whatever. But I find that times like that are the best times to double-down and show people that you're gonna show up every day and work like hell, keep a smile on your face no matter what, and help other people out. People see it and they start helping you out - usually without you even knowing it. I knew a lot of guys who just hung around doing the minimum every day and they got stuck.
If your wife wouldn't support you in your work, it's good you got out. You dodged a bullet over the long haul. Tech can be a great career. If I could give anyone advice, it's to find some aspect of it that you love and just chase it down. And you know what that is when you find yourself thinking about it every day. For me, I just loved figuring shit out and learning to write code helped me combine what I already knew about geology and computers with solving real-world problems. I was a total hack but I got the job done by spending time in front of the screen and reading books every time I got stuck. The growth opportunities right now are in things like data science, chatbots, and AI.
I'm an industry analyst now (got tired of the rat race of running product teams in Silicon Valley and a marketing org in Germany) so I do a lot of research, writing and public speaking these days for a think tank. I'm always happy to help a brother out. PM me and we can chat if I can be of any help to you.