Take the 2-minute tour ×

Java has a huge number of design ideas behind that are very difficult for a beginner to learn/understand.

Things like rasters, colormodels, BufferedImage vs Image, all of these things are manipulated indirectly. Most beginners have difficulty understanding the design idealology behind the Class Hierarchy that intro to Java books wont cover.

are there any books that anyone can recommend to better understand this?

share|improve this question

closed as not a real question by duffymo, artbristol, Edwin Buck, jtbandes, Graviton Mar 16 '12 at 3:58


Some things just take time: norvig.com/21-days.html –  duffymo Mar 13 '12 at 14:28
The close reason states that your question is "overly broad"; questions asking for book recommendations are explicitly off topic here. If there are any old book questions that are still open, those aren't on topic anymore either. –  BoltClock Mar 23 '12 at 22:30

1 Answer 1

up vote 1 down vote accepted

Cut the task learning programming in Java into two, because it is two tasks in one.

  • Get a good book on learning the principles of Object Oriented Design, preferably one that does not pander to the details of a particular language.

There are good books on Object Oriented Design, but they all are verbose treatments of this excellent resource from Cunningham & Cunningham. The principles are simple enough, but to follow them will alter the approach to solving problems with programming. When you recogonize this, odds are you are thinking object-oriented. Try to remember that Object Oriented programming is a solution obtained by modeling the problem.

To ensure your models don't drift from the requirements of "the real world", learn about test-driven development, and use it. If you ignore most of the other advice, follow this suggestion. The initial investment in setting up automated unit tests, having your build chain run them, and writing the tests may seem steep when you have a task at hand; however, the tests ensure that your software continues to work (at least in the ways that you tested). Software is brittle and prone to "action at a distance" failure scenarios. Your tests pinpoint failures so you can spend more of your time coding, and less time debugging.

  • Get a good book on the programming language you are using.

Initially avoid learning the libraries, focus on the structure of the language. After you have the syntax, operator precendence, data types, Class hierarchy down pat, then do a deep dive on the obviously useful classes in java.lang and java.util. Learn the rest of the libraries on a relaxed, when I need it timetable.

Oracle's (formerly SUN's) online tutorial for Java is unusually good. If you prefer a book, I read "Learning Java" by O'Reilly. I've been told that other books cover the material without the dry toast reading that I enjoyed.

I've yet to find a truly excellent book that was excellent for both the design and language topics. It is as if the differences in focus are just too wide.

As far as the design patterns part, get one reference book, and possibly one book for learning.

The reference book should be "Design Patterns: Elements of Reusable Object-Oriented Software" by Erich Gamma, Richard Helm, Ralph Johnson and John Vlissides. Read it once, then keep it handy as a reference.

The examples in "Design Patterns" are much better after you already have some skill in using patterns; to get a better feel for when, how, and why to use them, I found "Design Patterns Explained: A New Perspective on Object-Oriented Design" by Alan Shalloway to be the bridge that made "Design Patterns" much more accessible.

Keep in mind that you cannot create a good solution by throwing a bunch of patterns at a problem. If you over apply known patterns, you can get into just as bad of a mess as if you fail to solve a known barrier with a commonly used pattern.

share|improve this answer
