Live data from Hacker News

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

news.ycombinator.com

321–330 of 534 posts

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

#321
Perhaps try working memory training software of the type that Suzanne Jaeggi used in her studies. The software is called Brain Workshop. It is free.

Note the science on this is messy. Jaeggi's paper suggested transfer to fluid intelligence, then another paper questioned that, then she wrote a better designed follow up, then another paper questioned that.

Anecdotally I think it worked for me. I personally think the difference in study outcomes may have been driven by differences in how diligently study participants stuck to the regime, or perhaps even how well they understood what they were supposed to do.

A second recommendation is to read John Medina's book 'Brain Rules for ageing well' which has lots of tips for combating cognitive decline.

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

#322
I would doubt the code first. If it is built on layers of indirection that's a sign there's an abstraction that's not being made which could simplify that code. We write code first, and foremost, for other humans to understand. If it's too hard to understand due to all the indirection that's a problem with the way the code is written, not you!

A big difference I find between myself as an engineer now (40s) vs myself in my 20s is that I have the education, experience, and wisdom to appreciate elegance and simplicity. When I was younger I would throw myself at a problem and keep adding code until the program did what I wanted. I could only imagine what people meant by "elegance," and "simplicity." These days I rely more on mathematical reasoning and think about the problem before I start writing code. I feel as though I can finally see that simplicity is not effortless.

Barring very specific health complications, cognitive decline is not a major factor for most people in their 40s.

Most programmers are fooling themselves if they think they can keep the state of more than a handful of variables in their head and detect errors or understand the entire control flow. That's a code smell, a problem, something that should be addressed. After all: if you can't understand the code, and the next person has difficulty as well -- if you need to make a change to it, how do you know that the change you've made is correct? Do you know that this code does what it's supposed to?

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

#323
I’m 41 and feeling the same. One solution that helps me is to be more methodical, and make detailed notes. So, for example, when trying to understand a set of nested calls, I decide whether I’m going to do a “depth first” or “breadth first” analysis and then I work my way through it, noting as I go. And if it’s BFS, I do actually keep a noted queue of nodes to traverse. Then I can work mechanically without worrying about my limited memory capacity.

My memory is totally shot. I think it faded away through years of insomnia, poor diet and lack of exercise. It became harder to live healthily after I had kids.

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

#324
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 wo…

> lifting weights.

In this recent survey of nootropics [1], weightlifting was better than dozens of chemicals. In fact, it was third only to Dexedrine and Adderall. It scored better than Ritalin! And its variance is tighter than most substances, meaning it's one of the most likely means to improve results for anyone who takes it on.

Personally, I agree. After covid sapped some of my energy, it took about 2-3 months to get back to my average gym sessions and now I feel so much better. Happier, tougher, etc. When I am in shape, the geometry of the world around me changes. A distance or effort I might consider looks, feels, and is more in reach after a few weeks of rows, lunges, pushups, hanging, swinging, light cardio, biking, etc.

[1] https://astralcodexten.substack.com/p/link-troof-on-nootropi...

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

#325

Earlier quoted context omitted.

I think the problem is you start saying "no" to more things (literally and metaphorically) before you've even worked the idea or given it a shot. This is purely supposition.

I like to think of creativity as out of the box thinking, and as we get older and more experienced, the box grows.

That is a great way to phrase it.

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

#326
Do you take notes on paper? If not now's the time to start, get you a legal pad and jot down some notes like the Where, What, When, Why, and How.

We only have so much working memory, life at times can take up much of it. No need to try to force our brains to do so much when you can do your thinking on the paper.

Paper notes are also great for being able to get up and come back to a subject. You can get up at any point and come back with a save state of what you were doing, and how you got there.

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

#327

Earlier quoted context omitted.

I had unlimited energy till about 40 and then I hit some sort of cliff. This coincided with covid and being indoors using high velocity media like reddit/insta. I am not sure how much is age and how much is habits that caused this.

Easy enough to test, get off the high velocity media and do normal things like socialize / get out of the house (if you're aren't already) for 2-3 months and see if things change.

yes!! . I am in colorado for a 3 month work/ski trip hoping to ski 3 days/week. I don't use my phone on the slow ski lifts. Its amazing to be phone free for the whole day out in the mountains.

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

#328

40 has nothing to do with it. Every other day I see a Ask HN post from younger people bringing up depression, burnout, and apathy. Listen, there are 60 year olds that look like our long held image of a 60 year that can barely walk or do anything. And then there are 60 year olds that go to the gym everyday. How do you want to play this? I don’t accept your premise that 40 has anything to do with it. Being a miserable…

There's a lot of biology in the mix here to that must not be dismissed. But I like your take. Do everything reasonable to continue forward and maintain your body and mind. Just don't completly ignore your genetics and biology and be open that they might speak-up and have a say too.

I’m a “biological optimist” and think a lot of what we consider “bad” can be and often is at least somewhat adaptive. Even things like aging and death; there are ways to age and die adaptively to give room to the next generation, to allow societal renewal/avoid sclerosis, etc. My understanding is that aging is thought to be in part an evolutionary adaptation against cancer, and a kind of pattern of creative destruction we see all over the place in both nature and society. There are also maladaptive tragic ways to age without remembering/learning how to live in your context, and maladaptive things like premature aging, disease, etc.

All adaptation is contextual. This picture is probably familiar to a lot of people, and is a perfect illustration of what I’m talking about: https://www.boredpanda.com/athlete-body-types-comparison-how...

There is no universal “better”. At any age, in any environment, in any physical condition, there are contextually appropriate optimums, and always two categories of direction: 1) using whatever tools are at your disposal to adapt as much as you can while accepting (and testing) limitations 2) ignoring what tools you do and don’t have and either giving up or trying to get the world to adapt to you.

The first direction is always better.

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

#329

I'm 46, and while I do think my cognitive speed has declined a tiny bit, my abstract thinking has improved throughout life. The one change I have noticed though is that programming has become insanely complex during the 37 years I have been programming, but more especially during the last 10-15 years. It's at the point now where you can't even create a basic website, to modern standards, without spending months of wo…

Don't compare web development with "normal" software development. Writing code for the web is 10,000 layers of added complexity far above and beyond literally any other kind of programming. "Normal" programming involves writing code that will run on one specific thing with (usually) one specific use case using tools (and often whole languages) made for that purpose. Web programming involves writing code that will run…

I agree that web development is complex. I disagree that abstraction layers add complexity. Abstraction layers solve problems. If you don't have the problems that these abstraction layers solve, then you might perceive that as complex, but most people actually do experience these problems.

The web is not just for websites anymore, it's a universal platform for app distribution. This means web apps can instantly be made available to billions of users. You noticed that yourself. This brings all kinds of complexity that these layers solve. They absorb complexity, not add it. So I don't understand why you would say things have gotten "bad". Things were way worse, but individial contributors never noticed.

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

#330
My biggest pain point with programming is I am constantly rebuilding mental models of software projects.

I think its a problem with the way we write software. I think all code we write should be visualizable at different levels of granularity, and should be able to show data flowing through it inline. We have all these principles about writing good software such as it should be testable, performant, self-documenting...but I would argue the most important thing is that it should be visualizable! And easily debuggable.

---

I would suggest using a visual debugger and an IDE with static call hierarchy features (sometimes called find usages or find all references).

You should think about how you would build it from scratch. Then fit the existing API to your own mental model of how you would build it. Then it will be easier to understand why people did things a certain way. Many times I will see someone's code and wonder why they came up with such a complicated abstraction layer, but then when you build it yourself you see how it comes very naturally. The problem is for most projects you are looking at the end result of someone else's journey of building from scratch and refactoring along the way as needed.

Post reply on HN