Improve Your Java Skills With 'Effective Java'
Monday, April 02, 2007
Although there are a lot of books available to teach you how to start programming in Java, good books on Java for more experienced developers are very rare. One of the few books that does offer experienced developers in-depth coverage on how to write better Java applications is 'Effective Java' by Joshua Bloch.
Starting with Java development is easy enough. There is a wide variety of (online) courses, tutorials and books available to help you get started. Depending on your background, experience as a developer (in other languages) and budget you may prefer one method over the other, but either way there's a lot of choice. You may even choose to get certified to proof to yourself and your employer (or client) that you've mastered the basic skills to develop Java applications.
However, if you're serious about your career as a Java developer, the learning process doesn't end here. Actually you have just started and the road to become a better Java developer is more difficult. As with anything in life, it takes practice to become a better Java developer and this takes time. The good news is that you can speed up this process by learning from other developers who have already found out what does and doesn't work.
The trick is how to find those developers who can help you to get the most out of yourself and the Java platform. If you are lucky, you already know some Java developers who are more experienced than you and are willing to share their knowledge. Having easy access to other Java developers is a great advantage, but how can you be sure that they know what they are talking about? As a novice you may not be the best judge to determine the skills of more experienced developers. What will happen if you decide to take advice from that one developer who claims to be a Java guru, but is really just a mediocre Java developer at best? Your progress may be less spectacular than you hoped for or, even worse, you may pick up some bad habits from this individual.
Does this mean you shouldn't listen to other Java developers around you to avoid taking bad advice? Of course not. All I'm saying is, be critical about what you hear and don't assume something is true because someone with a bit more experience claims it is. When possible try to get more than one developer's opinion and check if what they are saying makes sense. But you can do even better. You can learn from Java developers who have a proven track record when it comes to developing high quality Java applications. How? By reading articles or books written by these developers or by attending seminars where they are speakers.
Seminars and articles are usually a good source of information to get an overview of a specific topic, while books tend to delve a little bit deeper into the subject. So reading a book by an established Java developer seems like a good way to get some excellent advice on how to develop Java applications. However, finding such a book proves more difficult than it seems. Sure, there are enough experienced Java developers who have written books, but most of these books cover some specific topic or technology. As it turns out there aren't that many books that help you to improve your fundamental Java skills.
Before we continue, let me explain what I mean with 'fundamental Java skills'. I'm not talking about basic stuff like how to write Hello World or how to use inheritance. I'm talking about how to define a usable interface, when (not how) you should use inheritance, how to make sure your fellow developers aren't confused by your code, how to write robust code, etc. The kind of skills that separate the amateur from the professional Java developer. The kind of skills that result in applications that don't just work, but are easy to understand, maintain and modify. If you ever have had the misfortune to be working on an application developed by a developer lacking these fundamental skills, you will know exactly what I'm talking about. Calling these skills fundamental doesn't mean they are easy to learn either; most developers have great difficulty mastering them. It simply means these skills are essential for developing high quality applications that are efficient, predictable and easy to maintain.
Given the importance of learning these fundamental Java skills, you would think there would be a lot of books available about this subject, but like I said earlier that's not the case. Fortunately though, one of the few books that does handle this topic, does a very good job when explaining how to improve your Java skills. That book is called 'Effective Java' and is written by Joshua Bloch.
Bloch is a well-known and highly respected Java developer who joined Sun Microsystems in 1996 and has been involved in designing and developing many of the Java platform libraries, including the Collection framework and the java.math package. In 2004 he joined Google as a Chief Java architect. Given these credentials you can expect his book to give you some solid advice based on hard earned knowledge through years of developing the core of the Java platform. The author isn't shy either about pointing out flaws and inconsistencies in the various Java libraries and offers alternatives that should have been used, thus showing the reader how to avoid similar mistakes.
The book contains 57 items that each cover a specific topic, in which Bloch offers his readers advice in a clear and easy to understand manner. Items are grouped in chapters based on what they have in common, resulting in the following table of content (with links to sample chapters):
- Introduction
- Creating and Destroying Objects
- Methods Common to All Objects
- Classes and Interfaces
- Substitutes for C Constructs
- Methods
- General Programming
- Exceptions
- Threads
- Serialization
The strength of this book lies in the author's ability to not only tell how you should tackle certain issues, but also why this is a good idea and what can happen if you fail to do so. Most of the time the offered advice is so straightforward and sensible, that after reading it you feel it's the only logical thing to do. However, even experienced developers will have to admit that they are not always doing things that way when developing their applications. Other times you may find that you're already using the practices Bloch proposes, but have never really thought about why you do until it's explained to you in this book.
Because this book is so clearly written and offers such good advice, I highly recommend this book to any Java developer who wants to become
better at his job. Even if you've been developing Java applications for years, this book will still have a lot to offer. I will even go as
far as to say that experienced developers will get more out of this book than developers who have just started. That doesn't mean you can't
read this book if you've just started, but I suggest you read it again when you're a bit more experienced. You'll be surprised how much more
sense this book will make the second time around. Some problems you just need to experience first hand, before you can appreciate the advice
given to avoid those problems.
But don't just take my word for it (remember what I said about being critical) and use the links in the Resources
section to read some other reviews. You can also read some of the sample chapters to determine if this book is right for you.
Resources
-
Find out more about Joshua Bloch at
en.wikipedia.org -
The sample chapters of 'Effective Java' :
java.sun.com -
Some reviews of 'Effective Java' :
www.angelikalanger.com
www.regdeveloper.co.uk
www.denverjug.org
-
Find more reviews of this book at
www.amazon.com -
For feedback and questions you can send an e-mail to :
developer@componative.com