- If you aren't a specialist, you are constantly competing against 20-somethings who will always be more current in their skills and breadth than yourself, because they have more free time than you have (e.g. I have a wife, kid)
- I've written GUI widgets from scratch, servers from scratch, same thing with linked lists, sorting, etc. Guess what? That doesn't likely justify an ever-increasing salary. No one cares.
- Older programmers tend to be very opinionated and have lots of war stories. This gets on peoples nerves. The stereotype, based entirely on truth, is that they are cranky and hard to work with.
I don't believe the same is true in specialized disciplines like engineering or modelling/simulation, numerical programming, etc. A 40, 50, 60 year-old engineer/mathematician/analytics developer doesn't have the same stigma. Those decades of experience are invaluable. The fundamentals of engineering or statistics aren't being reinvented every 3-5 years. Web development skills that are 5 years old are literally worthless today. Aside from general problem solving techniques, unless you've really specialized, the stuff you developed 10-20 years ago is of minimal value today and that experience (writing software that is now obsolete and could now be written in a fraction of the time, likely!) doesn't make you competitive against younger programmers.
My takeaway was to go deep as possible into analytics and math. AI, ML, anything that requires heavy math background, those are what I'm focusing on now.