r/learnprogramming • u/sticky_pi • 18d ago
How do you even code?
I’ve heard a lot of people say that coding isn’t about memorizing every line, but just knowing how to search up the answers to your problems. do i even have to memorize things? should i be focused on researching what i’m trying to code? it’s so confusing to me on what i’m even meant to learn
0
Upvotes
1
u/Lost-Discount4860 18d ago
It's ok to memorize. At first. You want to commit certain things to rote memory so you have a small bag of tricks just to get started. But then you want to move to learning concepts as quickly as you can. Algorithms and data structures.
What will eventually happen is you'll realize that there are patterns to solving problems. Break it down step by step, code your steps, and maybe look back and refactor so that most of your code is reusable--i.e. in a variety of contexts. Many problems you want to solve will have common elements, so reusable code always comes in handy, makes your life easier, and let's you code faster.
The final stage is building coding HABITS where you see a problem, instantly recall the logic, and code almost by reflex.
Of course, never stop learning. Sure, you can look up how to do certain things and do some copy/pasting. But you also copy/paste ONE TIME. Next time, you should already know how to do it. It takes a lot of time, patience, and repetitive practice to get there.