I like the question, a lot. As a professional developer, I'm learning things all the time and after all these years, I want to know what has helped me the most to stay employed and have a comfortable living but as a result of the contributions and positive impact that I've created with the products and services that I successfully built and shipped. There's no other way for me to measure success.
I continuously ask myself this very same question all the time and since long time ago. I think is a very honest way to evaluate you in the mirror.
I like the investment term that you used: "return on investment" or aka ROI. Ultimately a successful career is the result of the accumulation of multiple smaller successful investments and minimizes or cut your losses; yes you can have losses also. But if you play the game well: re-invest your winnings and minimize or cut your losses, you will be rewarded with a comfortable living and some decent savings, or better have your own mini Microsoft, mini Google, etc.
Ok back to reality with some very pragmatic programmer skills examples.
In my case, I can easily say 2 things have given me a very good ROI, and it hasn't stop, they keep giving me every day. A very good sign of a good investment: they keep giving to you even when you are sleeping! Let me check...ok the market has closed and my online statement was just updated, so I have fresh numbers:
English = 1*10x12 %
SQL = 1*10x9 %
Unix = 1*10x9 %
:-D
Seriously.
English (my native language is Spanish) opened many doors to me and exposed me to the widest array of programming material known today.
SQL, when I originally studied E-R theory, and SQL as an implementation of that, we only did it on the chalkboard and on paper exclusively. The concept had like 5-7 years of being announced, and commercial SQL databases were very expensive and unavailable for small universities. I really liked it and learned all about the E-R theory: entities, tuples, relationships, primary key, foreign key, joins, normalization, etc. There were not free things like PostgreSQL or MySQL, which I wish I had had. The first DB that I had all for myself was MS SQL 6.0; I think it was the first release of a SQL database product from Microsoft.
Unix – Linux/GNU tools, what can I say about my favorite OS and associated tools?
The interesting thing about these programming skills, is that they have been stable for the longest time: they are not the latest hot buzzword or you don't see them being used as a fashion statement. They are just sitting there, not making too much noise but they are solid as the Gibraltar rock. You can easily research some old "skills" that were very popular in their time and now they are obsolete or almost dead: PowerBuilder comes to mind. No, these skills can be boring but they are solid investments and keep giving me very juicy returns, year after year.