I started learning Golang, but during my studies I have difficulty writing code

Hello everyone! I started learning Golang, but during my studies I have difficulty writing code. I have learned some topic, I want to consolidate what I have learned, but I forget what to write, I get lost in the code, and when I see someone else’s code, my head goes off, because I don’t understand anything. Please help me what to do in this case?

I think this is every beginner’s problem. Just go step by step, and spend much time on understanding others’ code and writing your own code. Besides, copy the code you’re studying to your local machine and run it, to see if it works — do not think that reading it will be enough. When you see the code works fine, change it a little bit in order to see what will happen.

Make small steps, and try to understand each step; move on only when you are sure you have understood what you have learned till now. I recognize your situation very well. I have it when I just read about a new language — it’s then typical to have such problems. As I wrote, copy the code, run it, and then experiment with it. This should help you understand what you’re learning. Start with very simple code — so, for example, do not try to understand longer functions. The time will come for that, too, and quicker than you imagine.

And one more thing: You will encounter situations you will not understand. Maybe this will be something more difficult. OK, leave it, move on, but get back to it later, though not too late. Do not let such difficulties stop you from learning.

1 Like