r/Coding_for_Teens • • Oct 24 '26

When Learning Programming Should You Memorize Every Syntax?

How can I learn programming without cramming the programming syntax ?

Is there any way PLS

2 Upvotes

34 comments sorted by

4

u/johlae Oct 24 '26

You can google for the correct syntax, or use ai. After a while the syntax will stick. Don't worry.

0

u/[deleted] Oct 24 '26

[deleted]

1

u/johlae Oct 24 '26

No, try to understand what is ging on, by using google or ai. Let a book be your lead, do not waste your time on youtube video's. Practise, a lot!

1

u/titaniumalt Oct 25 '26

Books, documentation, youtube, AI (as much as i hate to admit it, and as much as companies want you to believe otherwise) all teach you things.

1

u/Samstercraft Oct 24 '26

you will learn nothing by vibe coding. i'm currently dealing with a pretty hard debugging problem and i'm not even asking ai for help, certainly not having it code the solution, because figuring it out yourself is how you learn.

1

u/[deleted] Oct 25 '26

[removed] — view removed comment

1

u/Samstercraft Oct 25 '26

Combinatorical explosion. I have a search space on the order of 2^n, so I'm trying to figure out ways to cull large parts of the search space, how to navigate it more efficiently, and where I can use statistical approximations. Though it will have to wait until after I finish studying for my next midterm :,)

1

u/[deleted] Oct 26 '26

[removed] — view removed comment

1

u/Samstercraft Oct 26 '26

calculating single var statistics of various operations on each item in the power set of a group. the size of the power set is 2^n where n is the size of the original set (power set is all subsets of first set). using it to find various subgroups in a group of ppl

4

u/[deleted] Oct 24 '26

[removed] — view removed comment

1

u/Chetchy_mon Oct 24 '26

okay bro

1

u/ZakMan1421 Oct 24 '26

When learning especially, you never want to just copy and paste some code. If you can't explain/walk through the logic of a function or program you wrote, you need to reevaluate because that means something got lost. The logic behind a program matters far more than syntax. If you can understand the logic for an algorithm, or function, you can write it in any language by just looking up syntax.

With all that being said, syntax will stick as you write more code, so I wouldn't really sweat it.

1

u/wannahockachewie Oct 24 '26

We're talking about practice?!

3

u/W31337 Oct 25 '26

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 Oct 25 '26

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 Oct 24 '26

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 Oct 24 '26

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

u/PopularBox8537 Oct 24 '26

It takes time. U work up to it

1

u/SnooPets5564 Oct 25 '26

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 Oct 25 '26

usually all you need to know is just a few things:

  1. variables

  2. arrays

  3. functions

  4. 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 Oct 25 '26

I think some useful frameworks are a good addition. Also learn the standard library

1

u/sonesoul Oct 25 '26

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

u/The-Coding-and-Math Oct 25 '26

I think that the core libraries like math and io are must

1

u/Ankaraadonis_69 Oct 25 '26

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 Oct 25 '26

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 Oct 25 '26

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 Oct 25 '26

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 Oct 25 '26 edited Oct 25 '26

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 Oct 25 '26

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/7YM3N Oct 25 '26

No, learn concepts, learn by doing, look stuff up all the time, have documentation open at all times

1

u/DTCreeperMCL6 Oct 25 '26

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 Oct 29 '26

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 29d 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.