However, lots of people allow their minds and bodies to rot as they get older. My parents, as much as I love them, are not very employable at this point(at least not when compared to a younger candidate). They don't get much exercise and spend a large chunk of the day sitting in front of the boob tube. They are smart people, but their ability to learn new things has gone way down, and I have noticed they are a little more gullible than they used to be. Meanwhile, I have friends who are in their 50s and they have the energy, motivation, and learning abilities of someone in their 20s.
I wonder if this has something to do with the exercise they get, and the lack of TV watching. The calorie defecit from both those things probably slows their aging a tad too. I think if you want to be programming at age 50, you can easily add years, perhaps decades to your youthfulness by taking some basic care of both body and mind. It may seem like an obvious statement, but most people don't actually do this, and it shows in people my age who have the habits of my parents while also drinking heavily and smoking way too much. It's kind of spooky when I see people who were once youthful looking, in their 20s, quickly start to look like they are in their 40s because they don't really take care of themselves beyond basic hygiene.
Exercise and physical activity are supremely important.
Also remember that you are 30 and not 50. I did mention how I've seen people essentially become 40 at age 25-30, but I'm sure there are exceptions. There are also some factors that complicate this:
- Junk food is defined differently depending on who you ask. Much of what I eat is "junk food" in the sense that it's mostly red meat, fat, cheese, and some fish, yet I weigh 145 lbs and always check out fine during physical exams. Someone can also eat food that isn't commonly considered healthy, but they may also not eat very much of it. The French are a good example of the latter as the common French diet includes lots of carbohydrates and sugar, yet they don't have nearly the obesity problem of America, and it's suspected that them not eating as much of it is a significant factor. (Americans often value quantity over quality)
- As I hinted at a few times, calorie intake is actually a factor in how a person ages. If I remember correctly, a 400 calorie deficit slows aging slightly, and it has something to do with activating a protection of the chromosomes during mitosis, but it's not really understood by researchers as to why this happens. Note: This is highly speculative on my part, so keep that in mind. I do suspect that this plays a part in why some people I know age so poorly, and these same people also consume large amounts of food. Please don't just believe what I say, though. :)
- Sugar, which added to nearly everything you buy from the grocery store, has been linked to aging in that it causes oxidation in cells causing damage to proteins. I can't remember how the specific process works, but I think you can look up Advanced Glycation End Products and get a better explanation.
- Many people have this idea that consuming fats of any kind is bad. They really need to get this bad science out of their heads, but it's a zombie theory that doesn't want to die. I remember being taught about how bad fat was in the nutrition class I had in high school, and it's pretty bogus as fat is needed by the body in many ways, including brain function and synthesizing hormones. You can get away without it for a long time, but I don't think that it's sustainable, and maintaining a low fat diet probably has long-term consequences on cognitive function.
I know I've gotten way off-point here in explaining my hypotheses, but my point really was that $AGE != $ABILITY. Someone who is in their 50s could keep up with a person in their 20s, but might be rejected because their hair is too grey, which is sad. The best thing one can do for themselves, if they want to continue their career into their late adulthood, is live both for now and then; eat good healthy food and exercise now, eat good junk food occasionally, and maybe you'll still be coding and jumping into the mosh pit when you're 55. Everyone's body is different, but certain decisions you make will improve your odds of being in better health later on, and those decisions aren't a losing bet.
EDIT: It might sound like I'm advocating for some specific diet, but I am really not.