This is about programming specifically, but I guess you can experience similar things with many other activities as well. So if you can even remotely relate your thoughts are very welcome.

Alright so, every time when I sit down to programme it tends to start out great, I feel relaxed and kind of looking forward to it. However, at some point there is going to be a bug in the code or some library does not work as I expect it to. I then start googling; try something out; doesn’t work; google some more; try more stuff; still doesn’t work. While this is of course just what coding is like, during these “google, test, repeat” sessions I tend to go faster with every iteration and at some point I am in such a rush that it feels like I hardly remember to breathe. Needless to say that this is freaking exhausting. After an hour of this my brain is just mush.

Of course, the obvious solution to this is to just take a break as soon as I notice me speeding up. I will try to do this more, but sometimes it feels like I can’t. This unsolved bug will sit in my mind so that I can’t stop thinking about it even if I’m not at the keyboard. “It must be solved. Now”. Of course it doesn’t, but that’s what my mind is telling me.

In a few months I will probably be working as a full time dev again and until then I have to have solved this problem somehow if I want to do this any longer than a couple of years.

Ideally I want programming to be a meditative experience and feel refreshed afterwards instead of completely drained. This might be illusionary, but at least I would want it to be draining more like I’ve been on a good run, instead of feeling like being hit by a truck.

Anyways I’m wondering if any of you can relate to this and maybe has solved this in some way. Does this ever happen to you? What do you do to prevent this from happening? I appreciate any thoughts you have on this.

4 points

Not a programmer, but I do understand the basic principle you’re discussing and have experienced it with other things.

First off, your mental endurance will grow stronger with exercise. It’s important to make sure you’re taking care of your biological necessities, it’s extremely easy for me to forget to eat, for instance. But so long as you’re giving yourself the calories, water and oxygen necessary, you should be able to strengthen your ability to operate in that crunch mode. The key here is to absolutely force yourself to handle those biological necessities. If you find yourself holding your breath, exercise your full willpower to make yourself stop, lean back, and resume breathing normally. Get some calories and fluids as necessary. This can eventually be made a habit, but you absolutely have to brute force that habit into being.

Second, when that exhaustion is beginning to look more likely, you have to similarly force a break. In my case it’s important to physically remove myself from the stimulus, I can’t just sit at the same desk. I have to get up and walk away. My brain will still churn on the problem for a bit, but it eventually slides it to more of a back burner position since it can only get so far without actually trying things out, and this “giving up” is exactly what I’m looking for. Once on that back burner, you can give some time to let your forebrain “cool off” a little bit. Going for a brisk walk would be a good way to go about this. Music could work. Some short videos could work. A quick chat with someone could work. Lots of possibilities. None of it will be pleasant until the brain gives up, though, and in my case that just requires enough time to pass that it runs out of ways to advance without me returning to my desk and testing something.

You may note, the key thread between the two is willpower. There is no way I know of around having to simply brute force the decision with my own conscious mind sometimes, because I won’t want to stop. But I do other things I don’t want to do too, so this is no different. Sub-brain will obey forebrain, I am not offering any choices or debate on the issue. We are standing up now and the feet are walking, the decision is final, now stfu. lol

permalink
report
reply
3 points

Sub-brain will obey forebrain, I am not offering any choices or debate on the issue. We are standing up now and the feet are walking, the decision is final, now stfu.

I like that. Never really thought of it as a willpower thing. But yeah I think you are right.

permalink
report
parent
reply
12 points
*

Personally the bug fixing part of it is the most enjoyable to me, so if I end up programming and there is no bugs, that’s when programming becomes a pain for me. Trick to fix it for me is to have my wife give it a test, bam, bugs to be fixed. Never fails.

permalink
report
reply
1 point

Bug fixing only if it’s actually bug fixing and not just plumbing debugging where you’re not actually debugging you’re just hunting for a misconfiguration for hours or days.

permalink
report
parent
reply
2 points

I think sometimes I do enjoy bug hunting as well, but only if I didn’t write the bug myself and only if there is no research outside the editor involved. Fixing my own bugs feels like “not progressing” to me. So tell us your secret.

permalink
report
parent
reply
9 points
*

The issue is your mindset.

You write bugs because you have something to learn. You’re so focussed on what you’re making, that when a learning opportunity arises, you are not open to it. You’re just looking to speedrun/hack it.

You need to drop the delivery pressure and enjoy the journey. When a bug comes up, celebrate it “ah, you got me here. Interesting. What am I missing?”. Then you slow down, focus not on solving it, but understanding it. If you understand it, the solving is easy.

If you consider learning “not progressing”, then you need to reflect on what benefit the pressure and delivery focus is.

permalink
report
parent
reply
2 points

Very well said. I agree with this guys assessment. He is way more better with the words then I am.

permalink
report
parent
reply
3 points

I should print this out. I really think this may be a big part of the problem.

permalink
report
parent
reply
1 point

Especially as one potential “solution” to creating complex bugs in programming is to be less ambitious with the projects you choose. A friend suggested this to me once, when I was getting frustrated with how many bugs I was running into in a new problem domain. They knew better than I did at that point that the reason I kept diving into silly projects was because I did enjoy the challenge and the feeling of my capabilities expanding. That had gotten a little lost along the way.

permalink
report
parent
reply
11 points

Have you tried ‘rubber ducky programming’? I’m not a programmer but the trick has helped me with other things when I hit a wall like your talking about. Basically you have a rubber duck with you and when you have a bug or issue, you back up and explain each peice and what it’s supposed to do to the duck. The duck doesn’t know programming so you have to explain it like it’s, well, a duck. This helps slow down your thoughts and focus more on what each line does individually. As an electrican it helps me trouble shoot problems without opening up everything.

Hopefully this helps but I know each of us are different and what helps me may not help you. I know how hard it is to set a problem down when your in the thick of it. As a perfectionist I have to tell myself, it’s good enough, constantly or I’ll spend 3 days on something that should take 1.

permalink
report
reply
3 points

Diet, exercise, plenty of sleep (what’s that, lol), and just keep at it when you are tired. It’s not meditative, it’s work though it can be exciting. I guess if you haven’t been at it for very long, it will get easier as you become more fluent. The code will flow off your fingertips (some of the time) without your having to think as hard. Of course that is also the part that AI might already be automating.

permalink
report
reply
2 points

You might want to find something that helps you temporarily switch off or redirect that part of your brain. Drugs can be habit-forming, but video games or going for a run might help clear your head. Even making yourself stand up and stretch for a few minutes every half-hour or so can help.

You can also try to work on more systematic approaches to solving your problems, rather than throwing random snippets from the Internet at the wall. Come up with a plan to collect data, structure experiments, analyze results. Rubber-ducking also helps, explaining your problem to someone real or imaginary; this can help you reframe the problem in your mind and lead to a Eureka! moment.

Finally, programming might never be a meditative exercise. At its heart it’s simultaneously highly creative and technical, using a lot of brainpower. In order to feel less drained, you need to stop before you hit the point of exhaustion - at the very least take that break, grab that drink, eat that snack, whatever helps you recharge.

permalink
report
reply

Mental Health

!mentalhealth@lemmy.world

Create post

Welcome!

This is a safe place to discuss, vent, support, and share information about mental health, illness, and wellness.

Thank you for being here. We appreciate who you are today. Please show respect and empathy when making or replying to posts.

The rules for posting and commenting, besides the rules defined here for lemmy.world, are as follows:

Rules

1-Posts promoting paid products and services of any kind are not allowed here.

2-All posts and comments must be helpful and supportive. Do not put vulnerable people at risk.

3-Do not DM or ask to speak privately to any of our members unless they specifically request it.

If a person from this community disturbs you in a comment, please report the comment. If you receive a DM you did not request, send a screenshot of the DM in a message to a moderator. This is a bannable offense.

4-Suicide, Self-Harm, Death-- Extended discussions are STRONGLY DISCOURAGED here. First, mods and community members are caring people, but not experts in crisis situations. Second, we want to avoid Lemmy becoming like many commercial social media platforms, where comments can snowball into counterproductive talk.

If you or someone you know needs more help than can be found here, please refer to the pinned resources.

If BRIEF mention of these topics is an important part of your post, please flag your post as NSFW and include a (trigger warning: suicide, self-harm, death, etc.)in the title so that other readers who may feel triggered can avoid it. Please also include a trigger warning on all comments mentioning these topics in a post that was not already tagged as such.

Partner Communities

- Therapy

Neurodegenerative Disease Support

ADHD

Autism

Fibromyalgia

TMJ

Chronic Pain

Bipolar Disorder

Avoidant Personality Disorder

Friends and Family of People with Addiction

To partner with our community and be included here, you are free to message the current moderators or comment on our pinned post.

Community Moderation

Some moderators are mental health professionals and some are not. All are carefully selected by the moderation team and will be actively monitoring posts and comments. If you are interested in joining the team, you can send a message to ZenGrammy for more information.

Community stats

  • 352

    Monthly active users

  • 30

    Posts

  • 111

    Comments