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
wistlo#
You are 63% of my age (there's a coincidence there, do the math).

A point I haven't yet seen in the comments: how much the advancement of civilization owes to 20-30 somethings. Take The Beatles, Alexander Hamiliton, even Anthony Fauci (who had the rare reprise late in life) as examples. At around 40 I gave up any illusion I might do something illustrious, and accepted that from then on, I would just work for a living. My best work became my children, and I'm happy to have done that.
Many of the other comments line up with my own observations at this sage old age:
* more distractions (my house seems to be aging much faster than me, and taking up much more time to maintain)
* bigger responsibilities (more savings to manage with less time until retirement to fix investment errors, offspring where simple existential needs like food and diapers have been replaced by tuition, aging in-laws with real decline issues like eyesight and bad joints)
* less energy. true, and most especially I can't skip sleep like I could 20 or 40 years ago.
* burnout ( this stuff does get old, and "boring" as noted by one commenter)
* underestimating the value of my experience. Not writing that really clever code when a simpler solution will suffice, for example. The ability to tell people a realistic estimate of work, not my old optimistic "couple of days" estimate that was almost always 10x short
* ADD, not helped by social media (stay off it when working, or always) and a trying to ignore the constant stream of news (except HN of course lol). But a great help in being open to new methods where I find myself evangelizing about git to people half my age.
* exercise, fitness, diet: need to up my game after covid isolation and increasingly creakey joints. It does make a difference. In my case living in The Big Easy doesn't help.
* Did I mention sleep? Why yes I did, forgive my forgetfulness....no, actually I put it here intentionally because it is that important. Exercise helps with getting quality sleep.
I am still writing code and I "provide value" (their words) in that I can solve complex data analysis problems that come to me after co-workers reach the limits of using vlookups and pivot tables in Excel. I'm not the fastest and I'm always fighting imposter syndrome, but that's quashed whenever I catch a glimpse of production code written by pricey consultants and realize they make the same mistakes and use truly ugly workarounds even I wouldn't consider.

DamnYuppie#
So I experienced this as well at that age. I would recommend looking at your sleep and diet patterns. After that look into Testosterone Replacement Therapy, this was life changing for me in my 40’s.
krisgenre#
IMHO think its possible that you are disinterested in the task. I am at about the same age and have been increasingly finding it difficult to concentrate on tasks that don't help me learn much.
irrational#
I’m 50 and I feel in better cognitive shape now than ever. I’m wondering if there is something else going on with you than old age cognitive decline. Maybe you should check with your doctor?

Load more comments