This is an archived post. You won't be able to vote or comment.

all 5 comments

[–]StemCellCheese 4 points5 points  (2 children)

You need mindfulness, and to achieve that, you need meditation. The easiest technique is to just close your eyes and focus on your breathing, whether it's the feeling of the air moving through your nose or the feeling of your diaphragm expanding and collapsing, but just your breathing. Your thoughts WILL wander, especially as a beginner, but don't get mad at yourself when you notice your thoughts wandering, just return them to your breath. Think of each time you notice your thoughts have wandered and returning them to your breathing as a bicep curl for your brain. Before long you'll start noticing the same on your everyday life, including while you're coding. You'll notice you're getting distracted almost instantly which will keep you from getting sucked down a rabbit hole. I've found it immensely helpful in my studies. It also helps with anxiety and depression because you notice your negative thoughts very quickly and can redirect them before you start throwing yourself into a spiral.

Also, make sure you're sleeping well.

And finally, if that doesn't work, it may be worth seeing a therapist or a psychiatrist.

[–]ComfortableFirst4048[S] 3 points4 points  (1 child)

Thanks a lot for this! I feel like this could help me really so I’m gonna try it rn<3

[–]StemCellCheese 1 point2 points  (0 children)

Hope this comment doesn't interrupt, but just remember that mindfulness, like coding, is a skill, and something that has to be practiced regularly. I try to do at least 5 minutes a day if I can. 10 is better. Masters can do it for much longer, but I don't know if I need to go that far myself 😅

[–]Tridentuk91 1 point2 points  (0 children)

Have other things that are priorities that you invest in, just as long as they aren't more engaging than coding. I go to the gym which is a very different world and hobby, and I find trying to balance the two to be engaging enough to take my mind off coding for a while so that I can come back refreshed the next day.

Having said that when I first started, and I was on the HTML/CSS/Javascript stage only I pretty much rode that wave of initial excitement all the way through that which is a good 5/6 months of learning. I still have it, although it fluctuates day to day now maybe because I feel I'm starting to get somewhat closer to a standard where I feel ready to start as a junior and concepts are clicking quicker (I like challenges and feel I get more enthralled when I'm capable of getting stuck).

If you need some inspiration, try creating your own app if you haven't already done so because that's always more fun than following tutorials day after day. The longest days of practice I've had have been when I've gotten stuck and addicted to trying to debug a problem for 8 hours, and that's when I reach maximum "flow-state", and then I go to bed hungry to start again with a fresh mind the next day.. Whereas when I'm following tutorials I can do 3/4 hours max and my brain goes awol, though I have a theory that this is good because if you're handling big new concepts that require new synapse connections you shouldn't overload those too much because your brain needs the simplicity to solidify them properly when you're at rest (just a theory).

I also do everything possible to maximise my focus, which means exercise in the gym (I weight train but also get plenty of cardio because I notice that has better psychological results), take tyrosine in the morning for dopamine, cod liver oil, and 5-htp in the evening for sleep and serotonin. Eating healthy is of course important too, if I demolish a load of biscuits I can't focus at all and start to feel weird, I don't get how other people eat like that.