I'm learning Python, Ruby, and TypeScript for job hunting and portfolio work. I can often figure out how to solve an exercise, but then blank on the syntax and spend a lot of time looking things up. How can I make that process more efficient?
How can I get faster at remembering syntax across languages?
Answers
Pick one language for now and spend enough time with it to build something beyond basic exercises. Switching among three means relearning little details before any of them have had much chance to stick.
Once you're comfortable with one, a lot of the problem-solving ideas will transfer. You can add another when a project or job calls for it.
Reply to this answer
Keep a small scratch file of working examples as you learn. Put in the things you keep forgetting, like a loop, a function, or how to work with a collection. Run the examples, change them, and refer back to them when you get stuck.
Looking up syntax isn't a failure. Repeatedly using it in code is what makes the common bits easier to recall.
Reply to this answer
Make the lookup less disruptive instead of trying to eliminate it. Editor extensions can show documentation and type information while you work, and clicking through to a definition can help you understand what a library call does.
Use those tools to check details, then try writing the next similar bit yourself. There's no prize for memorizing every API.
Reply to this answer
For a portfolio, syntax alone isn't the goal. A project that shows you can break down a problem and construct a working program gives you more to demonstrate than a collection of tiny exercises in several languages.
Also pay attention to how code is normally written in each language. A direct translation may work but miss the conventions and tools that make that language useful.
Reply to this answer
Add your answer
Answers are reviewed before publication.
_f52!circuitribbon.4:
That makes the order matter too. Learn the basic syntax first, then study examples in that language rather than just translating your existing habits.