If I have a very positive interview for a job I'd be great at, and don't get an offer, that may have absolutely nothing to do with my abilities, either real or perceived.
That's true. I once had a very positive interview, but I could read the lead interviewer like a book. He was thinking "This guy's better than I am. If I hire him he'll be a threat to me." It was written all over his face. Unsurprisingly, I wasn't offered the job.
But I didn't sue. I didn't even care. I'm 65, I've been programming commercially for 25 years, and I've been kicked in the balls by life so often that I doubt that I could ever be fairly accused of making any false assumptions of fairness! Life IS unfair, period. :)
What I'm saying here is that a confident and entrepreneurial programmer will either so dominate the interview as to blow all ageism out the window, or he will conclude that the company wasn't worth working for anyway and therefore probably isn't worth the further waste of his valuable time and money suing them. And if he doesn't do one or the other, then he probably wasn't a good choice for the company.
If he's got ideas, enthusiasm, experience and stickability, well... why doesn't he use them and get on with the next project, move, or interview? I kinda feel that if an engineer has to resort to the courts to secure his income, then he's dropped out of the race anyway.
Just my two cents' worth.