Serious strength training (ie the starting strength routine)
+ Scientifically proven to be good for your brain
+ Quantifiable progress every time you workout
+ Relatively low cost in terms of time and money
How is it that a middle aged person one can smoothly lift weights that 2 months prior would have been too heavy for them to lift even if their life depended on it?
It's not because they learned a neat trick or found some short cut. There can be nothing gained in knowledge or experience that can account for this. Muscle growth might be a factor but that takes a while.
The change that's occurred is at the level of the nervous system. In order for this to happen, chemicals and hormones were released to give new vitality to a system which was just going to rest and decay until death.
But here's the kicker, why would these changes stop at your motor neurons? Could it be that the rush of chemical activity doesn't just help change behavior of motor neurons, but also the neurons in your head?
Think about all the cognitive benefits associated with strength training exercise and you will see it's much more than a hobby to keep yourself busy.
Modern life is incredibly sedentary compared to what humans have evolved for and this problem is especially bad for programmers. Without pushing yourself physically, your mental fitness will decline too.