Live data from Hacker News

Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

news.ycombinator.com

161–170 of 534 posts

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#161
47 years old here, programming daily.

I think what we have to deal with is not just cognitive decline, but more importantly cognitive overload. People in their 40s usually juggle lots of responsibilities, especially if they have a family. At this age you normally also have earned some money, and if you start buying things like a summer house or an apartment for renting out, those things come with maintenance tasks. This can accumulate quickly.

Whatever the reasons are, my approach was to get used to it and work differently. I am terrible at doing multiple things at a time and my short-term memory is bad, so I learned to concentrate on one task at a time and eliminate distractions. I buy large monitors, so that I can have multiple things on the screen at the same time and avoid having to remember (I can easily forget an IP address when switching windows!). I spend money on Apple hardware, because of 5K displays: 5K makes a huge difference, because I can comfortably have THREE columns of code in my fullscreen Emacs instead of two. That means I often have 5 different pieces of code visible, which does wonders for things like APIs, which you mentioned — I can follow the entire path of a call and keep it all on screen.

I also noticed that there are positives that come with age and experience! I find that I'm much better at seeing the "big picture", analytical thinking, design, and predicting potential problems. Most importantly, I'm now much better at knowing what not to do. These skills are invaluable when running your own business.

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#162
It's hard to give an answer without knowing other variables - namely, what else is happening in your life.

I can relate to this sentiment over the past few years. The other variables, for me, are that the demands of raising a young family have grown, my day job has shifted into more of a maintenance mode with less latitude for creative development, and my family has recently suffered a tragic loss. During this time, I've been astounded how much more difficult it has seemed to accomplish fairly straightforward tasks compared to just three years ago. So I've also wondered if my mental ability has been on the decline.

Yet, this past year I've had two new interests spring up - one possibly a new career path, the other an avocation - and despite having precious little time to devote to them, I have been finding that I'm learning at a rate that I might never have achieved before - even in my 20s. I've somehow found myself with a "beginner mind" again, and at times I feel like I'm on fire. And I'm in my mid 40s. I can't explain where any of it came from (one path quite literally took off after reading a post on HN!) - it all seems spontaneous.

My little piece of advice is to be aware of these kind of nagging thoughts that take hold in your mind. Ask yourself if they are provably true and, whether true or not, they could cause harm. You never know what's around the corner, so it may behoove you to stay open and keep these nagging thoughts out of the way!

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#163
”It's often assumed that children learn more efficiently than adults, although the scientific support for this assumption has, at best, been weak," says study co-author Takeo Watanabe, a cognitive psychologist from Brown University”

https://www.sciencealert.com/kids-incredible-learning-may-al...

My theory is simple - kids simply have more time to learn and less other bullshit to deal with. Some years they have practically nothing else but learning, exploring, sleeping, eating and pooping. And not to mention that many of the humans around them actively bring all concepts down to their level (and some use babytalk) to explain them. So yea… an adult doesn’t have any of these advantages.

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#164
post #145

Only writing this because I didn't find anyone else referencing it, but I'd also check for some sort of a deficiency. It turns out that I was severely vitamin D deficient, as soon as I started taking it daily all my long-term health problems (including mental fog and memory issues) pretty much disappeared.

I would like to add, that I had the same issue. I was consistently worse at my job during winter. I picked up vitamin d and feel much better mentally. And i can finally work properly.

One more thing - co2 levels inside room can have significant impact on your mental capacity. So open the windows every morning, lunch and evening.

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#165
Don't think about it holistically. Try to just port the smallest, most independent parts you can one at a time and link them up. The approach I'd take (as a developer with shoddy memory to begin with) would be to find my way to the leaf nodes and start porting them, then work back up the tree. Hopefully that way I shouldn't have to have more than 2 levels in mind at any given time anyway.

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#167
post #17

I don't know you personally but I doubt cognitive decline has anything to do with this. As we age, we usually end up with more and more life responsibilities, beyond just the work we are doing. All of that is input to the brain and requires energy in response. The brain is not infinite. I often feel as you do, but then I have periods where I am as light and agile in my productivity as 20 years ago, maybe even more so…

Personal anecdote: I'm around the same age as OP and until recently also felt like my thinking was slowing down over the years.

I went for many years without an exercise habit. About 5 months ago I started lifting weights. The transformation has defied all my expectations and the biggest unexpected benefit is that my mind has become sharper, faster and more focused. I essentially feel like I've reversed a decade's worth of brain and body aging by going into the gym and lugging some iron around a couple times a week.

Around the same time I started cutting back on alcohol intake and cleaned up my diet a bit. So it could be any of these factors but I think it's a combination of all of them, as you get older, you need to maintain your body or it'll deteriorate and take your mind with it.

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#168
I sometimes feel like that, but I don't think it's anything to do with age.

First factor: having kids (or replace with any other adult stuff). It takes a lot of mental and physical energy I could just use for other things before.

Second factor: As Oscar Wilde said, "I'm not young enough to know everything". Many years ago I would have an opinion, off the hoof, about everything and everything seemed simple. Nowadays I tend to think things are rarely as simple as they appear.

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#169
> You know how it is, code calls other code, and logically it forms a tree of calls and return values that often goes several layers deep. I struggle to hold more than about 2 levels of this call stack in my head. By the time I'm down in the weeds I've forgotten what I'm doing, what the purpose of the actual API call is.

I also had that difficulty when I was a younger developer. The difference now is that the novelty of learning how to program at a professional level, learning a new language, and learning a new framework, isn't there.

Instead, the novelty comes from convincing others not to make the mistakes I would have made 20 years ago; and not making those same mistakes myself.

I was in your shoes, things I'd find frustrating are:

- The original version was working fine; a rewrite just isn't justified.

- Some team members are writing poor quality code, and I just can't convince them to do it right.

- The original version has style / habits that make it fragile or hard to understand.

- The original version has behavior that's generally not understood.

Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.

#170
With a 45-year-old Tom Brady still leading teams into the playoffs, I think this is a bad argument. If you think you're experiencing a cognitive decline at 40 you should see a doctor. Physically, yes your healing abilities aren't the same as when you were a teenager but the brain is different. Talk to your doctor about this before you make any life-changing decisions.
Post reply on HN