I enjoy learning programming languages all the time. As a programmer I think there is a huge benefit of knowing multiple languages, you can learn many things from each of them.
When learning a new one this is the approach I tend to follow:
Brief overview of the language
To begin with I like getting a general overview of the language. Is this an object oriented language or function? static or dynamic? how is this language different from another? etc. Wikipedia is a good place to start. Currently I am learning Java, so I would go to the java wikipedia page.
To have a first look to the syntax and language constructs I like having a look to the language at Learn X in Y Minutes. It’s a website where you can quickly read through the basics of any language. It doesn’t go deep, but it’s a good start and it’s based in code examples. Simple! Here the java version: https://learnxinyminutes.com/docs/java/
Once I have a grasp of the language I like learning the basics by writing some code. I will look for koans for that. Koans are small set of exercises that will guide you into the basics of a language. Usually koans are a bunch of incomplete or failing unit tests that you will have to fix. For example I’ve been doing this Java koans in the past few days.
After I finish with the Koans I like practicing with something a bit bigger, but nothing too serious, I like doing a couple of katas with TDD. I usually pick the FizzBuzz and RomanNumeral katas.
FizzBuzz is simple enough that I don’t have to focus much in the language per-se, but in the ecosystem: I will need to pick a unit testing library and a package manager and learn how to use then. I will also need to learn how to run a console app.
Roman Numerals is a bit more complex, I forces me to dig a bit more into the languages with loops and collections.
When I’ve done a few Katas I can say I know the basics of the language and the most natural way to evolve will be to put it in practice with something bigger: a breakable toy. Usually I would build a small website, a console app or a desktop application. This will force me to investigate about different frameworks and tools whilst I improve my knowledge about the language. This is a nice environment to experiment and try different things without risks.
Just practicing with katas and pet projects won’t make you and expert. If you really want to be good with a language you will have to fully embrace it:
- Read books
- Read the spec
- Subscribe to podcasts
- Go to meetups and conferences
- Use it at work
Hope this helps and good luck! :)