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
aidenn01 reply#
I'm 42 and I forgot my bitwarden passphrase. About 20 hours later I remembered it.

I just sat down and was typing a much older passphrase despite having used the current one daily for over a year. That was probably the scariest part is that I remember the past few weeks as if I were using a different passphrase than I actually was (down to having typos on my phone that are impossible with my actual passphrase)

sixtram#
Just a tip, but print out your password, put it into an envelope, close it, and store it at your family or bank or somewhere. I do this for my 1password and google account in case something happens to me, but can also be useful if your memory fails you
fnordpiglet#
There’s not enough context of you here. Our ability to think clearly is predicated on a lot of stuff, almost all of it psychological and lifestyle but some health and genetics.

Are you depressed? are you burning out? Are you eating well? Are you exercising? Are you disengaged? Are you socially engaged? Are you anxious?
You need to step back from the tasks you’re finding difficult and look at yourself not as a programming machine but as a biological entity with a complex giant dna mutation brain that can easily get thrown off track due to any number of factors. Most likely unless you’re developing some sort of early onset brain disease you are depressed, anxious, burning out, or simply aren’t interested in what you’re doing. By 40 things get complex because the newness of “OMG IM AN ADULT” wears off and just simply working isn’t enough, especially in a task that requires “flow” of intentful mindful engagement.
I suspect you need to step back for a bit and look inside yourself very critically and examine what’s going on. To me it sounds like probably a mixture of all of the above, leading to a growing burnout. My suggestion that worked for my burnout is take up a rigorous practice of vipassana meditation, regular exercise, managed diet, and rigorously constraining work focus to when it’s appropriate and otherwise entirely letting go of the pressure to perform. Then when working not engaging in second guessing your output - we have ups and downs, the important part is enjoying the process of programming. But YMMV, I would start with taking those questions above and asking the people closest to you them and take their answers seriously, see a doctor and explain your challenge, and see a psychologist and explain your challenge, and spend time seeing yourself for who you are not who you think you are.
Good luck!

rr888#
I think too that younger developers are more enthusiastic and naive, they just go in and do the work. Experienced people can see more complex cases, more failure conditions, more future paths and end up making the task more complicated than it could be. On top of this its probably not as interesting if you've done this a few times before so adds up to a good place to procrastinate.
kvathupo#
A technique I found useful as a relatively younger person (early 20s) is to keep a text doc to enumerate work priorities, to record progress, and to record where I left off. I found the last point most salient: whenever I faced an interruption (a colleague question, meeting, etc.), I got in the habit of quickly writing where I left off; that is, lowering the friction in task-switching.

Here's a verbatim example from my notes that I think is similar to your use-case:
```
* Clones `std::vector modules_` member variable, defined in `./torch/csrc/api/include/torch/nn/modules/container/any.h`. Its `clone()` method calls the `clone_module()` function of its member variable `std::unique_ptr content_`. `AnyModulePlaceholder` is defined in `any_module_holder.h`. Its `clone_module()` method calls `clone()` on its `std::shared_ptr module` member variable. `ModuleType` is some module that has a `forward()` method, i.e. an object of type `Module`. __But,__ it should probably also have `Cloneable`.
```

Load more comments