My Strategy for Learning a New Programming Language
This year I'll start working in Java, to contribute to the backend of the product I work on. I've done backend development in NodeJS
before: Using Express, Lambdas in AWS or for middleware like Cloudflare Workers and Cloudflare Functions. Never in Java though, so before anything, I'll have to learn Java
.
This post describes my steps to master Java. It's my personal learning plan for any new programming language, because I anticipate to follow in the footsteps of Java with another programming language, and another, and...
For some time I have been inspired by the idea of Learning in Public, to "make the thing you wish you had found when you were learning"1. Writing about what and how I learn helps consolidate my learnings and it might be helpful to others.
This post is my first attempt at Learning in Public. And the thing I wish I had found when I started learning is a simple way to learn Java, including limited but sufficient resources.
Goal: Contribute a weekly backend Pull Request for the product I work on
The level I want to reach in Java is that I can contribute small, weekly chunks of useful functionality for the product I work on. At that level, I am confident that my learning will accelerate. Then, I will not only be learning in my spare time, but from making meaningful contributions to my team.
Learning strategy
Based on my personal learning experience for JavaScript and what are considered the best practices for learning new programming languages, this is how I'll approach learning Java:
- Read just enough theory to start coding
- Do coding exercises
- Read a book on the new programming language
- Build small real-world applications
- Create features in professional context
Now this approach is still generic, so where should I start? Initially, I started with a Udemy course, but that was too passive, dry and slow. Then, I came across a post on LinkedIn with great resources for Java2. This is how I will start:
- Read just enough theory to start coding - Read the official Java developer tutorials: https://docs.oracle.com/javase/tutorial/java/TOC.html
- Do coding exercises - Complete the free Exercism Java track: https://exercism.org/tracks/java
- Read a book on the new programming language - There are many, I will be reading "Learning Java: An Introduction to Real-World Programming with Java (5th edition)"
- Build small real-world applications - Write small versions of full applications or tools, e.g. command line tools, following example projects as presented in 'Coding Challenges' 2
- Create features in professional context - Contribute to the codebase of my team.
- Continue leveling up: Read more books, build more copies of real-world applications.
That's it, you now speak another language.