Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I used to have 'buckets' I would stick things into, and they would stay there forever. Context switching was not a problem. Whatever I had put in that bucket was so strongly associated with the context, that when I switched, the bucket would be there waiting for me. I think I basically had built something like a memory palace before I had the concept of a memory palace.

Best way I think I can discribe it... it's almost like in my short term memory rather than trying to cram in every individual variable, I was just including a pointer to a struct containing the variables for those contexts. When I would call up that pointer, I'd get the entire struct and just keep going.

I'm not sure if it's age, alcohol use, stress, always-on internet, genetics, or what, but now I'm lucky if I can remember what task I'm in the middle of if I start thinking about something else while doing it. I find myself just as able to solve problems when I can remember things, but a lot less able to remember things, making me feel a lot stupider and/or slower than I used to be. Context-switching is a real challenge now. FWIW, I used to be A LOT better at tuning out the world/distractions than I am now; I feel like that changed when my kid was born.



That used to be my experience as well. However, I do think two different things happened. One is that I'm getting older. I'm not in my mental prime anymore.

But the second is that everything is more complicated. In high school, you could just sit down and crank out some homework while watching Youtube videos and chatting with friends. And you would just sit down and crank out some homework.

Yesterday, I got into work thinking I was going to write some code, and... oh wait, this depends on chasing down an issue in code owned by someone else, and I need to get answers to some questions about how this other component works that I depend on, and this other piece of code I need to modify doesn't actually work the way I thought it did. Even within the same task, I'm constantly context switching between mental modeling, communicating with other people, and code reading/writing. Also, I'm reconciling all of this against a multi-stage rollout plan where different people will see different behaviors. It's complicated in a way that teenage me never really had to deal with.

It's no wonder I've spent several days feeling like I got nothing done. I did a lot of unwinding hidden dependencies, but very little of it was actually writing code. Most of my time was spent figuring out what questions were the right ones to ask in order to get the answers I needed, which might not end up being what I thought I needed.

Teenage me never had to deal with that kind of complexity.


I suspect that when most organizations hire software developers, they're not really looking for great programmers. What they're really looking for is people who are capable of dealing with enormous complexity without getting confused. Those things might sound related, but I don't think they're the same thing. I expect that most software developers don't spend most of their time designing beautiful, elegant solutions to interesting problems; they spend their time blundering around in an over-complicated and poorly designed code-base using tools that barely work and trying not to trip over myriad corner cases or buried in technical debt. (Even in well-designed systems, you're often still dealing with mountains of technical debt inherited from the industry at large.)

Maintaining bad code is in a lot of ways harder than creating good code. Or at least, a person good at one of those things might not be good at the other.

I have a related theory that software development as a profession is starting to increasingly resemble being an air-traffic controller; as the actual programming parts get easier (languages, tools, and libraries get better, awful code-bases notwithstanding), the non-programming tasks tend to take up more and more time. So, you end up spending a lot more time talking to people and figuring out what to build.


I'm starting to look at it from a different perspective. I don't necessarily think bad is actually bad, or a better way to put it, there's no such thing as "good" code. What I usually find people calling bad code is just not easily understandable. We as programmers started programming with really comfortable abstractions for easy problems and we expected things to continue like that.

When we go into the world of unsolved problems that someone solved and we have to maintain them, and we can't understand them immediately, we call them bad. It's my gut reaction almost every time I'm confronted with something that doesn't immediately enlighten me, even thought I know it's the wrong reaction.

We are always comparing everything to the simplest and most solved problems that were easy for us to understand. When it isn't so easy we call them "bad".


Well, there's that, and there's also "bad code" as in "bad engineering", in the real-world sense of engineering. If someone build a bridge quick and dirty and it works for the task at hand, which is crossing some ravine/river, we could all just say "well, it got the job done, so it was good." But when it collapsing due to entirely foreseeable circumstances, and not necessarily because a lot more resources needed to be spent, but possibly just because someone didn't know or didn't care to take the time to figure out the common failure cases, then that's bad engineering.

That happens in code all the time. People do things in ways that are prone to problems because either they don't have the experience to know better, or they didn't take the time to think about the domain. I would call that "bad code", no matter how pretty it looks or understandable it is.

Part of the problem is that "good" and "bad" are far too vague, so everyone will bring their own meaning. You might see people using "bad" to mean unclear, but I would count that as a sign of progress. A imagine a "bad" mechanical in this day and age engineer is someone that does stuff that costs more money, either now or later when it breaks early, but still produces mostly safe constructs because that portion of the job is highly constrained, and when they fail there, they often aren't just "bad", but may be criminally negligent if they failed to adhere to both the law and industry best practices.

If were getting to the stage that "bad" programmers are just ones that write unclear code, that's a huge step up. Unfortunately, I don't think we are there.


> When we go into the world of unsolved problems that someone solved and we have to maintain them

I don't believe in this world of unsolved problems. Most codebases reinvent the wheel like they've never seen one. Most "problems" are just a problem of picking one from known solutions and gluing it all together. People don't always pick the right solution, or they start gluing at the wrong place and won't stop once they realize it, so the end result is a mess. And then you can ask, why did they do it like this? This is not good!

If you're a programmer, you've hopefully tried to rewrite some bit of code of yours a few times until you've arrived at something that eliminates redundant logic, is more readable and less buggy than the previous versions.. don't tell me they're all just equally bad?


But there's a reason for this too: deadlines.

I have written all sorts of implementations for things that I'm positive there's a library or existing example out there that is just plain better and more thorough.

The problem is, I don't know what it is. I don't know where it is. And finding it will take time, take effort to evaluate the non-good implementations, and take effort to integrate with other systems.

Whereas I can write code now which is "good enough" (or worse, just not good at all but exists and does something right now) and then move on and hope I'll find the "better" I'm looking for later.


One definition of bad code is code that isn't even consistent with itself. I.e. you just tack stuff on when you know you really should go back and refactor some interface, but it's too much work so you just do the minimum you need to get some feature working, but the new stuff follows subtly different semantics, and you have to keep it all straight in your head. And then someone adds another layer on top of that, that's almost but not quite compatible with the other parts, and so on...


I think that's a good description. As I've become a more experienced software engineer, my job stopped being about making new features and switched to controlling chaos. Writing code that needs to be maintained for years is a very different problem than getting a lot of functionality out the door.

Experience teaches you how to adjust for the right spot on the spectrum between "build for business value" and "build for maintainability."


> As I've become a more experienced software engineer, my job stopped being about making new features and switched to controlling chaos.

Isn't that funny. Get the inexperienced folk to churn out features so the experienced folk can enjoy the nightmare of perpetually repairing the monster.


This is why I like code reviews. It let's you make sure it's done with some thought for the future.


I expect that most software developers don't spend most of their time designing beautiful, elegant solutions to interesting problems; they spend their time blundering around in an over-complicated and poorly designed code-base using tools that barely work and trying not to trip over myriad corner cases or buried in technical debt.

But oh man, when you actually do write that one function that does the cool thing in a neat way and fits into the other crap you're wading around in without breaking anything in a way that makes intuitive sense... man, does that feel nice.


Putting one more bag of trash on the trash pile without the whole trash pile falling over is a satisfying feeling for sure.

And sometimes when it comes to this I feel bad and somewhat guilty. But I can't restructure the whole trash pile and orders and budget constraints and all that, so it just has to keep growing and we shore it up where we can until it starts collapsing around the base and then maybe we can admit it was a trash pile all along and try to do better next time.


> I have a related theory that software development as a profession is starting to increasingly resemble being an air-traffic controller; as the actual programming parts get easier

Great comment. This also happens as someone moves up in responsibility.

Also of note, I think good code is like a good plan. It's great, until it gets punched in the face. The reality is that most code is written to address constantly changing requirements with a slew of unknown unknowns. And while there certainly is a range from bad to good, what most people say is good will eventually give way to reality of constant change. The best we can do is maintain some semblance of good in this reality. I'm reminded of this excerpt from Musashi:

“What a fool I’ve been,” he exclaimed aloud. “I tried to make the water flow where I thought it should and force the dirt to stay where I thought it ought to be. But it didn’t work. How could it? Water’s water, dirt’s dirt. I can’t change their nature. What I’ve got to do is learn to be a servant to the water and a protector of the land.”


So many good lessons in Musashi.


This is sadly accurate. Though I do think it's harder to write good code then it is to maintain bad code.


What an interesting analogy to make with Air Traffic controllers. Although I still believe an Air Traffic Controller's job is more anxiety inducing and difficult. But the anaology does hold true.

My Dad used to be an ATC and he always told me that he actually has fun doing it and loves his job. When I was little I was unable to comprehend how one can enjoy being in such a pressure situation. But now as I am older it makes more sense, as now whenever we are near a major release the pressure is still pretty high but I enjoy writing code and deliverying features too. Even if the code base is really annoying and the architecture of the platform makes me pull my hair out. It still is super satisfying to successfully do a release or when you fix that pesky bug. :)


> It's no wonder I've spent several days feeling like I got nothing done. I did a lot of unwinding hidden dependencies, but very little of it was actually writing code.

Oh man, this really resonates with me. So much of my work time is spent manipulating the yak stack it's crazy. The feeling when you can just crank out some code with no external speedbumps is magical though.


If you were watching youtube videos in highschool, you couldn't be too far out of your mental prime!


No, I didn't actually have YouTube videos in high school, I had whatever the internet at the time used for the same purpose. DivX and real player videos downloaded over the phone line, and AOL messenger for chatting. That's why I didn't say "I" and used the generic "you".

I didn't expect someone to read that as a historical detail as opposed to a point about the type of mental context switching high school students do.

I'm not that far out of my mental prime, I'm just far enough that I'm noticing it.


That's what the comment is trying to say, no less, but it rubbed me off wrong, too.


If you think I was complaining about being old without actually being old, then you lost my actual point somewhere in the urge to say "get off my lawn."


I wasn't complaining; just trying to be encouraging! Looks like I did indeed misinterpret the statement though.


You had youtube in high school and you think you are old? Are you saying I got old? I don't even have a lawn yet to get you off.


I responded elsewhere that no, I did not have YouTube in high school, I had ebaumsworld.

But that's beside the point, this isn't a contest for who is older, I'm trying to point out that the work adults do is often less friendly to multitasking, and getting older doesn't help.


I find your experience very relatable. I think writing things down helps greatly with that. Everything that supports your memory actually should.

I‘ve started using a copy-paste history tool, and pretty sure it reduced stress and memory pressure considerably. I can just go back after half an hour and see the code snippets I might else have had to remember.

Creating calendar events with notifications - same thing. I just don’t have to remember most events because the phone will nag me about them, but paradoxically I now remember them easier.

Also, perhaps your sleep is not restorative since your kid was born? On the one hand, as a parent you get a little alert kit installed by nature, perhaps leading to lighter sleep. On the other hand, low oxygen in the sleeping room can be a thing, with multiple people sleeping there - I have way more dream call since opening the window just a little bit (just rotating the handle without actually opening).


> I did a lot of unwinding hidden dependencies

So, you got plenty done.

As you say, "It's complicated in a way that teenage me never really had to deal with". And that's really the nub of it. Not all complexity is reducible. But many of us can't escape the notion (perhaps an evolutionary drive?) that "there's gotta be a simpler way". To your example, if you hadn't unwound those hidden dependencies, perhaps you would have experienced more severe consequences at the wrong end of the process. So well done you for clearing your path.


>In high school, you could just sit down and crank out some homework while watching Youtube videos and chatting with friends.

I see this kind of distraction as introducing complication. When I was in high school about all I could do was listen to the radio on my boom box and even that was using too distracting.


I wouldn't really be able to actually watch something and chat and do math problems. It would be more like 20 minutes of each at a time.

Maybe another way to say it is that in high school math problems fit into a small enough chunk of memory that you could store it to disk and load it back into working memory in a few minutes.

On the other hand, I literally can't fit my current work project into working memory. It's just too big. I have to page it to stored notes. At the end of the day, I write to myself where I need to pick up the next day, and then the next day I spend 20 minutes following my notes to load that context back into working memory.

I don't think I'm bad at this stuff either, because my solo side projects don't have this problem. I can pick those up for an hour at a time and it's fine. But my work projects...


You know, I’ve found myself doing the same thing: I usually have a git versioned ‘notes.org’ file in whatever repo I’m working in, and I’ll rebase it away before opening the branch for peer review. I also don’t feel the need to do this with my personal projects, not even the larger ones.

I suppose that’s because I insist on understanding more of the tech stack for my personal projects than I do for my work projects.


You pretty much described my day today


Spot on.


I'm going to say this carefully - but, for me, having a significant other massssssively takes up an enormous part of my daily mental model that didn't exist when I was a kid or a teen. Not saying it's a bad thing, but there's this other very complex being I have to care for and make sure things are going OK there in some cases at unpredictable amounts of attention. And I'm not saying that I'm not a hugely complex being myself that my SO has to care for and place tons of attention on either.


Enthusiastically agree. Learning to manage serious commitment like that it what has done the most for my growth as a person, I think


Very much agree. I used to get much more stuff done when I was single, because I had a lot of time to myself. Being in a relationship is very different, albeit very nice. I'm working on organising my life so that I would have some more solitary time, though. I've only recently realized how much I need it to recharge.


I've been going through exactly the same issue since my kid was born (in my early 30s now). Reading your post was weird.

I wonder if it's worth digging in to our situation more seriously. Is there a specialist we can talk to about this kind of stuff? Are there tests?

The only conclusion I've come to is, putting it simply, we're dealing with: a) more things b) more complicated things. I had less to worry about when I was younger and the problems were comparatively simple. Now I'm getting paid a ton of money to work on very complex systems. This requires juggling more information that's way more complex.

I dunno.


Could it be that you're not getting the amount/quality of sleep you got before your kid was born?


The lack of good sleep is an absolute brain frier. Not to mention the added exhaustion of trying in vain to get her back to sleep at 3am.


My wife who is a therapist says this issue relates to the executive function part of our brain.

Also, there seems to be increased cases of ADHD in kids. She has told me that many times ADHD medication can increase executive functioning.

It might be worth investigating in cases like this.


I'm in the same boat for memory. I've never had children though. Early 30s.

Old people might say it's just part of getting old. Perhaps there's something more to it than that. Plaque build-up of some sort, for example, in memory processing?


Stress is enough to severely diminish memory and many other things. When I was worried daily about my continued employment I suffered in many ways, poor memory included. My back was a wreck as well. PT said they see that all the time. Stress manifests itself throughout the body.

Lucky thing it comes back once the stress is alleviated!


I'm now in my early 40's, and it's mostly the same as when I was younger... but it's like there's some memory corruption. I'll remember a concept but lose the word, or when interrupted it just take a moment for me to shake out of where I was, and then have to ask the person interrupting to repeat what they said.


>Old people might say it's just part of getting old.

This is true to an extent. Motor and cognitive skills may diminish slowly with age but memory impairment diseases like Alzheimer’s and Dementia are /never/ a normal part of aging.


I have better memory now than when I was younger.

I think a lot of this is which skills you've been practicing. A lot of people practice attention in high school and college (e.g. being forced to listen to lectures or do homework).

You can also practice attention as an adult, and I think it will help in many cases.


For me this is stress related. The more things on my mind, the worse my memory and focus get.

It’s like my brain is saying ”Dude wtf how can you focus on this mundane task when there is a friggin dragon standing right behind you!!!??

Meditative practice helps. Writing things down so they’re not on my mind. Morning pages, five minute journals, running, things like that.

When I cannot focus for shit I’m usually stressing out about something or tired. Sometimes both.


> When I cannot focus for shit I’m usually stressing out about something or tired. Sometimes both.

And then you underperform at work, causing more stress and less sleep. It's a nasty vicious cycle.


The pointer description seems exactly right to me - I've also always done the context-bucket thing, and never had issues jumping right back in.

What's been happening to me feels like I have too many pointers. I can still jump straight back in without needing to rebuild the context, if I can find the right one, because it's still there. It might just take a bit to find the right one though.


Only trying slightly to be funny, but the next logical step is to make a new bucket that contains pointers to the other buckets. It's turtles all the way down. :)

On a tangent... I'm a heavy Org-mode (Emacs) user, and while many org-masters use a sophisticated setup to keep track of and analyze their tasks, I use a really stupid two-level approach:

- Every project has its own orgfile, full of important things to do. Nothing fancy, just a bunch of TODOs, sometimes with priority markers on them.

- I also keep an "umbrella" org file that is just a list of the project names, and a short bullet-list of the next one or two things needing doing in that project. There's no automation here, I just review the project files from time to time, and figure out what next-step summary to write in the "umbrella".

- If a project is more important than another project, I just put it closer to the top of the umbrella. No clever algorithm needed to calculate absolute priority levels from relative (project-specific) ones -- just move the pointer up the list.

- If a project needs to be put on the backburner, I keep the project file, but remove it from the umbrella. I might add it back again in a month or two if necessary.

- When something urgent comes up, or I don't have time to file it, I just stick it at the top of "umbrella" and deal with it later. Some weeks I'm just living "in the umbrella" with no time to be organized... but that's okay, when things settle down, I file everything and try to be more organized again.

So my "umbrella" file is my "bucket of pointers to buckets", plus a scratch-space for hasty notes. It's been working well for me for a few years now.

This really was a big tangent. :) Back to the real subject: I feel exactly the same way that others here do. I knock items off my list like mad -- I feel very efficient -- but some days I couldn't tell you what I did the same morning without consulting my Org files first. It's a creepy, vacuous feeling, but I guess I've accepted it as the price of efficiency.


You might find the org-now package useful.


That looks interesting, thanks!


The best thing I have done to keep the buckets and remember stuff:

- I write everything down that comes to my mind, immediately

- I keep a Trello board with 5-6 lists, 1 for work, 1 for private stuff, 1 for side-projects, 1 for books I’m planing to read. Only rule: it has to fit on a screen

- when working, I try to move away from the laptop as often as I can, I print things out and read them offline, make notes etc.


That is pretty close to how I think too. I also rarely commit things to memory which are easily referencable, which is annoying.


I like to joke that this is the reason why Google does their silly on-the-spot interviews where they expect people to recall algorithms from memory... They know that the machine they've built erases the need to memorize anything, that people are adapting to it and they want to make sure that if the day ever comes when their whole thing comes crashing down, there's a flying chance in hell that they'll have people on staff who can rebuild a search engine, without a working search engine, before society descends into Idiocracy.


In my experience and the research I've read, you've almost mentioned all the top relevant reasons: alcohol use, stress, and reduction in sleep (kid being born). It's unlikely to be age.

I'd highly recommend last year's "Why We Sleep" [1] for more info on memory performance and how it's impacted far more that you'd suspect by full (and quality) sleep, which is in turn impacted far more than you'd suspect by alcohol and stress (not to mention kids).

[1] https://www.amazon.com/Why-We-Sleep-Unlocking-Dreams/dp/1501...


> I'm not sure if it's age, alcohol use, stress, always-on internet, genetics, or what, but now I'm lucky if I can remember what task I'm in the middle of if I start thinking about something else while doing it

It might be something simple. I was having similar problems. It turned out I needed B12 supplements.


Seconding the supplement option.

A good, balanced supplement routine (or diet adjustment, but that's a lot more commitment) and starting the day with useful memory games (i.e five or so Duolingo challenges) has improved my memory, both short and long term, significantly.


I have the same problem, so I implemented GTD. Not only it compensates it very well, but I noticed that my memory got better for things outside of the system. There is definitly an overload there.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: