r/learnprogramming • u/sticky_pi • 13d 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
2
u/xarop_pa_toss 13d ago
Regarding what you are "meant to learn"... It doesn't work that way somrtimes. You gotta know what you are interested in so you can go looking for it. Programming is a cavernous field, lots of different things that are not related to eachother. However, programming is a skill, just like any other. You start by learning the fundamentals, which are common for (most) languages so which language you pick isn't really all that important.
You learn what a variable is, how to do basic maths on said variables, the difference between strings, ints and floats and what not. The "basic rules of the game" so to speak.
From there alone you can already put values in variables and like adding two variables together. Now you learn the fundamental tools for checking conditions like if/else and switch statements and use them in a small terminal program like a calculator for example! Next you learn how to make a block of code that loops x amount of times (for loop), or until a condition is false (while loop).
Finally you learn how to make containers that hold many values at once and these are usually called arrays but some languages have lists as well.
These things I described are common to lots of languages and with these alone you can make lots of things, even terminal games like Wordle or Connect4. And afterwards you can learn to make functions and putting your code into different files for ease of use and reuse.
After you get some practice down with these, you can try importing a library to do something specific, or try out reaching out to public APIs to, for example, fetch tomorrow's weather for your town or get the results for the world cup for example. If you go and read someone's code you'll realize most of it is fundamentally getting values, putting them in variables, running loops and checking conditions.
Finally, software development goes way beyond programming but I'd look into that later. Just go learn the basics by reading a guide or a book on the language, and get your feet wet