One of the best things about programming is it makes it easy to create a meritocracy: computers don’t care about anything but cold logic (your answer is right or wrong; your algorithm is efficient or not), and that tends to bleed over into programming communities. This can lead to tremendous potential for individuals.
My first exposure to an open community (NOT the same as open source!) was running FreeBSD in the late ’90s. Having paid for all software up to that point I was blown away at how a group of people had created something equivalent to Windows that you could use completely for free (and on much cheaper hardware too boot, since it was so much more efficient). I wanted to find some way to give back to this community that had created something I enjoyed using so much. But since I wasn’t really a programmer (and certainly knew next to nothing about C or operating system design), the most I could do was try and help other newbies out on via a mailing list.
A few years later I discovered the Postgres community, and I thought “Great! I’ve been building databases for years, this is some place where I can really help people!”
So help I did. First just helping users, but eventually becoming more active on the “hackers” mailing list, where development of Postgres itself is discussed.
Over time, I ended up building an internet brand around myself, completely by accident. At one point googling my name resulted in over 250k hits. This resulted in my first job as a Postgres “expert”, and really changed my career path.
I’m not mentioning any of that to boast: the real point is that my desire to return a good deed (a group of people building a great piece of software I could use for free), combined with a meritocracy (it didn’t matter that I was essentially self-taught) has given me a career I really love, and that pays well to boot.
So, if you really want to focus on the monetary side, look for ways you can add value for others, especially in an area that’s less mainstream.
But really, it’s hard to go wrong with programming (unless you don’t like learning, because that’s something you can never stop doing).