aspose file tools*
The moose likes Book Reviews and the fly likes Java Puzzlers : Traps, Pitfalls, and Corner Cases by Joshua Bloch, Neal Gafter Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Books » Book Reviews
Bookmark "Java Puzzlers : Traps, Pitfalls, and Corner Cases by Joshua Bloch, Neal Gafter" Watch "Java Puzzlers : Traps, Pitfalls, and Corner Cases by Joshua Bloch, Neal Gafter" New topic
Author

Java Puzzlers : Traps, Pitfalls, and Corner Cases by Joshua Bloch, Neal Gafter

Book Review Team
Bartender

Joined: Feb 15, 2002
Posts: 943
<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.

Truly an enjoyable book!

Full Disclosure: I received a free copy of this book for review.
More info at Amazon.com
More info at Amazon.co.uk
Burak Celebi
Greenhorn

Joined: Feb 08, 2005
Posts: 14
this is one of the best books I have ever read, highly recommended!
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

It seems you can never go wrong buying a book with Joshua Bloch's name on it.

Mark


Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

Florian Heinisch
Greenhorn

Joined: Mar 03, 2005
Posts: 15
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?
John Wetherbie
Rancher

Joined: Apr 05, 2000
Posts: 1449
javapuzzlers.com seems to be up as of Sept 13, 2005. I downloaded the zip file as a test.


The only reason for time is so that everything doesn't happen all at once.
- Buckaroo Banzai
Joshua Bloch
Author and "Sun God"
Ranch Hand

Joined: May 30, 2001
Posts: 124
Folks,

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.

Regards,

Josh
[ September 14, 2005: Message edited by: Joshua Bloch ]

Joshua Bloch <br />Author of <a href="http://www.amazon.com/exec/obidos/ASIN/0201310058/ref=ase_electricporkchop" target="_blank" rel="nofollow">Effective Java</a> and coauthor of <a href="http://www.amazon.com/exec/obidos/ASIN/032133678X/ref=ase_electricporkchop" target="_blank" rel="nofollow">Java Puzzlers</a>
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

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
Joshua Bloch
Author and "Sun God"
Ranch Hand

Joined: May 30, 2001
Posts: 124
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."

Regards,

Josh
Book Review Team
Bartender

Joined: Feb 15, 2002
Posts: 943
<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.


More info at Amazon.com
More info at Amazon.co.uk
Tim McGuire
Ranch Hand

Joined: Apr 30, 2003
Posts: 820

I want to get this book, but first I want to find out: Is this book still relatively current?
Mark Spritzler
ranger
Sheriff

Joined: Feb 05, 2001
Posts: 17257
    
    6

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.

Mark
Alexander Sales
Ranch Hand

Joined: Feb 21, 2011
Posts: 89

I want to buy this book. How much is this book if I will buy it somewhere in USA?


OCPJP 6, OCEWCD Java EE 6
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39415
    
  28
There is an Amazon link in the first posting. You could also try places like Alibris and bookdepository.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Java Puzzlers : Traps, Pitfalls, and Corner Cases by Joshua Bloch, Neal Gafter