*Assuming a technical career path is chosen and there is progressive career and skill development.
It's more that, for most business programming roles, experience stops being cumulative at some point. For example, for a Java developer, 5-7 years is probably about where experience tops out, and beyond that it doesn't really help if you have 15 years experience in Java, or you have experience in Perl before you did Java, etc.
Cumulative experience of 10, 20, 30 years is really only useful for highly specialized roles (writing compilers, database engines, operating systems), management, etc.
I would worry less about ageism, and more about working on a track where experience is valued.
So yeah, my age is a problem, but it's not ageism.
Look into it, it’s real. The people saying otherwise are either lifers at their company or lying.
The amount of opportunities available to me just grow year after year, because I get to know more people (which also move to different companies), that would like to work with me in the future.
Just be a person that ships, makes things work, in a friendly mood and you are set for life.
People you work with also grow in their careers, which means that often enough, they make the calls on who gets hired and who doesn't.
I think that during your 50s, you should have built a good "base," though, like paying off your mortgage. You should have more leeway to actually take life in a less demanding way, so perhaps do some consulting or not work full-time and earn a living to retire in peace.
As long as you’re actually competent I don’t think it would be too much of an issue. For someone who comes off as green with their skills, a company is more likely to take a gamble on someone young than someone older.
My experience has been that most devs in their 40s and 50s can run circles around those in their 20s and early 30s. If someone is already good in their 20s they're likely a savant. TL;DR the biggest thing is managing your career intelligently. I think there's more risk when you approach 50, but the same is true in every industry.