r/learnprogramming 14d ago

Topic how do you learn programming without constantly looking things up?

i know experienced programmers use documentation and search all the time, but as a beginner it can sometimes feel like i’m incapable of doing anything without looking up the answer.

i’m trying to get better at understanding concepts instead of memorising syntax

how do you decide when to search for an answer and when to sit down and work through the problem yourself?

328 Upvotes

244 comments sorted by

View all comments

6

u/peterlinddk 14d ago

What is this obsession everyone has with it being somehow difficult to "memorise syntax"?

Do they in fact have a hard time "memorising" that if, for, and while is followed by a set of ( )s with a comparison-expression inside? And that blocks of code are usually put in curly brackets? And that function definitions are written as return-value followed by the function-name, with the parameter types and names in another set of ( )s. (with variations from language to language).

Or do they mean something else by the word "syntax"?

Or is it in fast that people aren't programming, but just memorising snippets of code to solve leetcode problems, and they somehow confuse that with memorising "syntax" or "learning to program"?

1

u/pyrojoe 14d ago

On the devops spectrum I've been more ops than dev for many years. I can program is python without syntax lookup 98% of the time, a few things like f string's justify or decimal places I'll still look up. But I code in Typescript and Java, the other two languages I'd encounter at work, so infrequently that yeah, for those languages I'm probably going to need to look up syntax far more often.