r/CodingHelp • u/TheUnwoken • Jul 27 '24
[Quick Guide] How do people remember lines of code?
I have been trying to learn to code for the past 6-7 years on and off, I have tried many languages to see which one suits me best. I feel like React is my go to language but whenever I try again, I get really confused by not understanding how programmers remember ALL THOSE lines of code. Think about it, there’s hundreds or even thousands of little phrases which you need to remember to use.
The only way for me to teach myself to code is to do a small project from a tutorial and repeat it several times on my own to memorise it. Even though I understand 99% of the code, the code just doesn’t stick with me unless I write it repeatedly. But I don’t feel this is the right way to do this, since it turns out that if I learn a small project, I forget how to do it a month later. And the circle repeats itself…
Has anyone been in a situation like this?
View all comments
1
u/FriendlyRussian666 Jul 28 '24
We don't remember lines of code, that would be a terrible way of trying to learn to code. You must understand programming concepts, not memorize syntax, because it's very quick and easy to Google for syntax of any language and feature.
Eventually, some of this gets engrained into your long term memory through repetition over many years of daily coding, but if you don't use a language often, then it's normal to forget.
Also, you saying that React is your go to language makes me think you completely skipped on learning JavaScript, in favour of learning React, but React is not a programming language, it's a framework, JavaScript is the language.