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 pretty good at it. I’m still not at the top of 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 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 business owner and start consulting firm.