I think there's a fair amount of reporting bias in this issue, personally. I'd totally non-scientifically split older (over age 35) engineers into three rough categories. This is not meant to be comprehensive or empirical, it's just mirroring my anecdotal experiences as someone who has been in tech for 20 years:
- Average or better engineers. Between the facts that they are competent and have 10+ years of experience, they tend to have zero problem finding and keeping good, well-paying jobs. If they run into ageism, it gets lost in the flood of other offers they're likely to get in the same round of interviewing.
- Below average engineers. These may be the source of some of the ageism complaints, but it's missing the forest for the trees. They are a common sight in government/non-profit orgs or old first-mover companies: folks who may have "senior" in their title but have been doing simplistic work on the same outdated project for their whole career. Have trouble finding new jobs when they are inevitably laid off not because of their age, but because they simply aren't good engineers.
- Dinosaurs, ie- people who were good or even great engineers ten or twenty years ago, but have not kept their skills and knowledge base current. These are the people who are most likely to be affected by legit ageism, in my experience. A slightly fictionalized representative scenario from hiring a position at my last job, for work on a Java webservice: "Well, the 50-year-old blew through the whiteboarding in textbook C and can concisely enumerate the advantages of different caching policies off the top of his head, but has never used Java, worked on a web service, or used an RCS more modern than subversion. The 25-year-old struggled a bit in the coding exercise and gave an imperfect answer in the theory questions, but his resume has a link to his Github, which includes a RESTful webservice he wrote in Java. And the 50yo asked for the tip of the salary range, about 20% more."
I've faced that sort of decision quite a few times, and it's not easy. I could see why the older candidate would suspect ageism played a role if they didn't get the job. But the power is in the candidate's hands to create the better outcome: if the 50yo spends some time familiarizing themselves with marketable modern technologies then they get hired over less experienced candidates the vast majority of the time.
On a personal note, in the above scenario we did end up bringing on the 50yo with amazing fundamentals, and he was a total dud - possibly the worst hire I've ever made. Bungled almost every Git interaction, couldn't work in Linux and frequently screwed up deployments, great imperative code but all his architecture was early 90s-style spaghetti. The important takeaway that I tried to stress with the team wasn't that older devs can't learn and shouldn't be hired, just that THAT dev couldn't learn and shouldn't have been hired.