TL;DR - Understand the core concepts of a language and then alternate between learning details and putting them into practice

A language is a means to an end. Quickly picking up programming languages allows developers to build anything. I’ve recently been learning Java to contribute to a Spring backend. I’ve found that once the foundations of the language have been learned, a great way of learning is to develop a process of cycling through learning details, then putting them into practice.

Getting started - Understand core principles

The first thing to do is understand the core concepts of the language and the main use cases. If you can, get an experienced engineer to mentor you. This way you’ll cover the mundane setup stuff and be running code in no time. Spend about a day or two here, enough time to know everything to get you started but not too much that you end up bored and lose motivation.

Ask yourself the following questions:

Most of the above high-level questions don’t have an absolute answer which is why exploring these questions and answers is key. This will allow you to establish strong foundations, on which to learn the details.

Learn the details

At this point you’ll hopefully have some vague idea of what the language does and how to execute some code. So now it’s time to get to grips with how to write it.

  • Learn some syntax, for example:
    • How are variables and functions declared?
    • What are the available control flows? e.g. if statements, for loops
    • What are the core data structures and how do you create them? (e.g. arrays and dictionaries)
  • What kind of features does it have? For example:
    • Does it have reference and value types? And how are they used?
    • Can you define interfaces/protocols?
    • How do you write concurrent code?
    • If it’s strongly typed, does it have generics?
  • What’s available in the language’s standard library?
  • What are the main conventions people follow?
    • Check a code style guide, for example
    • Do developers rely on 3rd party libraries? If so what the most common ones? For example, I’ve found that modern Java codebases use RxJava

Dive in head first

Theory is great, but we learn much more through experience. Nobody learns how to ride a bike by reading a book about it. Try out one of the following in order to gain experience:

  1. Contribute to an existing project at your workplace, pair with another developer if you can.
    • I’ve found that going into an established codebase where good practices are followed has been awesome. It’ll be easier to add new small features by extending existing code or by following existing patterns.
    • Code reviews by other developers will help point out issues quickly.
  2. Contribute to an existing open source project. It’s common for projects to mark issues that outsiders can pick up, this is a great place to start.
  3. Create your own project. Find something you’re keen on creating and build it with the language you’re learning.

Lastly, stay out of your comfort zone and push yourself to constantly learn.

I’d like to thank Emily Woods for reviewing this article.