Perhaps I can add my experience in this. I was very good at programming in college. I was one of those guys that left the labs under the hatefull gaze of the entire lab section having finished his assignment early. And boy I loved it too. I was so happy having finished a large programming project or a large engineering design assignment. After getting an interesting assignment I would literally skip on the way back home daydreaming about how I will write it. I was not at the best university, mostly because I was an immigrant so I was not able to get good grades/sat scores, but it was a very decent state school.

But while in college I saw that most powerful people in america were lawyers of some kind. These were the days of the Clintons, btw. Then I got into my stupid head that perhaps I should go to law school. You know in order to join the power elite and make a difference and all that.

By that time my english was very good, and being naturally intelligent (I will not bore you with false modesty), I got into some of the very best law schools in America. I chose one and did very well there and got jobs at some very prestigous top law firms. Basically, for a while I had the promise of a career that most lawyers would dream of.

But now this is all in shambles and I am thinking of getting back into engineering or something more closely related to technology.

Oscar Wilde said something very wise (paraphrasing): "I used to have the life of my dreams and I was happy; now I have the life of everybody else's dreams and it is incredibly tiresome"

So my advice is if you are one of those natural programmers by all means do it, and do not ever think about what other people say about "what would you be doing when you are 50." Yosef (the author of this article) is one of those people, and to him the answer is very simple and very happy: "programming".

You see this question of "can you see yourself as a programmer when you are 50" does not have much to do with ageism or the labor market but about people's inner feelings and desires. Some people are horrified to see themselves as programmers when they are 50, not because of the market but because they secretly loathe it. And to see themselves doing it when they are 50 seems like a life sentence. For others, it is the most natural thing in the world.

I remember when I was a lawyer I once had an especially good stretch. Some of our top clients complimented my work. This is a big deal because those clients spent crazy money on fees and it is very rare for anyone to complement a lawyer's work. I thought to myself "wow keep going and you will be a partner in no time". Then I thought about life as a lawyer, doing the same thing over and over again, for the rest of my life and it was the most depressing thing ever. It was horrifying and the thought about multi-million dollar salaries did not help (although now in my much more perilous situation those salaries sure seem nice). I got into a serious depression and that badly affected my work thereafter.

So my advice is, if you are good at programming, if you are one of those few for whom this stuff just clicks, go for it and do not listen what anyone says about markets, or ageism etc. Note that those that are really good at programming are very few. Even among programmers, I would say that those to whom programming is annoying and a little scary greatly outnumber the ones that have real talent for it.

So people will generally give you many reasons to move away from it, but those are their reasons, not yours. If you are part of this select group just count your blessings. And here are some of these blessings:

1. You know how rare it is to have a passion and talent for something, and at the same time have that something be valuable and useful. Think of all the brilliant and passionate people that are into disciplines where only a few thousand people in the world get a decent income. Think of all dancers, screenwrights, directors, painters, poets, chess players, etc.

2. You have a wonderful differentiator of skill and ability: things either work or not. When I was a lawyer I had to compete with so many hacks. When I would stay up nights writing complex documents, trying to phrase every single word just the right way, when I would stress out for hours about a particular phrasing or argument, they would slap something together quickly and with no second thought. And their work would look like mine to the client. The consequences of bad legal work are uncertain and tend to be much delayed.

3. Your craft requires very little investment. Again, you have no idea how lucky that is. Even startups that require capital, get it mostly for salaries. There is no expensive equipment to purchase, etc. Marx thought so much about how to connect workers to their means of production, and in the end came up with a theory that turned out into a complete disaster and caused untold tradegy. If he only knew that some day there would be a sub $500 means of production that can create wealth worth millions he would not go into silly plans about dictatorship of the proletariat.

There is more but I have rambled enough. Heed my advice. If you are one of the lucky ones, ignore what the less lucky ones are saying and do not squander your good fortune.