Is it true that you can’t work in it more than a couple of decades because all your skills will go obsolete and you’ll be replaced by someone younger?
If this happens (and yes, to some people this happens), then you are doing it wrong. Getting older usually brings some problems, like accumulated bad experience, loss of illusions, less enthusiasm, possible burning out, and starting a family which means that you are less willing to work overtime, etc. But this happens in any profession.
What exactly are your programings skills? (The “larger picture” is already mentioned in a shminux’s comment, so I focus here only on programming.) If you have memorized a few keywords and function names, then honestly you don’t know anything about programming, and a new programming language or technology will make your skills obsolete. Even for a good programmer, having the important keywords in your “memory cache” is useful, but switching to another language is just a matter of time.
After “memorizing the keywords” level you get to the real programming—you design algorithms, understand design patterns (which simply means: you will need to solve thousands of problems, but then you will see that 99% of them can be classified as belonging to one of cca dozen templates, and when you are familiar with the templates, solving these problems will become very easy), and you will see something really new only once in a while (even most of the new things are just reinventing the wheel). And even if you see the new thing, it still helps to have a knowledge about the old things, because you will understand why the new thing was designed this way.
You have to develop some meta-skills to make learning easier. For example if you work in multiple programming languages, you often use the same or similar thing with a different syntax. So why not make yourself a cheat-sheet per language per topic? Then if you have to learn a new language, you have to spend one day constructing a new cheat-sheet, and you are fluent in the new language. Using Google and parsing the official documentations are important skills. This can make your learning curve incredibly fast. Are there fresh people coming from university that know more than you? Listen to them, make notes of the keywords they use, ask what tools they use, then read Wikipedia, read a free online book, try the tools, use google, and within a month you will be able to give them good advice.
And then there is the higher meta-level where you decide what exactly will you do and how will you sell yourself.
If this happens (and yes, to some people this happens), then you are doing it wrong. Getting older usually brings some problems, like accumulated bad experience, loss of illusions, less enthusiasm, possible burning out, and starting a family which means that you are less willing to work overtime, etc. But this happens in any profession.
What exactly are your programings skills? (The “larger picture” is already mentioned in a shminux’s comment, so I focus here only on programming.) If you have memorized a few keywords and function names, then honestly you don’t know anything about programming, and a new programming language or technology will make your skills obsolete. Even for a good programmer, having the important keywords in your “memory cache” is useful, but switching to another language is just a matter of time.
After “memorizing the keywords” level you get to the real programming—you design algorithms, understand design patterns (which simply means: you will need to solve thousands of problems, but then you will see that 99% of them can be classified as belonging to one of cca dozen templates, and when you are familiar with the templates, solving these problems will become very easy), and you will see something really new only once in a while (even most of the new things are just reinventing the wheel). And even if you see the new thing, it still helps to have a knowledge about the old things, because you will understand why the new thing was designed this way.
You have to develop some meta-skills to make learning easier. For example if you work in multiple programming languages, you often use the same or similar thing with a different syntax. So why not make yourself a cheat-sheet per language per topic? Then if you have to learn a new language, you have to spend one day constructing a new cheat-sheet, and you are fluent in the new language. Using Google and parsing the official documentations are important skills. This can make your learning curve incredibly fast. Are there fresh people coming from university that know more than you? Listen to them, make notes of the keywords they use, ask what tools they use, then read Wikipedia, read a free online book, try the tools, use google, and within a month you will be able to give them good advice.
And then there is the higher meta-level where you decide what exactly will you do and how will you sell yourself.
Thanks for the detailed response :)