How do you actually remember code without just looking everything up constantly?

Posted by kutahead@reddit | learnprogramming | View on Reddit | 39 comments

I have been learning programming for a few months now. I understand concepts like loops, functions, and classes. I can read code and explain what it does. But when I sit down to write something from scratch, I freeze. I forget the exact syntax for things I have used before. I end up looking up the same basic stuff over and over. People say just use it or lose it and that looking things up is normal. But I feel like I am not actually learning if I have to google how to write a simple for loop every time. How do you build real recall without constantly relying on documentation or past code? Do experienced programmers actually remember most syntax or are they just good at knowing what to search for?