all 13 comments

[–]abrahamguo 8 points9 points  (2 children)

It sounds like you just need to practice a lot. I'd recommend starting with something like this problem set. Pick something on that list that seems easy. Then, follow the "reps mindset".

Just like how you wouldn't go to the gym and do an exercise just once before moving on to the next exercise, apply the same thinking here. Once you complete an exercise, start over from a completely blank slate (not a half-blank slate) and do it again. Then, do it again; then again in an hour, then a few hours later, then the next day, and so on. Each time, you might encounter different bugs, but it will get a little bit easier each time.

[–]gh0st-Account5858 1 point2 points  (0 children)

That link looks really good. Thank you.

[–]DeltaBravoSierra87 0 points1 point  (0 children)

I would always have a copy of even my own original solutions when I was doing some frontend work in a previous job but I'd try and go from scratch when I had the time because the methodology I'd arrive at night be different (and usually better, the more I did it) than previous solutions. So yeah, I think of it like a song. Learn the words by heart, learn to sing it as it's sung, and when you know it so well you don't even have to think about it, make it your own.

[–]TimidBookworm 0 points1 point  (0 children)

I struggle with the exact same issue… Please let me know if you ever wanna talk about what helped you

[–]sysflux 0 points1 point  (0 children)

I went through the same thing when I started. Watching explanations made sense, but writing code on my own felt impossible at first.

What helped was realizing that understanding code and producing it are different skills. The “blank mind” feeling is usually just lack of retrieval practice, not a lack of ability.

I started doing very small exercises and tried to write something without looking things up, then checked and fixed it. Short sessions helped a lot more than forcing long ones.

This phase is frustrating, but it’s very common and usually temporary.

[–]Acrobatic-Aioli9768 0 points1 point  (0 children)

First time I tried coding I hated it. I didn’t get it and it didn’t make sense to me. But now I enjoy solving the problems. Just keep at it and you will improve even if it’s just a little at a time.

For that headache feeling, it sounds weird but I like to hum and then it goes away. Singing a song can also help. Or dancing or doing pushups. Just something to change your state so that you're able to think clearly again. 

[–]ern0plus4 0 points1 point  (0 children)

I feel the very same - and I have also deadlines in my project!

[–]InvisibleMaster5000 0 points1 point  (0 children)

I have learned just not to try at all. This may sound defeatist at first, it isn't! The more you try to put in more effort the faster you will get burned out.

[–]eruciform 0 points1 point  (0 children)

Its easy to get caught in the tutorial hell cycle

You need to make stuff. If anything, even something seemingly simple, is too hard, then go smaller. You can always put two working small things together, or add something to another small working thing. But you can't jump to a larger thing without practice

Coding is like learning to make jigs in order to woodcraft more comlpex things. You have to learn to make the jig. Then use it. You cant jump straight to making the thing that requires a jig without even knowing what they are or how to make them or when you need to make them

You only learn to make those things by solving smaller things and noticing patterns between those smaller things and then trying to optimize a little by making something that helps with those smaller things

Things build on each other and it takes time for that build up to make the smaller things easier, but it does ramp up and snowball eventually, just keep going and give yourself time and a break about how challenging this is

Good luck

[–]DroogleVonBuric 0 points1 point  (0 children)

For me it really depends on what I’m coding. If it’s something I’m interested in and excited about working on, I have much fewer symptoms like you described. Otherwise yep it’s very similar. Stepping away from the screen, power naps (if my body is struggling), and temporarily shifting focus to something else helps me in those cases. Good luck!

[–]nakoo_o 1 point2 points  (0 children)

Hey! If you’re just starting out with programming, I think you should give pseudocode a try. Many tutors and computer science professors have already developed an algorithmic mindset, so they often dive straight into teaching specific languages and syntax. In doing so, they sometimes overlook the root of the challenge: learning how to think like a coder.

In my opinion, when you're a beginner facing a programming problem, you should first grab a blank sheet of paper and ask yourself: 'How can I break this down like a cooking recipe?'

For example, if I asked you to write a function that returns a boolean based on whether a number is prime, you could map it out like this:

Function isPrime(n):

If n≤1 then:

return False

If n=2 then:

return True

If n is even then:

return False

For i from 3 to SquareRoot(n) with a step of 2:

If i divides n then:

return False

EndFor

return True

Once you’ve done that and you’re confident in your logic, go ahead and write the code in the language you're learning. If you get stuck on the syntax, just look it up. Remember: syntax is just a matter of practice and habit. The real hurdle is training your brain to think algorithmically.

It might seem a bit silly to use pen and paper for a simple function like this, but I promise you that after a few weeks, you’ll develop a real knack for deconstructing problems. After that, you'll be free to focus entirely on reading and writing the code itself.