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
brian_cunnie#
I agree: I'm 58, and I'm not as sharp as the twenty-year-olds, thirty-year-olds, and even forty-year-olds that I pair-program with. To be more specific, the younger developers seem to have a certain mental elasticity that is now beyond me: they can store more in their short-term memory, and they grok code faster than I do.

My brother, who's 18 months my junior and a developer like me, shares the same sentiment: "It's like I used to have 20 registers, and now I'm down to 12".
It's comforting to believe that age hasn't diminished us, but working directly with my juniors has disabused me of that notion.
I feel that Tennyson put it best when he said, "Though we are not now the strength which in old days moved earth and heaven, that which we are, we are."

alfonsodev1 reply#
> 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.

Couple of solutions:
- Wider screen (I use 50' oled), and the VS Code pin feature, you basically order the tabs to follow the code.
- Note taking support by using nested bullet points, a.k.a outliners, it could be a simple markdown file, Notion, Roam Research, Obsidian ... Then you write what calls what for what reason, and make it kind of nested story.
- Favourite panel in VS Code, rather than seeing the whole tree of files, you can favourite the same files you are pinning, to come back later on, you can have favourite groups by feature if IRC, this might be an extension and not built in.
On the health side, disclaimer: I'm not a Physician!:
- Do you have old injuries that hurt? I'm using my injuries to know when my diet is causing inflammation, I try eating in different ways until the pain goes away, I bet it affects cognitive performance too.
- Mentally having "too many windows open" like the computer decreases our performance, this is worries, fears, stress. Try to unburden those by talking to someone, or find what other healthy needs your are ignoring, like walking, moving, exercise, contact with nature, playing music, doing something creative, laughing ... sometimes we become one dimensional and that's not good for us.
A way to test if you have lost ability or is just crappy code that does not motivate you to follow, is to talk to someone that speaks a lot with side stories, and then see if you can follow all the branches of the conversation and help them coming back to the original branch, if you are able to do so, might give you more confidence. This of course requires to be present, really listening, which is a skill in itself.
And the last advice, would be to implement some kind of meditative practice, and walk long distances while you listen to Andrew Huberman podcast.

simmo9000#
Good call! Better tools make a job easier. Improve your work environment.

Look at your IDE, desktop, editor, OS, monitor, chair, etc. and see how you could improve it with new options. Tech or otherwise...
Is your desk a space of zen? Got a plant on your desk?

foxyv#
I often notice that people rarely remember properly the capabilities of themselves 5 years ago, much less 20. We often think we were better or worse than we actually were. Sometimes I think, oh boy am I rusty today, then I look at my old stuff and realize that I'm so far beyond that it's sad.

To me, it sounds like you are placing too high an expectation on your own cognitive ability, and not spending enough time sleeping. Any project that requires someone to do 4D chess in their heads to complete it is too complicated and no one will be able to maintain it. Start writing stuff down and making diagrams until the design is easier to understand. You are trying to build a city in your head without creating a plan.
Even a back of the napkin drawing can be enough really. Sometimes flaws become obvious when we do this. The value of older developers is they have the patience to do stuff like this, while all the young'uns go winging off on wild projects that they have to re-write in a month.

jesuscript1 reply#
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 fuck is age-agnostic. Trust me, I’m a professional malcontent.

kardianos3 replies#
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.

jesuscript#
I mean we have good evidence that athleticism at the competitive level has a drop off at a certain age, and even that is mostly only a factor at elite levels. There’s nothing stopping you from being a great basketball player in casual terms at any age.

But cognition constantly being under ageist assault has little to no basis when you consider so many knowledge driven professions employ people well past middle age (academia, doctor, lawyers, scientists, writers, artists). They also do their best work much later in life.

Aeolun1 reply#
> Just don't completly ignore your genetics and biology and be open that they might speak-up and have a say too.

They may have a say, but ultimately you can only try to deal with the cards you’ve been dealt. At least I wouldn’t just accept that I’m genetically predisposed to misery with no way out.

bqmjjx0kac2 replies#
Just be mindful that the flip side of this perspective is to blame sick people for their condition.

Continue this thread — 2 replies

didericis#
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.

Load more comments