48

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.

you are viewing a single comment's thread
view the rest of the comments
[-] Weirdfish@lemmy.world 5 points 3 months ago

Don't let yourself get bottlenecked. The debug cycle can spiral out of control when you too fixated on one element.

When you feel that happen, take a five minute break and figure out some other part of the project you can spend time on that you know will work. Wasting hours on a stuck pig is frustrating, spending those hours instead making other progress let's you simmer on the issue.

Come back to it later with fresh eyes, and maybe it will be easier. If you hit the same wall after many attempts, maybe you have to find a different solution, and at least you got a ton of other stuff done.

The sunk cost fallacy is a lot worse when you've spend multiple sessions on the same issue.

It also helps when you can identify these problems early in the project cycle. Knowing what parts will work because you've done it before, versus new modules you haven't worked with, helps to plan testing of the unknowns early, even if they are used later in the project.

On large scale projects, I make sure to prototype the unknowns right at the beginning, and when I get stuck, I do easy work till I feel relaxed again. If I don't solve the first one, move on to the next, and next, unknown till I've been through each at least oonce. Then you'll have a road map of what works, and what's going to take the hard, head down, jam music on, I'm not stopping to piss till this works or I abandon it, sessions.

Then I know there are X number of those sessions in the project, and when I'm in that kind of mood, I tackle one. Some days you just want to bang out easy UI and functions, others you're ready to beat your head on the keyboard till that one thing works.

Other than that, I write a lot of test code around the problem so I can isolate exactly what where is. Then once it's fixed, I go back and strip it all out. Don't be afraid of spending time really understanding the issue before just doing brute force. In your example, if a module doesn't do what is expected, are you sure your connected to the module? Are the commands formatted correctly? Do you get any response from it or is it just dead or not loading? Can you write around it? Are there other modules available? Can you write your own code instead of using the module?

At the end of the day, what you said is right, step away and clear your head. I can't count the number of times I've come back to something I strained at for hours or days, only to solve it in 15 minutes a week later.

this post was submitted on 24 Aug 2024
48 points (98.0% liked)

Mental Health

3757 readers
1 users here now

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.

founded 1 year ago
MODERATORS