r/Coding_for_Teens • u/Chetchy_mon • 28d ago
When Learning Programming Should You Memorize Every Syntax?
How can I learn programming without cramming the programming syntax ?
Is there any way PLS
1
3
u/W31337 27d ago
How did you learn to speak? Same process.
Learn syntaxis on the go by doing it, it will become automatic.
There's no free lunch, many programmers spent long nights coding to master the skill, so that's why programming to me is considered an art form.
Gauging your question it might not be the right thing for you.
3
u/New_Magician6884 27d ago
I say, learn by doing, don't memorize unnecessarily, but only learn what you need, don't forget, code is just a tool, just like a hammer is a tool to build a house, so code is a tool to build something, instead of learning what an if is through dry theory, learn through useful practice, and your brain will retain this, at least that's how it works for me, functions, oop, pointers, variables, etc., I learned them through NEED, and through PRACTICE, I created a simple RPG inventory in the console, from there out of need, I learned line by line, what a function is, why it helps me, etc., then out of need I also learned what a class is, struct, function parameters, etc., now you do as you want, I just told you, and sorry if my English is bad, it's written with google translate
1
u/Verpa11 28d ago
You don't need that much syntax if you want so start coding. Just memorize the syntax of a variable, a print statement and an if statement and then write a few simple programs and when you've got used to that you can start learning loops and if you're comfortable with them functions and so on and so on
1
u/FinancialTrade8197 28d ago
Personally what I did was just remember a few things, then whenever I needed more advanced features I searched up the syntax on how to do those.
Eventually you will remember what you need. Searching up syntax that you do not use often is normal and is a sign that you're not just cramming.
1
1
u/SnooPets5564 28d ago
When you learn a new non-programming language, should you memorize the syntax? Yes, otherwise you can't speak the language.
The analogy holds for programming languages.
1
u/sonesoul 28d ago
usually all you need to know is just a few things:
variables
arrays
functions
oop (if applicable) and more specific are basic types like lists and dictionaries
Lots of them are similar. For example, C style languages: when I switched to C++ it wasn't really different than I what knew from C# and I probably already know most of C too. Java is pretty similar to C# so I can easily switch to it as well Knowing just C# I know most of the syntax of three other languages
However, switching to a different "family" is more problematic. I was struggling getting into python and I still don't like it. So it all depends on what languages you learn
1
u/The-Coding-and-Math 28d ago
I think some useful frameworks are a good addition. Also learn the standard library
1
u/sonesoul 28d ago
this all really depends on what you're going to do. I don't need to know miniaudio for C++ unless im going to work with audio :/ As well as MonoGame if im not making games. The standard library can also be really heavy, like System.EnterpriseServices in C# which is standard library but is really specific
1
1
u/Ankaraadonis_69 28d ago
you don't need to memorize every syntax. focus on understanding what the code does and practice writing small programs. looking stuff up is normal,even experienced devs do it. boot dev has also structured, hands on coding exercises that help reinforce concepts through practice.
1
u/TrainingTheory552 27d ago
learn the syntax you need to write the logic you want within the language.
don't try to memorize everything, as you'll already pick fluency by just writing code.
1
u/Distdistdist 27d ago
Let's say you need to explain somebody what needs to be done, step by step. Do you memorize all the words that are required to create such an instruction?
Same with programming. You tell computer what it needs to do, line by line. In a manner and syntax that it understands.
It's not cramming, it's basically 101 of any programming language.
1
u/BoOmAn_13 27d ago
Don't force yourself to memorize. Syntax is something you will get by doing it over and over and over. Google your missing syntax, and the more you see it, the better your recall will get without "memorizing", just your brain having to fetch out of need that it pins it.
1
u/Reasonable_Slide6304 27d ago edited 27d ago
absolutely not. Just learn the principle. then ask Google/AI how to do a for loop in [insert language]
Like "I need to repeat a think known amount -> for loop" or "I need to repeat a thing until a condition is met -> while loop"
once you know what you are aiming for, then you find out how to write that thing in what ever language it is you're doing.
No point in memorizing things in one language as so far during my IT career I've used maybe 20+ languages and they all have slight or bigger variations on how things are typed, but the underlying thing/logic is the same.
1
u/coybarcena 27d ago
Syntax? Yes. But beyond that, you should understand what they are for. Understand their purpose. You cannot possibly write a program code without knowing the syntax. They are languages afterall.
1
u/DTCreeperMCL6 27d ago
I think if youre working with the language you will slowly memorize the syntax naturally. Whats important is that you focus on the necessary stuff and work from there.
The theory is what really matters. Knowing how something works allows you to relearn it no matter what syntax.
1
u/siodhe 23d ago
The more you know the syntax, the more time you save when writing your own code.
Granted, if you're using C++, there's just no help for you. That language is a disaster of line noise turned into operators. C, on the other hand, is quite tractable.
In nearly any other language (except PERL), the syntax is something that can be mostly learned, and probably should be, by anyone expecting to write in it for a good while.
1
u/iqisoverrated 21d ago
Yes, you should learn the syntax. Fortunately for most modern programming languages there Isn't a lot of it that you absolutely need to know. For the rest you can just make sure that you're aware that it exists when you run across it and then you can look it up.
4
u/johlae 28d ago
You can google for the correct syntax, or use ai. After a while the syntax will stick. Don't worry.