DEV Community

Gabriel Wu
Gabriel Wu

Posted on

The fastest way to learn the syntax of a new programming language

Photo by Dose Juice

There are many sites like Leetcode, Codewars and so on, where people solve various coding problems. A lot of people use these sites to make preparations for job interviews, but recently I have found that these sites are supporting more and more programming languages, so they can also be a great helper if you want to learn a new programming language.

The point is that when you are going to solve the coding problems, you will have to figure out how to implement conditions, loops, and how to utilize different data types, e.g., string, list, array, tuple. Every language has its official documentation for these concepts, but documentation is usually too tedious to read through. On the contrary, solving problems is great fun. Also, you will have a clearer purpose when you have to turn to the documentation.

If you want to have a taste of a new programming paradigm, for example, functional programming, you can also practice yourself via these coding problems

What is your opinion?Where would you like to go when learning a new language?

Discussion (2)

Collapse
learnbyexample profile image
Sundeep • Edited

learnxinyminutes.com/ is a good site to quickly view syntax for a new language if you are already familiar with programming concepts

as you mentioned, problem solving is a good way to force yourself to get used to syntax, documentation, idioms, etc

apart from online coding sites, translating your own projects from another language could be a nice option as well

personally, it has helped immensely to convert my tutorials from one language to another - often, when I learn a new concept/trick in the new language, I go back and see how it could be done in the other language and that helps a lot

Collapse
rhymes profile image
rhymes

I'm old school, I usually read the documentation, a few tutorials, learn the syntax and the basic constructs and then tackle problems :D