Eh, you can have all the attitude you want, but I'm watching my mother wither away with dementia (she's 81). There's nothing attitude-wise that is involved there.
It's just luck whether you can still do coding at 40,50,60,70+. You WILL reach an age where you will not be mentally capable of doing all the things you want to do whether that is coding or driving a car. Maybe science and modern medicine can save us, but it's too late for my poor mother.