<pre>Author/s : Joshua Bloch, Neal Gafter Publisher : Addison-Wesley Professional Category :Advanced Java Review by : John Wetherbie Rating : 9 horseshoes</pre> This is a fun book that's educational, too! The purpose is to help the reader learn about traps you can fall into coding in Java through the use of code puzzles. There are 95 puzzlers with each puzzle and associated solution discussion running two to three pages each. Appendix A provides a quick summary of the various traps identified in the book and the puzzlers in which they appeared. Appendix B describes the optical illusions scattered throughout the book.
In general each puzzler has a very short description of what the program appears to do and the program itself. It is your job to figure out what the program actually does and more importantly why. The following page is a discussion of why the program actually does what it does. Important points and traps to avoid are bolded in the discussion. Note that some of the puzzlers depend on you having Java 1.5.
Bloch and Gafter want you to think about and be aware of the language features and APIs you are using along with having fun. Read the description and the code, determine what the code does, run the code, and then, in most cases, rethink your analysis. Then read the solution and think about what the authors are saying. Go read the sections of the Java Language Specification or other references mentioned in the solution.
I tried to download the puzzles's source code but unfortunately www.javapuzzlers.com seems to be down. I also tried Addison-Wesley's website but there is not code available. Does anybody know where else to get the puzzles' source code?
Thanks for all the kind words! Regarding www.javapuzzlers.com, it is Neal's personal server, and he had router troubles Everything's fixed now By the way, I plan to replace the present site with a fancy new one in a couple of days. The new site will have errata, animated illusions, and who knows what else.
Hey, should we be changing that "Sun God" to something more current, or ya likes what ya got?
Make visible what, without you, might perhaps never have been seen. - Robert Bresson
Author and "Sun God"
Joined: May 30, 2001
Three cheers for the Sun God He sure is a fun God Ra, Ra, Ra!
There, just had to get that out of my system No seriously, I don't care what you call me as long as it isn't "loser."
Book Review Team
Joined: Feb 15, 2002
<pre> Review by : Ernest J. Friedman-Hill Rating : 9 horseshoes</pre> First, let's get this out of the way: you're not as smart as you think you are. Seriously. You don't know everything about Java. It's possible, however, that these authors do.
"Java Puzzlers" shows you more tricky corners of the Java language than you ever expected could exist. Not odd behaviors of obscure API classes, not failings of a particular implementation, but known consequences of the language specification itself. Each puzzler, written in an engaging and often humorous style, gives you a chance to figure things out for yourself before lowering the boom to let you know that, once again... you're wrong.
If you read this book and take its message to heart, you'll learn to avoid the dark alleys of Java, making sure your programs will never inadvertently become puzzlers for you or those who come after you.
Tim McGuire wrote:I want to get this book, but first I want to find out: Is this book still relatively current?
Actually it is. Because there really hasn't been any real changes to the Java language in a long time. The puzzles in the book also are very rooted in Core Java like the wrappers, primitives, Collections and Unicode, which haven't changed in an even longer time. So the puzzles are still valid today.