Buy Used
Used - Good See details
$3.89 & eligible for FREE Super Saver Shipping on orders over $25. Details

or
Sign in to turn on 1-Click ordering.
 
   
Have one to sell? Sell yours here
Java Pitfalls: Time-Saving Solutions and Workarounds to Improve Programs
 
 
Tell the Publisher!
I'd like to read this book on Kindle

Don't have a Kindle? Get your Kindle here, or download a FREE Kindle Reading App.

Java Pitfalls: Time-Saving Solutions and Workarounds to Improve Programs [Paperback]

Michael C. Daconta (Author), Eric Monk (Author), J. Paul Keller (Author), Keith Bohnenberger (Author)
4.0 out of 5 stars  See all reviews (19 customer reviews)


Available from these sellers.


Textbook Student FREE Two-Day Shipping for Students. Learn more


Book Description

0471361747 978-0471361749 April 20, 2000 1
A lifesaver for any Java programmer-proven workarounds and time-saving solutions Although using the Java language provides a substantial boost to a programmer's productivity, it still has its share of subtleties andweaknesses. This book is designed to save you time and frustration by carefully guiding you through this potential minefield. A team of Java experts, led by programming guru Michael Daconta, offers a collection of proven solutions to 50 difficult, real-world problems chosen from their own extensive experiences. You'll find workarounds for problems caused by shortcomings in both the Java language itself and in its APIs and utilities, including java.util, java.io, java.awt, and javax.swing. The authors also share techniques for improving the performance of your Java applications.

For easy reference, the book is organized into categories so that similar solutions are grouped together.

Examples of topics covered include:
* Language syntax, for example, using the String equals( ) method instead of the == operator (Item2)
* Language support, for example, method dispatching with reflection, interfaces, and anonymous classes (Item 16)
* Utilities and collections, like choosing between a PropertyFile and ResourceBundle (Item 20)
* Input/output, including subtleties in sending serialized objects over a network (Item 25)
* GUI presentation, for example, tackling the common pitfall of using repaint( ) instead of validate( ) for relaying out components (Item 29)
* Performance, including tips like lazy loading your way to better performance (Item 43)

Customers Who Bought This Item Also Bought


Editorial Reviews

Review

"Any programmers office would benefit from having at lest one copy of this book hanging around." (Application Development Adviser, September 2000)

"I found the book useful..."(Cvu, February 2001)

From the Author

The introduction describes a pitfall as "code that compiles fine but when executed produces unintended and sometimes disastrous results." Saving developers frustration and time by pointing out these traps is the primary motivation for both this book and my JavaWorld column. This book is not a book on effective design or design patterns but instead offers hard-won, practical experience. It is those proven solutions both in the language and beyond the language (in util, io and swing) that our readers have benefited from. Best wishes, - Mike Daconta

Product Details

  • Paperback: 336 pages
  • Publisher: Wiley; 1 edition (April 20, 2000)
  • Language: English
  • ISBN-10: 0471361747
  • ISBN-13: 978-0471361749
  • Product Dimensions: 9 x 7.5 x 0.6 inches
  • Shipping Weight: 1.3 pounds
  • Average Customer Review: 4.0 out of 5 stars  See all reviews (19 customer reviews)
  • Amazon Best Sellers Rank: #2,041,743 in Books (See Top 100 in Books)

More About the Author

Discover books, learn about writers, read author blogs, and more.

 

Customer Reviews

19 Reviews
5 star:
 (12)
4 star:
 (1)
3 star:
 (2)
2 star:
 (2)
1 star:
 (2)
 
 
 
 
 
Average Customer Review
4.0 out of 5 stars (19 customer reviews)
 
 
 
 
Share your thoughts with other customers:
Most Helpful Customer Reviews

46 of 49 people found the following review helpful:
5.0 out of 5 stars Excellent and practical guide for all Java developers, July 24, 2000
By 
David Reilly (Gold Coast, Queensland Australia) - See all my reviews
(REAL NAME)   
This review is from: Java Pitfalls: Time-Saving Solutions and Workarounds to Improve Programs (Paperback)
I've reviewed quite a few Java books about improving the attributes of Java software. Some concentrate on improving the design, others the robustness of software or the performance. While they usually start out promising, by the end of the book you're left with a good understanding of theory but little practical skills. Java Pitfalls : Time-Saving Solutions and Workarounds to Improve Programs, breaks free of that mould, by providing a wealth of techniques and code that has real practical application. The title does not do it justice, however. Not only does the book show you how to improve programs, the advice contained within also saves you time, frustration, and effort.

After reading through even a few pages of tips within the book, you understand that the advice isn't dry theory, but practical advice gained from real-life problems that Java developers face. Michael Daconta, and his co-authors, offer warnings gained from the trenches of software development using Java.

The book is divided neatly into eight sections, covering different aspects of Java programming. A wide range of areas are covered, from the obligatory Java language syntax, to more fun topics like graphical user interfaces (using AWT and Swing), the utilities package and collections, input and output (I/O), and even improving Java performance. The one significant area lacking from the book, in my opinion, is a section on network programming pitfalls, and perhaps other advanced topics like databases. These areas are fraught with pitfalls for the unwary. However, for readers not involved with such areas, this is a moot point, and it leaves more room for other tips.

There are a total of 50 individual pieces of advice, and each is packed full of detailed code examples. Whether you're a Java newbie, or an experienced Java developer looking to improve your coding and reduce the frustration and time of software development, Java Pitfalls is an ideal addition to your book collection. With the usefulness of this advice, you'll probably find it taking a place on your desk though, rather than the bookshelf. -- David Reilly, reviewed for the Java Coffee Break

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


18 of 18 people found the following review helpful:
3.0 out of 5 stars Beware the Pitfalls in this Book, May 12, 2001
By 
"schapel" (Hillsborough, NJ USA) - See all my reviews
This review is from: Java Pitfalls: Time-Saving Solutions and Workarounds to Improve Programs (Paperback)
This book explains some of the more common pitfalls in Java programming. While I can't totally disagree with the any of the suggestions on avoiding the pitfalls, the explanations the authors give are often incomplete and confusing.

Take, for example Item 17, where three pages are devoted to explaining what exceptions are. Then there is an example of catching an exception, printing some diagnostics, and re-throwing exactly the same exception. Suddenly, the topic veers to catching OutOfMemoryError. Where is the explanation of the pitfall of mistakenly catching exceptions when they should not be caught, or catching Exception instead of a subclass of Exception? In my experience, these are the pitfalls that Java programmers are more likely to run into. The authors simply didn't explain how 95% of exception handling code should be written.

Another example is Item 12, where synchronization is introduced in five pages. The pitfalls I see Java programmers falling into is believing that only one synchronized method in a class may be called at a time, not understanding how static methods are synchronized, and not understanding memory barriers. The authors skip right over those topics and start discussing how to avoid deadlocks.

In my first hour of looking through the book, I also found the authors confusing references with objects, passing a reference by value with passing an object by reference, setting references to null and calling System.gc() with rational memory management, exponential growth with quadratic growth, simple assertions with design by contract programming, the semantics of the C assert macro with the semantics of a Java assertion method, the Adapter pattern with a simple superclass, and the Java import statement with the #include directive of C. All of these are pitfalls that Java programmers often run into.

Also be aware that nearly half of the book covers GUI pitfalls. This part of the book will be of no use to server-side Java programmers. I can recommend this book only to intermediate-to-advanced Java programmers who write GUI code, and only in addition to other books on Java style or idioms.

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No


21 of 22 people found the following review helpful:
4.0 out of 5 stars Good book, June 26, 2000
By 
ZhongDan LAN (Newark, New Jersey, USA) - See all my reviews
(REAL NAME)   
This review is from: Java Pitfalls: Time-Saving Solutions and Workarounds to Improve Programs (Paperback)
Pros:

*)Covers a lot of java topics, from language syntax, API (JFC) to performance issues.

*)Concrete, real examples.

*)OO design issues, as MVC patterns, lazy evaluation, etc.

*)Some issues are java related, which have different behaviors in C++, as "Passing Primitive by Reference", "Boolean Logic and Short-Circuit Operators", well done.

Cons:

*)Explanation can be deeper, and clearer.

*)No contributions to enterprise java: javabean, JDBC, RMI, Servlet, JSP, EJB.

*)Some explanations are not accurate: for example: Abstract methods must be overridden should be replaced by "Abstract methods must be overridden in CONCRETE classes".

*)No references at the end of the book, <Effective C++>>, <<Design Patterns>> can be listed.

Suggestion:

Buy this book with <<Practical Java Programming Language Guide: The Addison-Wesley Professional Computing Series>> (ISBN: 0201616467) and/or <<The Elements of Java Style>> (ISBN: 0521777682).

Help other customers find the most helpful reviews 
Was this review helpful to you? Yes No

Share your thoughts with other customers: Create your own review
 
 
 
Most Recent Customer Reviews











Only search this product's reviews



Inside This Book (learn more)
First Sentence:
The Java language is a derivative of the C++ language with some features borrowed from Objective C, Eiffel, Smalltalk, Mesa, and Lisp. Read the first page
Key Phrases - Statistically Improbable Phrases (SIPs): (learn more)
greeting method, public object clone, implementing clone, writeobj ect, clipboard object, invalid components, readobj ect, object pools, deadlock scenario, method dispatching, public static void, layout manager, serialized objects, debugging statements, system clipboard, interface pointer, shallow copy, native implementation, dynamic class loading, calling component, constant pool, debug flag, code that follows, property file, deep copy
Key Phrases - Capitalized Phrases (CAPs): (learn more)
Farmer Rick, Java Language Specification, User Name, Add Images, Called Fool, Add Notify, Add Text Field, Cache Entry, Farmer Bob, Java Virtual Machine, Properties Object Pitfalls, Remove Notify, Remove Text Field, Image Copy, Invalidate Mystery, Re-Layout of Components, Solving the Validate, Test Notify User, Usage of String, View Mail, Wiley Web, Cancel Figure, Lazy Loading Our Way, Method Not Really Overridden, Purple Weight
New!
Books on Related Topics | Concordance | Text Stats
Browse Sample Pages:
Front Cover | Table of Contents | First Pages | Index | Back Cover | Surprise Me!
Search Inside This Book:




What Other Items Do Customers Buy After Viewing This Item?


Tags Customers Associate with This Product

 (What's this?)
Click on a tag to find related items, discussions, and people.
 
(2)

Your tags: Add your first tag
 

Sell a Digital Version of This Book in the Kindle Store

If you are a publisher or author and hold the digital rights to a book, you can sell a digital version of it in our Kindle Store. Learn more

Customer Discussions

This product's forum
Discussion Replies Latest Post
No discussions yet

Ask questions, Share opinions, Gain insight
Start a new discussion
Topic:
First post:
Prompts for sign-in
 


Active discussions in related forums
Search Customer Discussions
Search all Amazon discussions
   
Related forums



So You'd Like to...


Create a guide


Look for Similar Items by Category


Look for Similar Items by Subject