Lurker News
I'm around 40 and recently I have been asked to port an API from one language to another. The code I'm porting is average code, not terrible, but plenty of little things to complain about.

I feel like my past self could have handled this task, but I am really struggling. Porting this API will require a deep understanding of the existing API, which, of course, has several layers of abstraction.
I can't seem to hold more than about 2 levels of call stack in my head. There's the entry point function which calls other functions, which call other functions, which call other functions, etc. 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 don't know how to break this into small enough chunks that I can understand it or make progress on. Imagine I gave you the code for the sha512 algorithm, and a hash, and asked you to find the pre-image (the input). This is how I feel. Where do I even get started? How do I find even a single chunk of manageable work to break off.
The hard part is, several other developers are making progress on porting this API. Why can't I? What happened?
I don't know if this task is just an especially bad fit for me, or if my mental abilities are declining?

Comments (510) 299 threads

Earlier comments
vando#
I discovered that if someone tries to do something that has abstractions and multiple branches (not in a Git way) and tries to put everything in his head -- will be fail. So my solution for that cases is: take notes, create flow diagrams, mindmaps, anything you feel good with and you'll see it clarify.

Of course some tasks are bored and we don't want to do so we loose focus that doesn't mean mental ability.

rendall#
I read a study that programming skill improves with age. And another that cognitive decline doesn't really happen until the late 60s if then.

You might have some decline in motivation due to other reasons, not least anxiety about aging!
If your colleagues who are enthusiastically porting that API were the same age as you, you would attribute your lack of focus to something else. There is no reason to latch onto age as the explanation.

senthil_rajasek#
"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 started using paper notebook/pencil to go down function call trees.
It helped me immensely.
I am in my late 40s and as another commenter mentioned this could be because we have more responsibilities and not necessarily cognitive decline.

semeliussemper#
How's your diet? Do you take any supplements? Do you have stressful things going on in your life? Are you bored with your job? Maybe your brain doesnt want to do it anymore. Diversify your activities? Do something with your hands, paint, sculpt, woodworking? Something very different. I went back to college to study programming when I was 40. I don't think it's age related.

Load more comments