Always be extremely skeptical of anyone learning to code in their 40s, they can do it for short stretches but it is probably not a good idea to pick up coding for the first time in your 40s since the probability of doing damage to your brain is going to be relatively high.