Book Review / Overview: “Java: The Good Parts” by Jim Waldo

Review:

1_5of5stars

I’ve been programming in Java for many years, and I feel that I’m reasonably proficient at it, but I’m always looking to improve my skills and gain deeper understanding of the tools and technologies I depend on. I was hoping that this book would help me do that, and to some extent it did. I learned a few details I didn’t know before, but overall, I didn’t feel that this book was worth the time it took to read. I would describe this as a book of essays, with each chapter describing something “good” about Java or the Java ecosystem, not really a book intended to teach, though in some places it does try to do that. This made the book not really flow for me. I can’t quite figure out who the audience for this book was intended to be, and so I can’t recommend it at all.

Chapter by chapter overview:

Chapter 1: “Introduction” – the usual intro chapter. This one describes what is meant by “good,” – “the parts that aid in writing programs (or parts of programs) in environments in which Java itself is the appropriate choice of programming language and environment.”

Chapter 2: “The Type System” – “The good part about Java’s type system is that the separation between interface and class allows us to do our semantic design (which has to do with interfaces) separately from our class design (which has to do with implementations)”…. The conclusion is that strong typing and interfaces are good. Why good?

  • semantic design (interfaces) and class design (implementations) can be done separately which “allows us to think about the meaning without thinking about how we are going to implement that meaning, simplifying both tasks.”

Chapter 3: “Exceptions” – The chapter explains exceptions, and why it’s better than the old way of dealing with unexpected values from a function. According to this chapter, if you object to the exception mechanism, you may be one of the “lazy twits who don’t care about writing reliable code”. Why good?

  • separate error handling code to improve readability
  • force programmers to deal with problems as close to where they occur as possible
  • force programmers to deal with exceptions or to consciously ignore them

Chapter 4: “Packages” – Goes over basics of packages, including namespaces, and access control (private/public/protected). I wish I had this section to read when I was first learning Java, especially the part about  package access. Why good?

  • adds “understanding and isolation to your system, making it easier to comprehend, develop, and maintain”

Chapter 5: “Garbage Collection” – Has some interesting history on garbage collection, and explains how it works. The chapter also discusses how memory leaks come about in Java. I found this chapter pretty interesting. Why good?

  • the programmer does not have to do explicit memory management, which reduces bugs

Chapter 6: “The Java Virtual Machine” – This section covers the basics of what a virtual machine is and discusses the security and portability of Java code across JVMs. I totally agree that this is one of the “Good Parts”. Why good?

  • security – extra layer between the program and the computer isolates code from other code on the machine
  • portability – Java binary can run on any operating system that has a JVM: Windows/MAC/Linux/mobile devices etc.

Chapter 7: “Javadoc” – I’m not sure this is a good part of Java, since the documentation is generated by a tool that parses comments in your Java. There are similar systems in other languages, so even though this chapter is interesting, and I learned a couple of things about Javadoc, I don’t agree that this is a “Good Part”. Why good?

  • allows documentation to be embedded alongside the code being documented

Chapter 8: “Collections” – Yup. The interfaces and provided implementations of collections in Java is definitely one of the good parts. The chapter does have examples of using collections and also has a brief description of generics. Why good?

  • built-in collection implementations save time and effort
  • parameterized collection types (generics) allows compiler to guarantee type safety

Chapter 9: “Remote Method Invocation and Object Serialization” – I think this is useful, but I’m not sure if I agree that it’s one of the good parts. Why good?

  • ability to make calls over a network
  • serialization allows an object to be converted to a form that can be used to construct an identical copy of the object at a later time

Chapter 10: “Concurrency” – Best chapter in the book. It’s a nice, concise chapter on multi-threading which has just the right amount of introduction and explanation. Why good?

  • potential for improved performance when apps can have multiple threads running
  • Java was intended to be used to build concurrent programs, so it had language constructs for this from the start

Chapter 11: “The Developer Ecology” – More stuff that’s not part of Java… IDEs, frameworks, and other tools… Every mature language has these. I don’t think this chapter should be here. Why good?

  • save developer’s time and effort
  • “aid in the production of fully tested, bug-minimized code”
Advertisements
This entry was posted in Book Reviews, Java Development. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s