Items related to Java Puzzlers: Traps, Pitfalls, and Corner Cases

Java Puzzlers: Traps, Pitfalls, and Corner Cases - Softcover

  • 4.24 out of 5 stars
    591 ratings by Goodreads
 
9780321336781: Java Puzzlers: Traps, Pitfalls, and Corner Cases

Synopsis

"Every programming language has its quirks. This lively book reveals oddities of the Java programming language through entertaining and thought-provoking programming puzzles."

--Guy Steele, Sun Fellow and coauthor of The Java™ Language Specification

"I laughed, I cried, I threw up (my hands in admiration)."

--Tim Peierls, president, Prior Artisans LLC, and member of the JSR 166 Expert Group

How well do you really know Java? Are you a code sleuth? Have you ever spent days chasing a bug caused by a trap or pitfall in Java or its libraries? Do you like brainteasers? Then this is the book for you!

In the tradition of Effective Java™, Bloch and Gafter dive deep into the subtleties of the Java programming language and its core libraries. Illustrated with visually stunning optical illusions, Java™ Puzzlers features 95 diabolical puzzles that educate and entertain. Anyone with a working knowledge of Java will understand the puzzles, but even the most seasoned veteran will find them challenging.

Most of the puzzles take the form of a short program whose behavior isn't what it seems. Can you figure out what it does? Puzzles are grouped loosely according to the features they use, and detailed solutions follow each puzzle. The solutions go well beyond a simple explanation of the program's behavior--they show you how to avoid the underlying traps and pitfalls for good. A handy catalog of traps and pitfalls at the back of the book provides a concise taxonomy for future reference.

Solve these puzzles and you'll never again fall prey to the counterintuitive or obscure behaviors that can fool even the most experienced programmers.



"synopsis" may belong to another edition of this title.

About the Author

Joshua Bloch is a principal engineer at Google and a Jolt Award-winner. He was previously a distinguished engineer at Sun Microsystems and a senior systems designer at Transarc. Josh led the design and implementation of numerous Java platform features, including JDK 5.0 language enhancements and the award-winning Java Collections Framework. He holds a Ph.D. in computer science from Carnegie Mellon University.

Neal Gafter is a software engineer and Java evangelist at Google. He was previously a senior staff engineer at Sun Microsystems, where he led the development of the Java compiler and implemented the Java language features in releases 1.4 through 5.0. Neal was a member of the C++ Standards Committee and led the development of C and C++ compilers at Sun Microsystems, Microtec Research, and Texas Instruments. He holds a Ph.D. in computer science from the University of Rochester.



Excerpt. © Reprinted by permission. All rights reserved.

Like many books, this one had a long gestation period. We've collected Java puzzles for as long as we've worked with the platform: since mid-1996, in case you're curious. In early 2001, we came up with the idea of doing a talk consisting entirely of Java puzzles. We pitched the idea to Larry Jacobs, then at Oracle, and he bought it hook, line, and sinker.

We gave the first "Java Puzzlers" talk at the Oracle Open World conference in San Francisco in November 2001. To add a bit of pizazz, we introduced ourselves as "Click and Hack, the Type-it Brothers" and stole a bunch of jokes from Tom and Ray Magliozzi of Car Talk fame. The presentation was voted best-in-show, and probably would have been even if we hadn't voted for ourselves. We knew we were on to something.

Dressed in spiffy blue mechanic's overalls emblazoned with the "cup and steam" Java logo, we recycled the Oracle talk at JavaOne 2002 to rave reviews--at least from our friends. In the years that followed, we came up with three more "Java Puzzlers" talks and presented them at countless conferences, corporations, and colleges in cities around the globe, from Oslo to Tokyo. The talks were almost universally well liked, and we got very little fruit thrown at us. In the March 2003 issue of Linux Magazine, we published an article consisting entirely of Java puzzles and received almost no hate mail. This book contains nearly all the puzzles from our talks and articles and many, many more.

Although this book draws attention to the traps and pitfalls of the Java platform, we do not mean to denigrate it in any way. It is because we love the Java platform that we've devoted nearly a decade of our professional lives to it. Every platform with enough power to do real work has some problems, and Java has far fewer than most. The better you understand the problems, the less likely you are to get hurt by them, and that's where this book comes in.

Most of the puzzles in the book focus on short programs that appear to do one thing but actually do something else. That's why we've chosen to decorate the book with optical illusions--drawings that appear to be one thing but are actually another. Also, you can stare at them while you're trying to figure out what in the world the programs do.

Above all, we wanted this book to be fun. We sincerely hope that you enjoy solving the puzzles as much as we enjoyed writing them and that you learn as much from them as we did.

And by all means, send us your puzzlers! If you have a puzzle that you think belongs in a future edition of this book, write it on the back of a $20 bill and send it to us, or e-mail it to puzzlers@javapuzzlers.com. If we use your puzzle, we'll give you credit.

Last but not least, don't code like my brother.

Josh Bloch
Neal Gafter
San Jose, California
May 2005



032133678XP06102005

"About this title" may belong to another edition of this title.

  • PublisherAddison-Wesley Professional
  • Publication date2005
  • ISBN 10 032133678X
  • ISBN 13 9780321336781
  • BindingPaperback
  • LanguageEnglish
  • Edition number1
  • Number of pages312
  • Rating
    • 4.24 out of 5 stars
      591 ratings by Goodreads

Buy Used

Condition: Fair
This copy has clearly been enjoyedâ"expect... View this item

Shipping: FREE
Within U.S.A.

Destination, rates & speeds

Add to basket

Search results for Java Puzzlers: Traps, Pitfalls, and Corner Cases

Seller Image

Bloch, Joshua; Gafter, Neal
Published by Addison-Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: Dream Books Co., Denver, CO, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: acceptable. This copy has clearly been enjoyedâ"expect noticeable shelf wear and some minor creases to the cover. Binding is strong, and all pages are legible. May contain previous library markings or stamps. Seller Inventory # DBV.032133678X.A

Contact seller

Buy Used

US$ 5.12
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch, Joshua, Gafter, Neal
Published by Addison Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: Better World Books: West, Reno, NV, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: Very Good. Former library book; may include library markings. Used book that is in excellent condition. May show signs of wear or have minor defects. Seller Inventory # GRP90705445

Contact seller

Buy Used

US$ 6.63
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch, Joshua, Gafter, Neal
Published by Addison Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: Better World Books, Mishawaka, IN, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: Good. Used book that is in clean, average condition without any missing pages. Seller Inventory # 4661187-6

Contact seller

Buy Used

US$ 6.63
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch, Joshua, Gafter, Neal
Published by Addison Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: Better World Books: West, Reno, NV, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: Good. Former library book; may include library markings. Used book that is in clean, average condition without any missing pages. Seller Inventory # 9060491-6

Contact seller

Buy Used

US$ 6.63
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch, Joshua, Gafter, Neal
Published by Addison Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: Better World Books, Mishawaka, IN, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: Good. Former library book; may include library markings. Used book that is in clean, average condition without any missing pages. Seller Inventory # 9060491-6

Contact seller

Buy Used

US$ 6.63
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch, Joshua, Gafter, Neal
Published by Addison Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: Better World Books: West, Reno, NV, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: Very Good. Used book that is in excellent condition. May show signs of wear or have minor defects. Seller Inventory # 5755409-6

Contact seller

Buy Used

US$ 6.63
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Seller Image

Bloch, Joshua; Gafter, Neal
Published by Addison-Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: ZBK Books, Carlstadt, NJ, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: acceptable. Used book - May contain writing, notes, highlighting, bends or folds. Text is readable, book is clean, and pages and cover mostly intact. May show normal wear and tear. Item may be missing CD. May include library marks. Fast Shipping. Seller Inventory # ZWM.M1D1

Contact seller

Buy Used

US$ 6.68
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch / Gafter, Joshua Bloch / Neal Gafter
Published by Addison-Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Softcover

Seller: SecondSale, Montgomery, IL, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Condition: Good. Item in good condition. Textbooks may not include supplemental items i.e. CDs, access codes etc. Seller Inventory # 00084884120

Contact seller

Buy Used

US$ 7.36
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch, Joshua; Gafter, Neal
Published by Addison-Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Paperback

Seller: ThriftBooks-Atlanta, AUSTELL, GA, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Paperback. Condition: As New. No Jacket. Pages are clean and are not marred by notes or folds of any kind. ~ ThriftBooks: Read More, Spend Less 1.32. Seller Inventory # G032133678XI2N00

Contact seller

Buy Used

US$ 7.43
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

Stock Image

Bloch, Joshua; Gafter, Neal
Published by Addison-Wesley Professional, 2005
ISBN 10: 032133678X ISBN 13: 9780321336781
Used Paperback

Seller: ThriftBooks-Phoenix, Phoenix, AZ, U.S.A.

Seller rating 5 out of 5 stars 5-star rating, Learn more about seller ratings

Paperback. Condition: Good. No Jacket. Pages can have notes/highlighting. Spine may show signs of wear. ~ ThriftBooks: Read More, Spend Less 1.32. Seller Inventory # G032133678XI3N00

Contact seller

Buy Used

US$ 7.43
Convert currency
Shipping: FREE
Within U.S.A.
Destination, rates & speeds

Quantity: 1 available

Add to basket

There are 18 more copies of this book

View all search results for this book