Thursday, June 29, 2017

Is Joshua Bloch's Effective Java Still Valid in the Era of Java 8?

The Effective Java is probably one of most read book on Java technology and has been regarded by many programmers as the best book for Java developers. Though, recently many Java programmers have asked me whether Effective Java is still relevant in the era of Java 8? Or is there any better book on the same topic. The question is logical because It's been more than 9 years since the 2nd edition of Effective Java released in 2008 and also the most recent Java 8 has changed how you code Java. Many idioms and design patterns of good old days now become redundant and can be done easily with the new Java 8 syntax and feature, but does that mean "Effective Java" is not relevant now? Well, No, not at all. The Effective Java is still relevant and must read for Java programmers due to several reasons, which you will see in this article.

The first and most important reason is that the book is a collection of really good practices that make your Java code more maintainable and it covers up to Java SE, which is still been used at many places. I know that Oracle is stopped supporting this version but believe me, there are a lot of big companies which are running on Java SE 6 and some of them on even Java SE 5.

The 2nd edition of the Effective Java has advised on generics, enums, annotations, and other recent Java developments, which is still valid. Same is true with the concurrency chapter which was updated from 1st edition to reflect the "java.util.concurrent" changes. Though, I personally feel that we need a new edition of Effective Java, the 3rd edition which should cover Java 8 and utilities introduced in Java 7.

The JDK 8 release has introduced some of the biggest changes in terms of the lambda expression, streams, and functional style of programming, which made many tried and tested idioms redundant.


Also, Effective Java 2nd edition was light in terms of JVM internals and GC, which is an important topic for Java programmers seeking performance improvement. Though there are some good books on Java performance tuning available e.g. Java Performance The Definitive Guide By Scott Oaks , which fills the gap, hearing thoughts of Joshua Bloch on same will make the book for complete for experienced Java developers.

Nonetheless, The current edition of the book is still a must-read for any Java developer who is involved in developing libraries, framework and shared utilities. The book has advised on the best practices which have been used in JDK and also tells you how you can use them for your benefit.


This book has a long-lasting impact on many Java developers including me. It has improved both codings and thinking the ability of Java programmers. Simple advice like preferring Enum over String and Integer does make a lot of difference when it comes to debugging issues on production or writing a Java application which can withstand the test of time.

I have a copy of Effective Java both on my bookshelf and on my phone and I keep referring them whenever I am confused or want to know about features covered in Effective Java especially the items on Serialization and Factory pattern.

Though I learned Java by reading Head First Java in the first place and I think it is still the best book to learn Java from scratch. The pictures, quizzes and comic style writing makes it an easy read for non-programmers and beginners alike. But at the same time, Effective Java is a required reading if you're coding Java. Many companies including Google gives copies of Effective Java to new joiners.


Now, if you have not read Effective Java yet, I suggest you should read it at least once. The author, Joshua Bloch, is a very well known author and his style is pleasant to read. He is also more qualified than others to write such a book on Java, given he himself has written several key classes in java.lang and java.util package.

The little stories you will read in Effective Java about different topics also highlights his own experience while writing those classes. Many of the code reviews programmers do for Java library code at different tech companies and banks basically end up with referring chapter and verse from Effective Java.

Is Joshua Bloch's Effective Java Still Valid in the Era of Java 8?


In short, I think, Effective Java 2nd Edition is still relevant and is a decent read. Like, you should know these things, but not necessarily adhere to them. Though most of the advice in Effective Java fits well on different circumstances they are not the word written in stone. Sometimes a simple function just gets the job done, clearly and effectively, instead of decorating with OOP features for the sake of following OOP.

Though, I would love to have the 3rd edition of Effective Java coming soon and probably this is the right time to release that given Java 8's adoption by Industry. Let's hope Mr. Bloch's heard our request and we get this gift from him sooner.

Further Reading

Thanks for reading this article, if you like this article then please share with your friends and colleagues. If you have any question or feedback then please drop a comment and I'll try to find an answer for you. 

4 comments :

Anonymous said...

Check this:
https://www.amazon.com/Effective-Java-3rd-Joshua-Bloch/dp/0134685997/ref=sr_1_1?s=books&ie=UTF8&qid=1498759856&sr=1-1&keywords=effective+java+3rd+edition

Daniel Chesters said...

https://www.amazon.com/Effective-Java-3rd-Joshua-Bloch/dp/0134685997/

Javin Paul said...

Hello @Anonymous and @Daniel, it seems Effective Java 3rd edition is on its way, let's hope it cover Java 8 and hopefully Java 9 too.

Anonymous said...

Yes, Effective Java 3rd edition is coming on Mid December, it will cover Java 9

Post a Comment