I've heard this being said about mathematics and we know that both programming and math are logic based and pretty much require the same thinking techniques and programming is derived from math. So, wouldn't it be true that it's a young man's game for programming too?
You only see top programmers who started as kids and probably won some Olympiads and programming competitions, and this continued in their 20s and maybe kept their skill up till 30s but that's about it. What do they do after that?
I'm 30 and missed my chance to be a kid prodigy in programming or math and clearly not happening now. Is there an area where you can be good at as you get older and what is the old man's game options as a programmer?
Be open also for changes, we went from desktop applications to the web. Learn the technologies involved.
You need people with different backgrounds on the field though, just because I started very early, it doesn't mean that I don't respect or take to high regard somebody that would start coding on their 30s, but the opposite, they are important and valuable to have in a team. Developing software is much more than only programming and much less related to maths or olympic medals lol.
Nowadays there are so many materials and courses that makes getting into programming so easy, I had to go through many phases you just don't have to.
I've spent countless hours configuring servers in a way that nobody does anymore, using programming languages that almost nobody does, text editor configurations nobody use and so on. You'll never need to waste time with that. But once you are working 10+ years in the field, it will be expected from you that you learn new things.