Ask HN: Programming is mentally overwhelming to me now. What to do?

103 points by tboyd47 ↗ HN
When I was 23, I used to be totally comfortable cranking out Javascript UIs like there was no tomorrow. These days I'm approaching 33 and I can barely force myself to look at code for more than 20 seconds without mentally panicking.

I don't know how I got here. I think it's a combination of many things, such as 1) a demanding family life 2) web development getting more complex in general 3) more stressful work environment 4) physical discomfort like RSI getting worse 5) just getting older & brain getting foggier.

I don't think learning in my off hours is an option because my day job is so mentally draining. It takes all of my brainpower just to work from 9 to 5, and then I have nothing left over after that.

I am talking to my manager about reducing my responsibilities but really I've been feeling this way for over a year, just trying to hang in there. But it's only getting worse as the months go by.

105 comments

[ 0.28 ms ] story [ 43.1 ms ] thread
There's not much you can do about a demanding family life (unless you want to prioritize work over it, which I wouldn't recommend) and getting older. Your options are limited for a stressful work environment, but you could try to negotiate some changes to improve that situation.

Learning on off hours seems to be where you have the most leeway. Depending on when you were 23, you may have started web development before its transformation into its current state of an unfathomably complex abomination. If that's the case, I would argue that you got your start in greener pastures, but those times have since passed. You will have to buckle down and learn as much of the "new way" as you can stomach each sitting. Compile a (what will likely be an absurdly long) list of every tool that you're currently using or will be using soon and try to build a working understanding of it. Your best hope is to learn everything you can in a big push and hope that your employer doesn't do the flavor-of-the-month bullshit.

This looks like terrible advice. It is defeatist (you can't do anything about most of your situation - false, as other comments have pointed out) and where it does offer some suggestion, it is to do stuff that the OP has already ruled out and which will obviously contribute to the OP getting even more stressed. And it feels like unrealistic advice too... you can't "learn everything", or anywhere near everything, of any deep topic like web development. Just thinking about trying to do that seems likely to be panic inducing to anyone who has any notion of how big a field that is.

I would recommend reading the many other helpful posts here for ideas of better advice to offer someone in this situation. This ain't it, imho.

There's a difference between defeatism and and realism.

A demanding family life can't really change in a way that's any less than serious and far-reaching; any recommendation in this department is hugely personal and runs deep.

A stressful working environment is something that can be fixed, but requires negotiating more accommodating conditions; this is neither quick nor reliable in many cases. In an extreme case, the OP could look for a place of work that has a more fitting pace/culture, but this is an entirely non-trivial change.

RSI is a medical circumstance that no wishful thinking can change (short of best practice to avoid it). The same goes for aging and passage of time.

Can the OP make these entirely non-trivial, life-changing decisions and achieve a significant improvement? Of course, and I'd encourage him to do so, but that's personal beyond what many of us are able to help him with. Can the OP treat the symptoms of a lifestyle/occupation that puts him under extreme stress? Sure, but that's not actually fixing the underlying issue, and patchwork solutions may not hold.

Of the underlying causes he mentioned, there's one he can address without having to go all in; keeping up the best he can with his field of work and how it is changing. Everything about web development has changed, and it's entirely understandable that he feels out of his element when his job has become absurdly complex almost overnight. That type of environment can make you feel like a dullard, a slow learner, or even an imposter who is holding a position under a false pretense. The way to beat that feeling is to prove to yourself that it isn't true.

Sounds like you have a lot going on and each issue may be contributing to it. Keep trying to work on changing one at a time, and see if anything helps.

If you aren't mentally or physically prepared to put in a full day of work, you are starting out on the wrong foot. Here are some things I would think about:

- Is it time to make a change? A new job, new problem to solve, new team and new culture might be more aligned with your success.

- Is coaching available? A mentor / coach can help change your perspective, hold you accountable to execute on a plan or just provide a sounding board; all of which could be useful.

- Setting micro goals. Wins of any kind build a sense of accomplishment and momentum. Can you establish small goals, which beget small victories, which can be used to change your mentality, situation, productivity, etc.

I caution people that are approaching 'f^ck it' with work to hold on. If you aren't in a financial position to walk away, especially if you don't have a next opportunity lined up, an emotional rage quit feels good for a second and can set you up for a world of pain (additional pain). It's 10x harder to get a job when you don't have one, even if you are a developer.

Good luck and I hope things turn around.

It sounds to me like you're burnt out. I think it might be helpful (if possible) to take a break completely for yourself, in a new environment - even if it's 3-7 days. No work, no family, just a place for you to relax and think. If coding isn't something that you feel ready to do anymore, perhaps you can move into a more management/biz oriented role?

As for the increasing difficulty of webdev - it's worth considering how necessary some tools are to the project. Oftentimes things can be simplified. It would take research, but maybe if you wrote a well thought-out and documented assessment of how you can simplify, your company might consider it? Good luck

First see a medical doctor and rule out an physical / medical problems. Once you rule that out then see a therapist. Talk it out with a professional.

I don't know how old you are but getting foggy due to age should not happen till late in life if your health is good.

Stress can make you sick. Please get help.

"First see a medical doctor and rule out an physical / medical problems. Once you rule that out then see a therapist. Talk it out with a professional." – this.

Reasons: (1) If there's an organic cause, it may be symptomatic of something else; it may be amenable to medical treatment; and whether or not either of these are true, you'll know whose experiences and advice are more likely relevant to you. (2) At least part of your issue (the panic) sounds amenable to behavioral treatment, whether or not there's any other issues going on. (And if it's not – if there's an organic cause for that too – that's worth knowing.)

You might have to iterate through several doctors and several therapists to find one who's effective.

In parallel with this, you might want to explore whether you can work on a different schedule. I've rarely managed to do six hours of work within a 9am-5pm slot, but I can get 12-14 hours of work done a day if I get to choose the hours – align them with my energy level, take actual breaks when I flag, feel a sense of ownership and autonomy.

what kind of shape are you in? How is your diet?

Perhaps getting some daily exercise and ratcheting down your diet might help.

It's good that you're talking about this. That's the first step towards making things better.

Just one more stranger's opinion: These things tend to feed on themselves. (Stress makes it hard to focus, which is in and of itself stressful...) Also, I've heard that stress-related chemicals like cortisol stay in your body and make it more likely that future situations will trigger stress. If that's true, you could really benefit if you find some way to break the cycle. I've heard vigorous exercise is supposed to help (though possibly just because it improves your sleep).

I'm sorry to hear about your RSI. I don't want to sound glib, but is there any way you can take another look at it? You've probably investigated all the possible work setups and all the medical options, but I can see that contributing to the mental overwhelm.

Not sure what exactly you mean by "demanding family life," but I had a friend who told me his life got better when he started trying to say"no" to his family a little more often -- both immediate family and other family members. His thought was it's better for them and him if he's not there feeling overloaded, and then going through the rest of the week also overloaded. (My suggestion to him was to hire a cleaning woman or a baby-sitter or someone to lighten the load wherever he could.)

Finally, could you think about changing jobs? (And then make sure you take some time off between the last job and the new one.) It sounds like you feel comfortable talking to your manager about reducing responsibilities, so maybe your employer isn't the problem. Just tossing this out there because you have ways to change the situations and choices you can make. Sometimes knowing that's there eases some of the angst.

If all else fails, maybe grab a little downtime anyways. Taking a break is sometimes more productive than putting extra pressure on yourself when your brain isn't where it usually is -- since the pressure doesn't really resolve the situation. (I've gambled on the idea that I'll come back more productive after time off -- and it's actually worked more than a couple times.)

Thanks for the kind words.

RSI is the elephant in the room, I'm afraid. I actually have constructed my own coding chair out of couch cushions and PVC pipes (inspired by a kind stranger's reply to another HN post of mine!), but it only makes the pain bearable. It doesn't resolve it. Nothing resolves it - I've tried everything.

Downtime is always welcome but it doesn't make things better when I come back to work.

When I was three-and-twenty

I heard a wise man say,

"Put in your forty hours,

Don't give your soul away.

Hack the Python and the Ruby,

But keep your fancy free."

But I was twenty three

No use to talk to me.

.

When I was three-and-twenty

I heard him say again,

"The nodes out of the DOM

never do yield without pain.

'Tis paid with frameworks plenty,

Till your face turns blue."

And I am four-and-twenty,

And oh, 'tis true, 'tis true.

Jesus! Nicely done.
This made me chuckle. Thank you!
Before you do anything else, if you haven't already, I'd advice you to see your physician and explain your situation - at the very least have a basic set of blood tests done. Vitamin B or D deficiencies, for instance, can both adversely affect concentration.

If that's already covered, is taking an extended break a possibility? I was having similar difficulties, and I'm much more productive again after a 2 month absence.

Good luck and best wishes.

I would usually attribute this to burnout, but there might be other factors at work. I was exhausted on and off for three years, had many days off and would eventually get to the point of not being able to complete my work. I thought it might've been sleep apnoea or chronic fatigue. Eventually at the end of last year it got to the point where I could barely work at all, and I knew it wasn't burnout (been there, done that, don't stress about fuck all now).

I ended up being diagnosed with cancer, and after a bout of chemoradiation, it disappeared completely (as far as scans can tell). Let me tell you, the difference in energy was nothing short of amazing.

I'm really not trying to frighten you, but I was lucky that it wasn't aggressive and got caught relatively early. Chances are it's not, but it could just as easily be another medical condition and it's worth seeing a doctor. There might be indications of things in bloodwork or other measurements, so be patient but firm with your doctor if they tell you to just "forget about it".

I second seeing a doctor as digestive diseases for example result in vastly reduced energy levels. EX: "Albumin levels low" = your starving even if your eating plenty of food.

But, I would also add getting even modest regular exercise can make a massive difference. Even just 1 hour a week split over 3-4 days can also dramatically change mood and energy levels.

Exactly, it could be so many things. Even if results come back inconclusive, it doesn't mean something's not going on.

On that note, I could be totally off and the OP might just be regular old stressed, but there's no way anybody can really tell from this post. Everyone will project their worst experiences onto it.

I very strongly second the suggestion of exercise.

Exercise (especially bodyweight exercise, which you can do pretty much anywhere, without any equipment) can be a sort of free, always available destress button. Whenever I get really stressed these days, I have the option of just putting a lot of the wound-up, stressed-out energy in to some exercise (like pushups) and it's amazingly effective.

I've never really realized until recently just how much of this mental stress I've been experiencing my whole life was so intimately connected with my body and how much physical things such as diet and exercise can affect it.

Thyroid could be more likely than cancer (less critical to catch immediately, of course).
As I said in another comment, it could be anything, I was just using my experience as an example that sometimes it's not necessarily burnout, but an actual physical issue. Burnout is such a common problem with programmers that we just naturally assume that's the issue without regard for other medical factors.
A bit off topic, but I would be curious to hear about the process in which your doctor(s) diagnosed your cancer. Mostly because I would not think to attribute fatigue as a common symptom of cancer.
It wasn't the fatigue. I had rectal cancer, was bleeding out of my rectum after drinking too much (first 8 months of last year I stopped drinking because I thought that might've been the issue). I didn't think much of it until the end of the year after a bender and bleeding profusely for 3/4 of the day. Went in and had a colonoscopy a month later, and was then diagnosed.

However, I didn't have those symptoms until the cancer was Stage 3, and I was lucky it was rectal. If it was up further in my bowel, obvious symptoms may have appeared too late (and I'm 36, so too young to be considered for regular colonoscopies).

However, it should be noted that fatigue is a common side effect of many cancers, and shouldn't be ignored if you've been fatigued for a while.

Thanks for this. I am going to go see a doctor. The more I think about it, the more I realize it might actually be a medical issue. It's not just coding. Yesterday I had the same reaction just listening to a voicemail prompt. Any set of rules or procedures that requires even a little bit of focus sends my mind reeling. It feels as if I've somehow lost the part of my brain that is "smart."
Try somehow to figure out or negotiate a more comfortable situation in your current job (more remote working? non paid leave couple of weeks? educational leave? standing workspace? better chair?). Watch out for advises to change the job - ending up in professional void in this state, it might be very difficult to recover and go back into job market. One thing - time with the closest family (partner, children, parents) is never wasted.
- you're likely better at KISS than most. - 90% of web development is repetitious. if you weren't stressed you can do it. - cut down work hours - stay happy. you're not sick. your family is not sick. - learn to play an instrument. seriously, this is a great way to enhance mental performance. - everyone feels the same to a degree.
Hey, this probably isn't good long term advice, but sugar and coffee work wonders for kick starting my brain on foggy days. If you're just looking to get through the day, maybe pick up some gummy bears and a small coffee.

This link was posted on HN recently, http://gettingthingsdone.com/fivesteps/ . I recommend following this practice at work, it will reduce your mental panics by getting all these thoughts out of your head and onto paper so you aren't "holding" on to them. You don't need to do the five steps, but writing stuff down really helps.

Also, physical discomfort can sometimes manifest in different ways. I know this sounds dumb, but try going to the bathroom more often. I had a therapist tell me this and it worked. I was subconsciously holding my bladder all the time because I felt that I needed to get other stuff done before I could excuse myself.

RSI can be helped with an ergonomic keyboard and mouse. Those were big game changers for me. I also stopped using my laptop for long term tasks. The monitor is too low and you end up cranking your neck and back to see what's on the screen.

The danger with sugar and coffee is they just give a temporary hit followed by a crash. Not good if you have an 8 hr day ahead.

Drinking lots of water (which forces lots of toilet breaks to happen) might help more.

I was there myself. It turned out to be undiagnosed sleep apnea. I agree with everyone here who says to see a doctor as one of the first things you do.
Well, work conditions are worsening everywhere. Stress it our daily bread now. Stress == non alignment between responsibilities and authorities, like a dieselgate software engineer being ordered to make it, but s/he will end up the only one in court.

Short anwser, - realign your sense of responsibility with your authority. - ask for better work conditions, including time for your family life.

This is calling since it is a global problem for a global solution.

I know I will be downvoted for this (HN censors anything going in this direction), but as I cared: it is calling for a union of software developers.

We all genuinely suffer what you describe and I don't think we worsen. I do think these are our work conditions, and alone we are f*cked.

Your family matters You matter Yes work organization in IT is FUBAR and manager don't take responsibility but they have no incentive to respect you more than the shareholders.

Now, you can burn out like a slave or fight for your self.

>Well, work conditions are worsening everywhere. Stress it our daily bread now. Stress == non alignment between responsibilities and authorities, like a dieselgate software engineer being ordered to make it, but s/he will end up the only one in court.

I was looking for this kind of statement and thank goodness I found it. I was starting to think it was just me and my angry, cynical and jaded colleagues bitching more as we get older.

Reading your statement, I am starting to digest the simple fact that our profession has gone to the dogs. There are fewer and fewer employers that understand what we do is part craft, part art, part engineering. We DO need a union. We need SOMETHING.

Here's what I am finding: the misalignment of authority and responsibility lead to being forced to do shitty work in place of long-term solid development. This then sets us up for blame when the technical debt mounts. Then WE are the ones struggling to deal with the eventual REAL outcome that leads to a boat-load of stress.

edit: While typing this reply, my friend/colleague texted me to say he is experiencing nausea and anxiety DAILY now. I know of several developers on anti-anxiety meds that they began taking within the past two years due to work stress.

How would we go about doing that? I would definitely love to form some type of programmer's union, if not to bargain collectively, at least to just share resources and be involved in setting industry wide standards.
defining what the job is.

If we are legally liable, than we must have full power on any decision that can lead us to jail.

We have to be able to justify the stuff we do.

remember we have 200 dependencies not because we love it but because we are forced into them. Yet when an incident occurs in production because of these dependencies we are sacked/sued held responsible for it.

Why we have 200 dependencies in the first place?

Because someone who never coded is hired to tell us what to do (a marketer, an «architect», a urbanist, a CTO that never coded) tell us to add these dependencies and they are not LIABLE.

But when it fails, it is our responsibility our liability. And we are thrown like kleenex. As hell if I do agree to be blamed for something I do oppose.

Yes there is this new generation of ninja rockstar coders, but I am fucking boring coder: I don't want company to sink because I cannot afford it, I want a paycheck to feed my own, I want to come back every night to see my family, and I know why I want to be conservative: because it is proven to work.

Having a profession is :

- having responsibility that fits your authority; - being paid for every hours spent to produce, including commuting for your work; - having hygienic work conditions that wont harm you (fuck crunches, open-spaces, poor chairs/lighting); - having standards in cleaning (yes cleaning is important, stuff like nice PR, documentations...); - LIABILITY we have to accept we are liable for things in exchange for authority; - ETHIC, we must have the right to refuse to code programs that in our knowledge opposes the common laws (like privacy, embezzlement, fiscal fraud, consumers rights to be informed...); - the respect of IP laws, I am bored of seeing people STEAL free/open source software and claim it is theirs, it we take part in doing so we are negating the value our very own work... - having our name granted to a creation we made...

And to make is worse, I propose that being a coder should not be related to a diploma but an apprenticeship.

I see no justifications, no evidence sustaining the idea diploma worth a bit in IT so let's drop this shit. There is a S in CS standing for Science. A corporation should help either take part in better education in university or supervise a meaningful apprenticeship based on metrics not wishful thinking.

I agree with all your points here but I was asking more about practical steps rather than ideology.
Well good news, a profession is about agreeing on a minimum platform, and this is either called ideology to harm it or a "manifesto" to make it look sensible, so I beg you humbly to call it a manifesto.

Then, I think every laws are local.

It thus mean to open local unions based on the immutability of laws that grant you power.

Than it is a classic of union: mutualize (crowfund as it is called nowadays) the costs any legal dispute than can be won on any of these points of agreement.

Each and every country have their preferred form of legal structure that helps doing so.

But thanks to the power of "global internet communication" and international convention (Bern/Geneva) regarding IP law some topics can be mutualized internationally.

It is all about creating local sections and more global chapters. So, I would strongly recommend starting it in your own neighborhood using logical synergies with other confluent interest such as "consumer unions" (like EFF) and legal expertise, public schools.

You create a section, ask money to fund lawsuit, make your adherents choose the lawsuit they agree to pick, and go head on with corporations that pick on coders. Eventually funding strikes.

then you can do PR, go to public school tell the truth about the work market (no lies), help legal system have a fair access to information, take part in benevolent action profiting your local community...

done that, been there, it is a all lot of sweat and tears. but it works.

This is awesome. I'm seriously considering doing something like this where I live. Thanks!
Oh, and people need to know they are not alone. Meetup to speak.

People don't need an union if they are happy with the situation.

But they may need first to share their concern in a place where confidentiality is granted (because we all have loyalty penalties made especially to block the possibility of sharing information). You might need a lawyer advice on how to make people able to share their mind freely.

People suffer, but they cannot talk met googlers and facebookers they were looking like citizens of former soviet countries fearing the snitches.

You will probably want a low tech organization to ensure a strong privacy of the meetups (word to mouth).

You may want people to sign anti-snitch agreement (that blocks leaks).

You will want to make all your possible to protect the confidentiality of the attendant of the meeting in early stages.

Sounds like you need balance, my friend. If you have a job that is brain draining, best not to spend lots of time on a hobby that uses loads of extra brain power. Perhaps try spending time doing something physical or meditating instead of adding more mental stress to your day. When your time frees up in the future, you'll be easily able to pick up where you left off with coding.
Quick question: Did you have an experience, while coding, that you considered traumatic or negative? Laid-off? Not paid for contract work? Fight with a coworker?
I have the same sympton since I had 2 to 3 not paid contract. I'm feeling so shitty, I lost any hope. I feel my brain can't think little it was when I was young (i'm also 34). It's hard to lost all hope at this point of my life, I can't switch back
(comment deleted)
Sorry to hear about this. Some suggestions: take regular mental and physical breaks if possible at work. A 10 minute break to go for a quick walk can make a big difference. Do this at least once in the morning and afternoon (set a reminder). Get some exercise at lunchtime also if possible. This might help with the brain fog and stress. Consider transitioning out of fast-changing front-end web dev to something slower-paced. For example, can you contribute to the business logic or SQL/database? The technology there tends to be more stable. You should try to address the RSI, are there accommodations that your employer can help with? Consider changing employers to find a less stressful work environment and/or cut down on commute time if that's an issue. For the demanding family life, if you have a spouse tell them what you are dealing with and ask for some help if possible. Consider talking to a doctor or therapist to get their input also.
I have a question: do you feel like you can think okay until you sit down and look at a screen? Sometimes, for me, it feels like the physical properties of looking at a screen destroy my ability to think.
Yes. Being in front of a screen absolutely destroys my ability to think coherently, unless I am writing something (like this post).
Interesting. I've ordered a BenQ monitor on the theory that it may be the backlight flicker (PWM) that is the cause of that. I'll let you know if it helps.

I have also considered trying to rig some kind of eInk device up as an external monitor, but the bad refresh rate and lack of color are off-putting. The Dasung PaperLike Pro looks intriguing, but so expensive.[1]

1. http://dasungtech.com/english/detail/id/220

Yes, please leave an update!
The advice in this thread is pretty good - Ruling out the obvious by seeing a doctor and a therapist seems like good advice. Sounds like you're under a lot of stress. When you're under stress even the simple things in life gets many times harder.

Once you've cleared that. I always recommend meditation and exercise. Plus reading. And writing. It's tough when you're under stress to see how you can fit it in, but it makes everything run so much better.

At 33 you shouldn't really be having these raft of issues. However, if you're anything like me, you've spent the last 10 years running 1000%, hacking till 2am regularly and generally not taking good care of yourself. Stuff that you can push yourself to do at 18 gets harder and harder each year.

Finally. You're right. Web Development is crazy at the moment. It's one of the fastest moving areas in tech at the moment. I don't know how anyone can keep up. So don't overload yourself with expectations.

Try to BS your way to managerial position, and you will never have to write a single line of code.
I've been dabbling in web development since dhtml was the new hotness and I can 100% say that it is completely unreasonable to expect a human to be able to do it at all today. You're no longer looking for technical solutions to a challenge (Which is fun!). Now you are just looking for the component that closest resembles your challenge so you can bolt it on and gain no understanding of the equipment/problem/standards/funstuffs other than their snowflake interface, and once you "master" that, you move on. It's not "hard" the same way it once was. Now it's just "business need" ADHD at "web scale". I can't do it anymore either.

Lower level programming is still relaxing. Ever played with an arduino? Could be fun if you have kids that would like it.

You don't indicate your current age. Having coded for 30+ years, I'll observe:

The complexity of computing has increased to a staggering degree. People discuss Moore's Law and variants in terms of transistor count, pixels, bytes, etc - but nobody comments on the sheer scale of library functions/classes/objects/etc to work with. Jumping from classic custom embedded systems to iOS opened orders of magnitude more capabilities & calls to work with - wonderful in the flexibility & power available, overwhelming in the options available & details expected. I come from an age where aspiring computer engineers were expected to understand systems "sand to Skyrim" (my current term); today the same brainpower could remain exclusively within one development platform. To wit: there's so much to know & do I'm not surprised at capable people burning out.

Pile on top of that your #1 comment about family. My load surely has increased, a mentally demanding addition on top of my increased job skills & responsibilities. Fortunately anxiety isn't a problem for me, but I certainly understand how it could break someone.

So what to do?

Simplify.

Make clear to family you have limits, that more extracurricular activities are beyond you and boundaries must be set. Remind them you're putting in 40-80 hours a week to provide & support, that your work/sleep/self hours are off limits for their schedules, and you can only do so much at once.

Manage development work. Place boundaries, don't say "yes" to everything (the more you do the more you'll be given to do).

Work environments can be changed. Change accordingly - even if that means switching employers.

Physical discomfort...others can better address ergonomics. I'm blessed with having typed so long it doesn't bother me.

Recognize mental changes. They're real. Organize things so they will remind & guide. Get sleep, eat well, exercise.

And simplify. Carve out spaces of simplicity. Deny options that don't facilitate your core activities. Better to take longer doing simple tasks than trying to speed thru via increased complexity.

My reply distracts from your point, but he does indicate his current age. It says he's 32 ("almost 33")...
If he is working 80 hours a week, it is not familly that is too demanding. I mean, they tolerate him not being there ever. (Through I don't think it is the case, he referred to job as 9-5. It might also be that his wife works as much as him, so the "I am putting food on table while you do nothing" argument won't work. ).

It is more likely that there is either someone sick, they have conflicts, have hard time to keep everything together or something of the sort.

> aspiring computer engineers were expected to understand systems "sand to Skyrim"

Could you elaborate on your definition of this term?

It's my perception that many different kinds of folks, other engineers; managers; employers; etc, in this community are expecting a very broad and thorough level of different languages, systems, patterns, etc at all levels of a person's development, and in spite of creating a learning environment this bias seems to persist.

"sand to Skyrim" = understand the core concepts ranging across: chemistry & physics for purifying sand into purified silicon + dopants, integrated circuit design (hand layout), digital logic, CPU design, assembler coding, compiler construction, high level language coding, operating system design, direct-screen graphics, software 3d graphic rendering, 3d graphics hardware design, 3d simulations (hard & soft rendering) ... basics of all understood by the end of a master's degree. To wit: start with a pile of sand, and eventually run Skyrim on it.

My concern is that today, any given strata of computing is so complex that a fruitful career may not extend very far in either direction.

"start with a pile of sand, and eventually run Skyrim on it".

Well done. A lot of people forget where silicon comes from. :-)

I just turned 43. I've been doing this for about 25 years now. I remember having a similar issue right around 30-33. Here's what helped me:

Sleep. Make sure you're getting enough. Seriously, prioritize this over many other things in your life.

Address that fucking RSI. Go to a doctor if you have to. Experiment with breaks, standing desks, ergonomic keyboards, better chairs. Find what works -- this is the only body you get.

Hydrate. Make sure you're drinking enough water. Dehydration can lead to brain fog and irritability.

Change the way you take notes. I used to be able to hold large parts of a system in my head. That changed around 30. I had to start taking better and more structured notes. Incidentally, QA started really liking the bugs I fixed because my documentation ended up being so good. So, good things all around there.

Make sure you're doing fun things. These don't just have to be technology related of course. But seriously, enjoy life. Play board games if that's your thing. Go hiking. Take pictures. Read a book (or three). Plan in downtime to walk during the day.

Daily meditation might help as well. Even just 10-15 minutes.
This is great advice. I recently started doing something for myself that's fun, playing video games with friends late at night, but it may be eating into my sleep too much.
Switching from bed at "2am, up at 7am" to bed at "10pm up at 6am" is one of the best things I ever did.

Also "get off the computer at home and do other stuff" if you're at the computer all day at work

I guess part of it is just that I don't enjoy my work anymore (for a lot of reasons - technical and personal), so I'm not really motivated to optimize my life around being perfectly prepared for it. I mean, as terrible as I feel during work without sleep, I wouldn't have felt much better with sleep, and it will all be over at 5 anyway.
The bright side is I don't mean "work is better" I mean "life is better".

Having an hour or so before leaving the house in the morning is a gift. It changes the focus of getting up away from "must get to work".

I'd say it's time for you to reassess what you want from life. What look like symptoms are sometimes signals from our subconscious. At 33, you've a chance to change course. Try, for example, the exercises in the book What Color is Your Parachute.
I'm younger than the OP and currently at a turning point at which I'm realizing that sleep is this thing that I just have to do now more often and can't skip on it anymore.
Yeah it's a bit sad not to be able to push long nights of code, because getting out of sync becomes a big no.
Same, I'm 28 now and sometime in the last two years I just started needing to sleep a lot.

At 25 I was out drinking multiple shots and beers in a sequential nights till 3am. Sometime between now and then If i did the same I'm basically a zombie for a week

Yeah, either we find medical ideas on what's going on we need to work around that.

Also I think a lot has to do with excitement. Maybe in another context you stay up late and wake early because now you're too excited again.

> Change the way you take notes. I used to be able to hold large parts of a system in my head. That changed around 30. I had to start taking better and more structured notes. Incidentally, QA started really liking the bugs I fixed because my documentation ended up being so good. So, good things all around there.

I found that org mode in emacs is a huge note taking boon for me. all the stuff is nice ootb when you use something like spacemacs as a base configuration.

tl;dr: He has to start taking better care of himself. There are a lot of things you can get away with when you're 23 that you can't get away with when you're 33.

As you noted, sleep is the biggest thing. It will help with the stress and memory.

Same story here! Well, I'm 33 now, but I faced a similar situation over the last couple of years, but has managed to pretty much get over it by putting in most or all of the above adjustments, getting plenty of sleep being the most important one.

I have also realized that sometimes, when I have really important and mentally requiring work to do, I stop caring about work hours and just follow my body's rhythm, which is mostly afternoons/evenings. That can make wonders to productivity. Absolute wonders.

Get some exercise. Go find some people to play ultimate frisbee with. Or, if that isn't your cup of tea, go for a walk at lunch. This not only gives you exercise, it also gives you time to look at the trees and sky - to put your mind on the physical world around you instead of on the code you're trying to build.
I would like to agree and second this.
Another vote for "go see a doctor." In addition to all the other conditions people have listed, anemia can cause brain fog and anxiety. This doesn't sound normal or age-related to me.
I feel exactly the same thing. I'm 34 and I feel my brain is not working anymore. I use not to be the most smart person but always have been the quickest to think, in particular for code. Now I just trying to learn 1 or 2 new things (like: improving my english - I'm not native-, learning angular 2, learning some fancy thing in CSS) I fell like I can't success in anything.