To the folks posting comments suggesting they are 50+ and still going strong or started coding when they were children: kudos to you. However, I think you represent the minority.
Development shouldn't be a 'King of the Mountain' contest, but it is. Here's my story: I have commercial experience in C, Java, Visual Basic, MUMPS/M/Cache and Node.js. I've worked in Healthcare ( A/R, Laboratory reporting & instrument data acquisition ), Integration Space (e.g. webMethods), US defense space. I've worked in a 'tools' team delivering components used by application development teams.
On the side, I've written an open source project on Github, I've attended many meetups in recent years - and user group meetings before the Internet was a thing.
My point, is that I am very experienced. I've never had a bad review, I've worked for at least 15 different managers, I've worked at a few companies multiple times.
Yet, I still struggle daily to hang on to the thing I love which is to write code. From my perspective, this is a real problem. It seems impossible to simply be a developer for your career because the pressure from the industry is to cut developer labor costs.
Btw, I am currently an Senior Architect. I've held many titles since 1988 including Princial Architect and Junior Programmer Trainee. ( I got into software after starting off as a lab technician in healthcare. )
The only people I know who are my age are those folks who truly are kings of their mountain. This is not what I envisioned. I helped raise a large family ( 5 children ), but I am constantly working in my head - regardless of whether I am at the keyboard or not.)
This is not what I expected; however, I've been paid very well, so I've been lucky - or my family has.