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

Show all comments

Showing thread 2 of 299

pentaphobe2 replies#
I've experienced this periodically since my early 20's - generally in hindsight I realise it was: real life getting in the way, burnout, lack of interest (I was interested in the idea, but on some fundamental level - not the activity) - also occasionally just a feeling of Groundhog Day (ie. Some code tasks can just feel a little too familiar - even if novel, and that saps my joy)

Either way, at the time it was quite worrying - even disturbing - especially when there was work to be done, so think I can relate
Generally I was able to reverse it by working on something which really stimulated me - even hacking away on some goofy personal project after hours - and that kind of bootstrapped me back into a place where I could easily attain flow for "harder" tasks. Can't recommend that highly enough, that and realising that I had different stimulus needs to previously - changing up my coding music, or even foregoing it and switching to mynoise.net yielded some excellent results, or reducing distractions (try periodically disabling system notifications)
That said, if you're really concerned probably see a doc just to rule out any funny business
Ps. Best of luck with it, crossing fingers for you

Buttons8408 replies#
Thank you. Good advice about hacking on some personal projects/experiments. I'm worried that wont rebuild my confidence and abilities fast enough though. I want to make progress on this task today, not next week. Other developers seem to be succeeding, and I'm worried about how I'll look if it takes me weeks do to what others are doing in hours. (This isn't meant to dismiss your advice, to but to give feedback and solicit even more advice.)
matwood2 replies#
In addition to the GP, I'll add there's a certain level of naïveté of being young that makes one feel like they were better than they were. I'm mid-40s and am probably the best I've ever been at writing good code, but sometimes I can get vapor locked knowing all the things I need to account to for. When I was younger I just coded because I didn't know any better.

So when I get stuck now, I just start writing code like I would have when I was early 20s.

linuxftw1 reply#
Not in my mid-40s yet, but vapor lock is a great term. I also try to do the same, just write crufty code that works, hopefully clean it up some as I go.

Continue this thread — 1 reply

bradstewart#
This. I feel this basically every day now. I really miss the naivete, and I struggle mightily to "just start writing code like I would have".
BlueTemplar#
That is just unrealistic ?

Some days you just feel down and are barely able to function, others you have seemingly unlimited energy, and this can come from a whole host of factors : how did you sleep, what did you eat, what is the weather, how is your personal life going...
And of course things get worse as you age (with quite a lot of variation and personal responsibility in staying healthy).

josephg#
> I'm worried that wont rebuild my confidence and abilities fast enough though. I want to make progress on this task today, not next week.

I’ve experienced this a bunch of times too. I’m sorry to say this, but burnout for me never goes away on a convenient schedule. The more I make myself wrong for feeling overwhelmed, distracted and unmotivated, the worse it gets. Or in other terms, problems are rarely solved with the same thinking that created them.
For me, I have to really give myself permission to step back, take stock of myself, get some sleep and good food and often take a break from “work” programming tasks for a few weeks. (And I know exactly how inconvenient that last part is).
The more I push myself to feel better already, the longer it takes.

eternalban#
I second GP's recommendations. You stopped working out. Muscles atrophied. A bit more sweat time and you'll be buff again.

"even more advice": Issue is likely mental focus (since you have a finite daily mental, emotional stress budget)
https://www.goodtherapy.org/blog/breaking-the-chains-finding...
- (let go of) mental re(re)view. "This too shall pass".
+ (embrace) "just do it" && "Don't worry, be happy".
! (remember) chemical dependencies, if any, must be brought under control.

htk#
Your mind will eventually be back at peak performance, but meanwhile you can use pen & paper to help you with this.

Write down what are the big challenges/problems, try to break them down and write about it, keep dividing it until you start to see that you can tackle the indidual pieces.
I'm 42 and I've been in a mental place similar to yours, but a little more drastic due to a hard time in my life, and it took a while to get back into top shape, but the effort to break down my problems on paper helped me tackle some immediate tasks I had to accomplish.

yetihehe#
> Other developers seem to be succeeding, and I'm worried about how I'll look if it takes me weeks do to what others are doing in hours.

That one exact thought is compounding your problem. It's pure anxiety and it makes problem worse, I know from experience. When you think that, try to calm yourself with "yeah, it's just anxiety speaking, it will be fine". Maybe also try magnesium supplements, magnesium citrate helps me (but it typically takes up to a week of supplementation, minimum 2 days).

pentaphobe#
Often the "hack on something personal" just flicks a switch for me, I'm talking within an hour or two - but sounds like you're feeling a bigger sense of urgency than even that would help.

.. which honestly sounds an awful lot like the stress of the situation (or concern about cognitive decline) - which isn't going to do your focus any favours!
Any kind of reset can help with that: go for a short walk, chuck some binaural beats on headphones and close your eyes for 5 mins, drink a warm (non-caffeinated) beverage and think about something else.
Above all else: probably good to just remember everyone has off days, other engineers aren't going to judge you for a day of lower productivity
Aside from reducing your internal stress, One key ingredient of finding "flow" is a sense of immediate feedback, perhaps allocate 20 mins to some short tasks which give rapid reward; write a couple tests, draw a diagram, etc..
Binaural beats (use "relaxed"): https://mynoise.net/NoiseMachines/binauralBrainwaveGenerator...
Going for a walk is kind of a lightweight "shower effect", random article link: https://buffer.com/resources/shower-thoughts-science-of-crea...
(Sorry, time zone mismatch slowed my response)
Link dump (for reading some other time)
- stress and brain function: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC6504531/ - flow state https://en.wikipedia.org/wiki/Flow_(psychology)

throwaway292939#
I don't think there is anything sustainable that will work this fast.

Good habits and lifestyle changes take time.
The only other option that has worked for me would be drugs like Adderall.

amelius3 replies#
It could also be attention span problems caused by social media.
hutzlibu1 reply#
This is totally killing every focus there is for me. My IQ drops to at least 50% when there is a smartphone close by. Eliminating all source of distraction that I can, is essential to get anything done.
denton-scratch#
Smartphones don't just reduce your IQ; if you use one while walking, it removes all your situational awareness. I constantly have to step out of the way of some zombie walking along the footway, oblivious to the existence of other pedestrians.

My smartphone stays at home, on permanent charge (the battery life is severely depleted). I use it only to collect SMS 2FA codes from those organizations that assume that everyone has a smartphone. We call them "mobile phones", but that doesn't mean you have to move if you're using one.
That zombie effect applies equally if you're behind the wheel of a vehicle. Please don't ever do that. Of all tasks, driving is the task that requires the greatest situational awareness.

P_I_Staker#
Or ADHD
sph#
And technology in general. There is a video by HealthyGamerGG that explains how using smartphones or computers turns off a crucial part of the brain that knows what is important and you should focus on.

The longer you're in front of a screen, the more you lose awareness of yourself and what you enjoy. Taking frequent breaks away from screens is important to stay motivated and restore that drive towards meaningful things.
It's sounds wishy-washy how I explained it here, but the video has a more scientific explanation of this phenomenon.
https://youtu.be/zBgCRJluWTc