I'd say in some circumstances yes you can be too old depending on where you're trying to get a job. For me as a 40'ish year old with 3 kids (1 an infant), 3 dogs, a busy home I can't dedicated the time a 20'ish year old could with no responsibilities. Can I work for a FANG? or start-up? Probably not. I just depends on the culture. I love to code. I envy my earlier years where time wasn't as valuable and I had the freedom to try new things.
There's the inverse too of being older programmer with more responsibilities at home. It's lost on my wife when I explain to her look I want to spend time with you but watching the kardashians isn't good together time - so that I'd rather work she would take offense. Time is precious.
Let’s not mix up Google and a start-up. Google has 20,000 programmers. Being 40 or having a dog or kids or being unwilling to work more than 40 hours are no barrier to entry.
Startup companies on the other hand can demand more.
There's the inverse too of being older programmer with more responsibilities at home. It's lost on my wife when I explain to her look I want to spend time with you but watching the kardashians isn't good together time - so that I'd rather work she would take offense. Time is precious.