Recent thread on Hacker News, https://news.ycombinator.com/item?id=29360119, was very interesting for me especially since I turned 40 this year.
Programming is something I enjoy and am pretty good at it. I’m still not at the top of the salary range for programmers but this is a tough question. I can get into FAANG but there is still a ceiling of how much one can earn as a software engineer.
This comment
says it best:
What does a welder, carpenter, or plumber do when they've hit 35 and mostly mastered their field? Answer: come to terms with the fact that their mastery is not very much in demand, they will never make more (inflation-adjusted) than they do now, and either plan for retirement or find a new job (usually management or small business owner) where their hard-won skills are mostly wasted.
I think the same situation applies to programmers. Very few businesses are working on extremely hard problems that only top programmers can solve. Perhaps my next move should be a business owner and start a consulting firm.