Ask HN: I'm 40 and feel my mental ability declining. Programming seems harder.
596 pointsI 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 5 of 299
What I do is log virtually everything I'm doing in an editor window that I keep open all the time (one file per project/task). If I get disturbed by a call or a colleague, I can do a quick recap and get back to where I was. Likewise if I lose the plot several levels down my stack. It also helps if I need to switch projects for a while, or overnight.
- What routines are involved?It's like a running log of my thought processes:
- Need to add feature x to module y
- What docs have I got?
- a,b,c...
What it does for me is offload the requirement to remember the previous levels and lets me concentrate on just the one or two things I'm looking at. As I come back up my stack I re-read what I was planning to do next. I use an editor (UltraEdit) which allows me to collapse things I've dealt with so I can see the wood from the trees.- Looking at A
I keep the log files, which go back over 20 years and can be invaluable next time I have to look at the same project months later. Reading the code AND my notes helps me re-build my mental stack much quicker. It also helps with any bugs that I introduce.
Good luck. It is possible to be productive at an advanced age, and still enjoy it too.
So I bought an A4 hardback notebook, and started logging everything I did. I wish I had been doing that since I started in this business; it's a really good work habit.
I keep a lot of journals. Bullet journals for my daily tasks/planning. Long form journals for deep subject matter: maths, graphics, algorithms, etc. Combined with my writing it's definitely been a useful way to see how I've evolved my thinking over time, etc.
Keep at it!
Moving to flat ascii files meant it's searchable and has longevity as it doesn't need any specific tool or app. I can also carry the lot around with me - very useful on site.
Cheers.
Continue this thread — 1 reply
Of course, I have a digital file of timestamped and commented code snippets and pieces of config. But that's just about the activity of coding; I now think a handwritten log is a good idea for anyone, whatever their trade.
The reason I recommend a hardback notebook, is because it offers the best CYA protection (I was caned as a child). It's sorta symbolic - hard evidence, if you like.
[Edit] You can also scribble in your notebook in meetings, while glancing furtively over your spectacle rims, to intimidate the speaker. Hard copy is power.