Getting started with Java Programming

Java logo

This article was first published on Medium.

This is a blog post I’ve been meaning to write for years about how I got started learning Java. It describes the resources that worked for me; and what I recommend to people who ask me how to get started. From now on, I can just point them to this blog. 🙂

Resources

Fortunately, there are many great resources available nowadays to learn Java. (Or any programming language or Computer Science skills, really.)

Here are some that helped me get started over four years ago:

1. The New Boston (video tutorials)

Bucky Roberts created a series of video tutorials that will help you get started with Java programming, from installing the JDK to basic syntax and moving on to different language features. He explains everything using example code. What I did (and recommend) was to follow along with the tutorial, making sure that my code ran. In the beginning, it would take me double the length of the video (or more!) to get it to work, due to many small typing or syntax errors. By the end of the tutorial, I would often anticipate where he would go and type the code before he did.

The courses are available on YouTube (https://www.youtube.com/playlist?list=PLFE2CE09D83EE3E28). Once you finish the Beginner course, you can continue with the Intermediate course.

2. Head First Java (book)

This book was recommended by a coworker who was helping our team learn and improve our technical skills. It covers the basics of Java syntax and Object Oriented Programming. There are questions and exercises throughout the book.

More information on the publisher’s website: http://shop.oreilly.com/product/9780596009205.do

3. Kattis and HackerRank (practice)

My manager at the time recommended Kattis (https://open.kattis.com/) for practice. This is one of many sites that offers programming challenges. You can write your solution to any one of the challenges on the site; and when you submit your solution, it will run against a set of (secret) tests.

Solving challenges taught me several different things; I learned to write working Java code, but I also learned to search for how to do certain things. For example, when a challenge called for manipulation of Strings, I would either google how to do what I wanted and/or if I knew there was a Java class that might offer the behavior I needed, I would google the Java documentation for that class. In addition, it taught me to look for edge cases, when my solution failed with a wrong answer. Finally, it taught me to improve my code, to make it faster when it didn’t meet the time limit. The only downside of Kattis (for me, anyway), is that it requires knowledge of algorithms.

In addition to Kattis, I used HackerRank (https://www.hackerrank.com) for even more practice. They offer challenges, contests, and several tutorial tracks as well. The upside of the tutorials is that they focus more on real life problems you might actually need to solve in your job or side project.

4. Code reviews / Mentoring

Finally, I was lucky enough to have a friend who is a very experienced developer and kind enough to review my code. This was by far the best way to learn how to write good code! So don’t be afraid to ask someone you know and trust to look at your code and tell you how it could be improved.

Conclusion

This is how I got started with Java programming. These are the resources I recommend to people when they ask to get started.

I hope they work for you too!

If you have found other resources that really helped you, please let me know which ones are your favorites and why.

For more resources, check out this repo on Github: https://github.com/mlvandijk/programming-links/blob/master/README.md

My thanks to Thomas Sundberg for the review!