Earlier quoted context omitted.
Also, our standards improve as we age. I wrote a lot of high-energy seemingly clever code when I was younger, but it was nonsense and terrible to read. Now I would not allow myself such indulgence, and so I work differently, maybe at times more slowly, and it might seem this is due to less abilities, but actually it is due to wiser experience.
I returned to the first project I made as a software developer after being about ten years away from it. Never do that. Haha. But it was quite educational to see how my problem solving had changed. Fortunately I didn't need to refactor everything because if I did that would have been a nightmare.
Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
181–190 of 534 posts
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#182The difference is that our younger selves were maybe more optimistic and naive and probably would have just produced a new mess for the next one to scratch his/her head about.
Abstraction is hard and we usually have to much of it in our code bases. You have to break it down and isolate smaller tasks to get started with. Start with some endpoint of the API and try to understand what it exactly does. Usually there also should be an API spec where the ins and outs are defined. Maybe it is easier for you to write this code by adhering to the spec and/or fulfilling existing tests than reading the old convoluted code?!
Probably you know all this and maybe you just hate your task. If this is the case.. sometimes a change is what you need.
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#183Recently, I found out that stressing my body can "reset" my mental and emotional state when I'm in a bad spot (similar to what you described).
I stress my body by doing a physical activity (like running or cycling) or going on a diet (skipping 1 or more lunch). I'm trying to do the opposite of what I feel I want to do (eating more sugar-stuff and doing nothing).
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#184To 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.
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#185Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#186Do you have a lot of attention draining responsibilities? Do them after your programming time.
Are you a coffee drinker? If so, consider adding green tea to your routine. It will help smooth out the peaks and valleys of coffee.
Are you anxious and stressed? That will be very distracting and lead to feeling overwhelmed. Very counterproductive.
As we age, we become more aware of the limited time left to us to realize our goals in life. Suddenly, projects we take on can't be just about learning something new or advancing our careers, they start to be in competition with other values and dreams. Maybe what you're working on isn't able to supply a sense of purpose. That feeling can be very draining.
When all else fails, focus on what you can do, not what you can't. Get the system running and spend some time with it. Find things in the old code that are interesting to you. There are stories hidden in legacy code. Think about yourself relative to the craft and those that came before you. Ask to sit with the productive members of your team for a bit, just to ride shotgun and spend some time with a colleague. Rediscovering some of the sociability of coding can be very restorative. A spirit of comraderie can be the difference between apathy and enjoyment.
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#187Don't think about it holistically. Try to just port the smallest, most independent parts you can one at a time and link them up. The approach I'd take (as a developer with shoddy memory to begin with) would be to find my way to the leaf nodes and start porting them, then work back up the tree. Hopefully that way I shouldn't have to have more than 2 levels in mind at any given time anyway.
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#188I'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…
It could also be attention span problems caused by social media.
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#1891. Sleep quality 2. Nutrition quality 3. Exercise 4. Lifestyle
First make sure that all the above is in check.
Re: Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
#190Earlier quoted context omitted.
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.
> 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.