When learning a new programming language some people prefer to learn from video casts, others like to dive straight into the API documentation. I prefer to get general overview of its methodologies and concepts before getting stuck in lots of detail. This feels like a a good way to confirm the language choice before spending weeks hacking away in frustration. The speediest, most economical way I’ve found at doing that is with books.

Books are usually well thought out, structured manuscripts that explain the languages concepts one easy step at a time. Trying to find that same information on the internet often ends up with hours of wasted time scrabbling around search engines full of outdated articles, which can often leave you with large gaps in your knowledge and understanding. There is one problem with Java though; there are literally hundreds of books to chose from, so in this post I’ll try to go over my thought processes on how I made my decision.

For those looking for a definitive answer, I recommend you look for guidance from someone with more experience — this post is by someone new to the language. Okay, that said, let’s dig in.

As a programmer for some years now, books for complete beginners are not going to be useful — there’s nothing more frustrating in having to wade through chapters on “how to program”. At the same time, having never programmed in a statically typed language before means I’m still going to need some kind of beginners guidance. I’ll also need to be careful not to choose something that for experienced Java developers. Thinking in Java by Bruce Eckel is one such book. It’s free (which is very cool!) and by all accounts a solid book, but it’s for people who want to become better Java programmers, not for those just starting out.

So, after copious amounts of research I put together a list of just two books. Effective Java by Joshua Bloch and O’Reilly’s Learning Java. Head First Java (also by O’Reilly) came to my attention a number of times, but those types of book are not for me.

If you search Google for the best book for learning Java you’ll likely see Effective Java at or near the top of many lists released in the last few years, however, I’ve decided against this title. In the opening pages Joshua himself says that; “This book is not for beginners: it assumes that you are already comfortable with the Java programming language.” It confuses me why so many of those “best book” articles state that this is a great book for beginners. It may be an amazing book, but not for newbies it seems.

The Best Java Book for Beginners: Learning Java 4th Edition

It’s now been a couple of weeks since I started working through Learning Java and so far it feels like a good choice. After the introduction chapter it gets straight to the point with a working tutorial — this was great! It let’s you get your feet wet with four Hello World tutorials, but goes into enough depth to give you a good feeling for the language. Hello world tutorials that cover things like inheritance, interfaces, overloading, threads and synchronisation are for me how these types of tutorial should be done.

When you compare this to titles such as the Ruby Pickaxe book, and Sandi Metz’s Practical Object-Oriented Design in Ruby, it does feel a bit hard going. Sure, I expect there to be challenges to learning a statically typed language, but the writing style (which seems typical in Java circles) is a bit dry. It feels technical, for the sake of being technical, whereas in the Ruby world, they concentrate on getting to the point and teaching you whatever concept they are trying to teach you. It reminds me a little of the C programming book I tried to read back in the late 80’s, and is perhaps why I was scared off from becoming a programmer until a dozen years later.

While working through the book I’ve also started porting one of my Ruby apps; the GutenbergRdf wrapper GEM, so once that’s working I’ll post it, and any other Java learning apps I write, up to my Github account.