did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

did-you-know? rent-now

Amazon no longer offers textbook rentals. We do!

We're the #1 textbook rental company. Let us show you why.

9780072125627

Debugging Java: Troubleshooting for Programmers

by
  • ISBN13:

    9780072125627

  • ISBN10:

    0072125624

  • Format: Paperback
  • Copyright: 2000-06-01
  • Publisher: Lightning Source Inc
  • Purchase Benefits
  • Free Shipping Icon Free Shipping On Orders Over $35!
    Your order must be $35 or more to qualify for free economy shipping. Bulk sales, PO's, Marketplace items, eBooks and apparel do not qualify for this offer.
  • eCampus.com Logo Get Rewarded for Ordering Your Textbooks! Enroll Now
List Price: $39.99 Save up to $0.77
  • Buy New
    $39.22
    Add to Cart Free Shipping Icon Free Shipping

    USUALLY SHIPS IN 2-3 BUSINESS DAYS

Supplemental Materials

What is included with this book?

Summary

Troubleshooting reference for the Java programmer. Author's computer science teaching experience led him to discover the importance of debugging. His research showed that people who learn debugging skills first, master computer languages markedly faster. Stands alone and can be paired with other Debugging titles covering C++, ASP, and other technologies. Filled with solutions to common and rare bugs. Proactive focus helps developers identify bad coding habits and adopt strategies to build clean code.

Table of Contents

Acknowledgments xiii
Introduction xv
Part I Begin with Bugproof Code
You'll Never Catch'em All!
3(12)
The Proof
4(5)
Worksheet
5(1)
Neither Debugging nor Testing Finds All Bugs
6(3)
It Gets Worse
9(1)
Code Must Shun Bugs from the Start
10(5)
Prevent Java Bugs from Hatching
15(18)
Development Philosophy
16(7)
Left Brain ⟺ Right Brain
17(2)
How to Become More Creative
19(3)
How to Be More Organized
22(1)
Programmers Build; Testers Break
22(1)
Documents First
23(4)
User Manual First
24(1)
Getting a Firm Signoff
25(1)
User Manual Becomes Programming Specifications
26(1)
Learn to Love Javadoc
27(2)
Risky Elements Before Safe Ones
29(4)
Handle Surprises Early, Not Late
29(2)
Avoid Deadline Pressure
31(2)
Setting Java Bug Traps
33(24)
Instrument Your Code
34(19)
Code Instruments
34(3)
Java Exceptions, Detailed
37(2)
Exceptions Advance the State of the Art
39(7)
Coding to Handle Exceptions
46(2)
Nesting the try Block
48(1)
throw
49(1)
The throws Keyword
50(3)
Bugs Hiding Phantom Bugs
53(1)
Practice Generating Bugs
54(1)
Autolog the Results
54(3)
Never Miss Another Deadline! Risk-Factor Analysis
57(8)
Use Risk-Factor Analysis (RFA)
59(3)
Why Is RFA Important to Debugging Java?
62(3)
Write to Shun Bugs
65(54)
Common Word Processors
66(15)
Using Microsoft Word
68(13)
Use the Best Java Editor You Can
81(1)
Editing Tricks
82(9)
Make Typos Identify Themselves
85(1)
Extend Your Copy/Paste Buffer
86(2)
Teach AutoCorrect to Cut Errors and Save Typing
88(3)
Train Your Spell Checker
91(1)
Write in the First-Last-Middle Sequence
92(1)
The QQQ Bookmark
93(1)
Holey 3 x 5 Card Trix
94(4)
Use a Known Subset of Java
98(1)
Comment First, Code Later
99(1)
Memorize the Differences Between Languages
99(11)
Java and C/C++
100(5)
Major Differences Between Java and Visual Basic (VB)
105(5)
Integrated Development Environments (IDEs)
110(6)
JBuilder
110(3)
JDK Commander
113(1)
Majo
113(1)
VisualCafe
113(3)
Classes of Bugs
116(3)
Part II Removing Java Bugs
Classes of Bugs
119(46)
Design Bugs
120(3)
Conditions Come in Powers of Two
120(3)
Syntax Bugs
123(16)
Code Generators
123(4)
The Future of Code Generators
127(2)
Lint-like Checkers
129(10)
Logic Bugs
139(6)
Actual Errors in Logic
140(5)
Solve All Mysteries
145(1)
Mathematical Bugs
146(11)
Math Near the Limits
147(2)
Booleans
149(3)
Unusual Operators: Shifts
152(5)
Unusual Bugs
157(2)
Side-Effect Bugs
159(1)
Optimizer-Caused Bugs
159(2)
Pseudo Bugs
161(4)
Mental Disciplines
165(14)
How to Think Consistently
166(8)
Use Inviolate Personal Conventions
166(8)
Don't Mix Depth-First Searches and Breadth-First Searches
174(1)
When to Debug
175(1)
Your Environment
176(3)
The Awesome Power of Debuggers
179(44)
Java Debugger (JDB) is Free
181(3)
Installing
181(1)
Overview
181(1)
Command Reference
182(2)
Third-Party Debuggers
184(39)
Assure
185(8)
JBuilder
193(9)
JProbe
202(7)
Visual Cafe
209(14)
Debugging Stratagems
223(14)
Assemble the Best Resources
224(1)
Bug Isolation
225(11)
Start Changing Things
226(1)
The Shotgun Approach
227(1)
Debugging via Reasoning
227(3)
Binary Bug Searches
230(4)
Testing
234(2)
Ask Questions When You're Stuck
236(1)
Testing
237(36)
Localize and Squash Bugs
238(15)
Instrument Your Code
238(1)
Conditional Compiling
239(1)
Where the Bugs Are
240(8)
Black-Box Testing
248(1)
White-Box Testing
249(2)
All Logic Testing
251(2)
Build Better Fly Swatters
253(16)
Macro Recorder
253(1)
Best Practices Analyzer
253(2)
Static Coverage Analyzer
255(1)
Dynamic Coverage Analyzer
255(1)
Bug Tracker
255(2)
Test Data Assistant
257(1)
When to Stop Testing
258(7)
Sowing Error Seeds
265(1)
You Need a Second Computer
266(3)
Commercial Software Tools for Java
269(4)
The Threaded Environment
273(28)
Ancient Parallel Algorithms Revisited
276(2)
Parallel Computing Bugs
278(9)
Daemon and User Threads
278(1)
Java's Inherent Protection
279(1)
Loop Parallelization
279(1)
Handling Input and Output
280(2)
Asynchronous Tasks
282(1)
Timers
283(1)
Time-Sensitive Thread Bugs
284(3)
Preventing Thread Clashes
287(11)
Spin Locks to the Rescue!
289(2)
Locks Using Monitors and Semaphores
291(3)
More on Monitors and Semaphores
294(1)
Some of the Best Thread Practices
295(2)
Performance Issues
297(1)
Thread Safety
298(1)
Prevention
298(3)
The One That Got Away
301(30)
How Users Perceive Bugs
302(6)
Make Your Client Love You
305(3)
Bugs Confuse, by Definition
308(1)
What Else Can Go Wrong?
309(1)
Elements of the Perfect Error Message
309(6)
Speak the User's Language
309(1)
Eschew Concision
309(1)
Choose Words Carefully
310(1)
Be Sure to Spell a Word Wrong
310(1)
Contriteness Never Hurts
311(1)
Total Disclosure is Best
311(1)
Your User Is in a State of Near Panic
311(1)
Error Messages Must Soothe
312(1)
Avoid Anything Condescending
312(1)
Standardize Phrasing
313(1)
The Button Captions
314(1)
Formatting an Error Message
315(1)
Contents of the Error Message
316(12)
What Happened?
316(1)
Why Did It Happen?
317(1)
What Will Happen Next?
317(1)
What Can the User Do About It Right Now?
317(1)
What Can the User Do About it in the Future?
318(1)
Where Can the User Get Help Right Now?
319(1)
How Can the User Help the Developer Improve the Situation?
319(1)
What Similar Problems Have Occurred in the User's Software Recently?
320(3)
What Should the User Tell a Technician About the Problem?
323(1)
What Restitution Does the Software Developer Offer to the User?
324(1)
What Was the Computer's State When the Problem Occured?
325(1)
Is the Bug in the Client or in the Server?
325(1)
What Databases, Tables, and Fields Are Open?
325(1)
What Program, What Module, What Method, and What Line Triggered the Error?
325(1)
What Threads Are Active at the Time?
326(1)
With as Much Precision as the Computer Supports, When Did the Problem Occur?
327(1)
Who Is the Logged-On User?
327(1)
What to Display on the Screen or Report
327(1)
Guarantee Your Software to Specifications, Forever!
328(3)
Part III Performance
Use the Best Testing Strategy
331(32)
Incremental vs. Module Testing
332(1)
Incremental Testing's Advantages
332(1)
Module Testing's Advantages
333(1)
Integration Testing
333(1)
Top-Down vs. Bottom-Up Testing
333(4)
Top-Down Testing
334(1)
Why the Flowchart is Flawed
335(1)
Bottom-Up Testing
336(1)
A Compromise
337(1)
Testing Philosophy
337(1)
Testing a Flowchart's White Space
337(2)
Automated Testers
339(20)
Automated Black-Box Testing
344(1)
Automated White-Box Testing
345(2)
Automatic Regression Testing
347(1)
Automatic Static Analysis
347(8)
Automatic Coverage Analysis
355(3)
False Expectations and Myths
358(1)
Cost of Bug Removal
359(1)
Other Kinds of Tests
360(1)
How Many Bugs Remain?
361(2)
Appendix A Commercial Software 363(34)
Add-In Libraries
364(1)
Artificial Intelligence
364(1)
Browsers & Browser Tools
365(1)
Code Generators
365(2)
Collaborators
367(1)
Compilers and Interpreters
367(1)
Data & Web Data
367(4)
Debuggers
371(1)
Documents
372(1)
eCommerce
373(1)
Editors
374(1)
Graphics Development
374(2)
Help Authoring
376(1)
IDEs and Development Tools
376(3)
Installers & Deployment
379(1)
Internationalization
380(1)
Internet
380(1)
Java Beans & Enterprise Java Beans (EJB)
381(2)
Java Virtual Machines
383(1)
JAR Self Extractor
384(1)
Mapper
384(1)
Messagers
384(1)
Modeling, UML, and CASE Tools
385(3)
Obfuscators & Optimizers
388(1)
Object Request Brokers (ORBs)
389(1)
Profilers
389(1)
Report Makers
390(1)
Security
391(1)
Servers & Servlets
391(2)
Software Development Kit (SDK)
393(1)
Spreadsheet
393(1)
Testing Tools and Suites
394(1)
Trackers, Project Managers
394(1)
Voice Recognition
395(1)
Word Processor in Java
395(1)
XML
395(2)
Appendix B Java Resources 397(8)
Books
398(1)
Magazines
398(1)
E-Zines
399(1)
Newsgroups
400(1)
Web Sites
400(1)
Training
401(4)
Appendix C Twenty-One Laws of Computer Programming 405(6)
1. Fatal aborts are never allowed
406(1)
2. Write in this order: User manual, specifications, help, source code
406(1)
3. Unless you use Risk Factor Analysis (RFA), a program takes twice as long to develop as you think it will---recursively
406(1)
4. Coding should comprise no more than 20 percent of development effort
406(1)
5. Testing should comprise at least 30 percent of the project
407(1)
6. Comments should comprise at least 20 percent of the source
407(1)
7. An error message must tell what happened, what the user can do about it, what the program will do next, and what line of code caused the problem. It may also note the time, username, and environment
407(1)
8. Good programs automatically send recent error messages to permanent media
407(1)
9. Call a routine thrice? Hide it. Call it once? Don't hide it
408(1)
10. Routines need exactly one entry and one exit. Exceptions include menus and error traps
408(1)
11. Document code with clear names for variables and routines
408(1)
12. Databases should be relational
408(1)
13. Always use the best algorithm
408(1)
14. Optimize the slowest routines first. Use a profiler to identify them
409(1)
15. The best language is usually the one with the shortest development time
409(1)
16. Require customer sign-offs
409(1)
17. Program the more risky modules first
409(1)
18. Make easy maintenance your guiding light
409(1)
19. Sign and spell check everything you write
410(1)
20. Don't write any program you can replicate with a 3 x 5 card deck!
410(1)
21 .Know when anything is done
410(1)
22. No list is ever complete
410(1)
23. The difficulty is not where you are looking
410(1)
24. Rules and laws exist so people don't have to think
410(1)
Appendix D Java Glossary 411(10)
Appendix E Word Macros 421(22)
Bookmark and GoTo
422(1)
Hiding Text
423(2)
Personal Comments
425(1)
Green Keywords
426(13)
Programming Helps
439(2)
More Macros
441(2)
Index 443

Supplemental Materials

What is included with this book?

The New copy of this book will include any supplemental materials advertised. Please check the title of the book to determine if it should include any access cards, study guides, lab manuals, CDs, etc.

The Used, Rental and eBook copies of this book are not guaranteed to include any supplemental materials. Typically, only the book itself is included. This is true even if the title states it includes any access cards, study guides, lab manuals, CDs, etc.

Rewards Program