I happened to know a little about age differences in cognitive ability. Mostly it goes down.
You raise multiple questions.
Jazi Zilber

It depends on what age we’re talking about. In the 80s pretty much everything goes to hell, for most people. Also, some people suffer from early onset diseases.

On the other hand, I’m in my 50s and I got a Masters degree in an area of applied mathematics from the University of Washington, while working full time.

The only reason that I didn’t go on for a Phd was that I wanted to build nderground.

When I read a phrase like “finding the kind of jobs more compatible for them [older programmers]”, I realize that this conversation has come to an end.