Tuesday 26 June 2012

[J856.Ebook] Get Free Ebook Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter

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

Reviewing Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter is a very valuable interest as well as doing that can be undertaken whenever. It indicates that reviewing a book will certainly not limit your task, will certainly not force the moment to spend over, and will not invest much cash. It is a very inexpensive and also obtainable point to purchase Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter But, with that said very inexpensive point, you can obtain something new, Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter something that you never ever do as well as get in your life.

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

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



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

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

Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter. The established modern technology, nowadays sustain everything the human demands. It includes the daily tasks, tasks, office, home entertainment, and also much more. Among them is the fantastic internet connection as well as computer system. This problem will relieve you to sustain one of your pastimes, reading routine. So, do you have eager to review this book Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter now?

Yet, just what's your matter not as well enjoyed reading Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter It is a fantastic task that will consistently offer fantastic benefits. Why you come to be so strange of it? Several things can be practical why people don't like to read Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter It can be the uninteresting activities, guide Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter compilations to read, even lazy to bring spaces almost everywhere. Now, for this Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter, you will start to like reading. Why? Do you know why? Read this web page by completed.

Starting from visiting this site, you have aimed to begin loving reviewing a book Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter This is specialized website that sell hundreds collections of publications Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter from whole lots resources. So, you won't be burnt out anymore to choose guide. Besides, if you additionally have no time at all to browse the book Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter, merely sit when you remain in office and open the internet browser. You could locate this Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter lodge this site by attaching to the internet.

Obtain the connect to download this Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter and start downloading. You can really want the download soft file of guide Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter by undertaking other tasks. Which's all done. Currently, your resort to read a book is not always taking and lugging guide Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter everywhere you go. You could conserve the soft documents in your gadget that will never ever be far away as well as read it as you such as. It resembles reviewing story tale from your gizmo then. Currently, start to enjoy reading Java Puzzlers: Traps, Pitfalls, And Corner Cases, By Joshua Bloch, Neal Gafter as well as get your brand-new life!

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

"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.



  • Sales Rank: #361506 in Books
  • Published on: 2005-07-04
  • Original language: English
  • Number of items: 1
  • Dimensions: 9.10" h x .90" w x 7.40" l, 1.33 pounds
  • Binding: Paperback
  • 312 pages

From the Back Cover

""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(TM) 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(TM)," Bloch and Gafter dive deep into the subtleties of the Java programming language and its core libraries. Illustrated with visually stunning optical illusions, "Java(TM) 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.

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

Most helpful customer reviews

110 of 114 people found the following review helpful.
Ooh. Ow. Ouch. Eek. Argh. ... Aha.
By Bob Carpenter
My wife popped this book open after dinner. Big mistake -- we had planned to spend the night watching Firefly on DVD. She read the first puzzle. We went to the blackboard (yes, we're so geeky and our NY apartment's so small that there's a blackboard in the dining nook). Between us, we had half a dozen possible answers about what a three-line program was going to do. We found at least four boundary conditions and were pretty sure about two of them. For the record, the first puzzle she opened to involved the compound XOR assignment statement x^=y^=x^=y. They're not all that bit-fiddly; some of the other puzzles include class and method mazes, integer or double arithmetic oddities, unexpected exception/initialization interactions, string/charset twistiness, etc.

I thought I'd be good at this kind of puzzle. As an academic, I wrote about programming languages. I read Bloch's "Effective Java" book. Twice. I follow its advice religously and make my coworkers read it. I've read most of the source code for String, StringBuffer and the collections framework and I/O streams. I just came off a week-long coding project where I did exclusively bit-level I/O with all the shifts and masks you could ask for. I was wrong. I got about 1/5 of the puzzles right if I give myself partial credit for diagnosing the boundary condition in the question and having the right answer be in my top two or three guesses.

Unless you've written the bit fiddling parts of a JVM implementation, or are the kind of person who can remember minute details of the specification, you'll most likely suffer. And love it. Then you can relate the puzzles at gatherings of geeks and look on with a smug grin as they twist in the wind. These would be perfect interview questions for a sadistic HR person.

Overall, this book's a jaw-dropping, eye-opening, brain-melting overview of the kind of boundary conditions you can run into with very simple constructions. Most of the puzzles seem to involve implicit conversions done by the JVM, some involve 1.5 features, some involve class inheritance, others exceptions. Almost all of the puzzles contain links to the boundary-condition definition in the Java language spec.

I'll do better next time. Really.

29 of 30 people found the following review helpful.
Unique book finds pitfalls in both programs and the language itself
By calvinnme
This book is filled with brainteasers about the Java programming language and its core libraries. Anyone with a working knowledge of Java can understand these puzzles, but many of them are tough enough to challenge even the most experienced programmer. Puzzlers are grouped according to the features they use, but you cannot assume that the trick to a puzzle is related to its chapter heading.

Most of the puzzles exploit counterintuitive or obscure behaviors that can lead to bugs. Every platform has them, but Java has far fewer than other platforms of comparable power. The goal of the book is to entertain the reader with puzzles while teaching you to avoid the underlying traps and pitfalls. By working through the puzzles, you become less likely to fall prey to these dangers in your own code and more likely to spot them the code of others over which you have maintenance priveleges.

This book is meant to be read while you have access to a computer that has a Java development environment installed, ideally JDK 5.0, which is the latest release at the time I am writing this. That is because some of the puzzles rely on pitfalls in this particular release of Java.

Most of the puzzles take the form of a short program that appears to do one thing but actually does something else. It's the reader's job to figure out what each program does. It would be best if you first study the program/puzzle and determine what you think it will do. Next, run the program and see if its expected behavior matches its actual behavior. Try to fix the program if you believe it is "broken". Finally, read the solution and see if it matches your answer. What is really great about this book is that it sticks to pitfalls in the core language and doesn't delve into any of the add-on API's or J2EE. You'll be surprised that so many pitfalls can be conjured up in the core language. Amazon does not show the table of contents, so I do that here along with a brief description of the type of puzzles in each chapter.

1. Introduction
2. Expressive Puzzles - The puzzles in this chapter are simple but not necessarily easy and involve only expression evaluation. My personal favorite : the statement "System.out.println(2.00 - 1.10);" displays 0.8999999999999999 instead of .9. There is a solution, but it is not pretty and showcases a pretty bad weakness in the Java language.
3. Puzzlers with Character - This chapter contains puzzles that concern strings, characters, and other textual data. This section contains several puzzles involving unicode characters, and one is a cautionary tale for language designers in character overloading. Example: System.out.print('H' + 'a'); prints the number 169 not the word "Ha" as you might imagine.
4. Loopy Puzzlers - All the puzzles in this chapter concern loops, such as coming up with declarations that turn simple loops into infinite ones.
5. Exceptional Puzzlers - The puzzles in this chapter concern exceptions and the closely related Try-finally statement. Most exhibit odd behavior such that simple changes in the program cause completely different types of exception handling to occur.
6. Classy Puzzlers - This chapter contains puzzlers that concern the use of classes and their instances, methods, and fields.
7. Library Puzzlers - The puzzles in this chapter concern basic library-related topics, such as Object methods, collections, Date, and Calendar. One particularly interesting puzzler illustrates that, in Java, integer literals beginning with a "0" are interpreted as octal values. This obscure construct is a holdover from the C programming language and the 1970s, when octal was much more commonly used than today. Thus "012" is seen by Java as 10 base 10.
8. Classier Puzzlers - The puzzles in this chapter concern inheritance, overriding, and other forms of name reuse.
9. More Library Puzzlers - The puzzles in this chapter feature more advanced library topics, such as threading, reflection, and I/O. Here you will learn, for example, that "write(int)" is the only Java output method that does not flush a PrintStream on which automatic flushing is enabled. Thus you must explicitly invoke "flush" on its stream to print any message, making the "write" method seem unfriendly and outright pointless.
10. Advanced Puzzlers - The puzzles in this chapter concern advanced topics, such as nested classes, generics, serialization, and binary compatibility.
A. Catalog of Traps and Pitfalls - This chapter contains a concise taxonomy of traps and pitfalls in the Java platform. Each entry in the catalog is divided into three parts - A short description of the pitfall, how to avoid the trap, and pointers to additional information on the trap.
B. Notes on the Illusions - This appendix contains brief descriptions of the graphical illusions that appear throughout the book. The descriptions are grouped loosely by category. Within each category, the order is roughly chronological.

This book is very good practice for anybody who enjoys programming in the Java language, but it will probably appeal the most to the geekiest among us of which I proudly count myself.

19 of 19 people found the following review helpful.
Most Excellent
By Kevin J. Schmidt
Many C and C++ books exist that discuss traps and pit falls with each language. Now Java has such a book. This book is fun to read and will challenge even the best Java programmers. Be sure to get the source code from [...] Study each puzzle and try figure out what it does or does not do. Then run the example code and see if you were right. If you weren't right, then try to figure out why you guessed wrong and figure out how to fix the program. Then turn the page and read the solution.

Working through the puzzlers is not only fun, but it will definitely make you a much better Java programmer and a better troubleshooter.

See all 44 customer reviews...

Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter PDF
Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter EPub
Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter Doc
Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter iBooks
Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter rtf
Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter Mobipocket
Java Puzzlers: Traps, Pitfalls, and Corner Cases, by Joshua Bloch, Neal Gafter Kindle

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

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

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

No comments:

Post a Comment