Debug It!: Find, Repair, and Prevent Bugs in Your Code

Paperback
from $0.00

Author: Paul Butcher

ISBN-10: 193435628X

ISBN-13: 9781934356289

Category: Quality Control & Testing - Programming

Some developers thrash around aimlessly looking for a bug without concrete results. Others have the knack of unerringly zeroing in on the root cause of a bug. Are they geniuses? Just lucky? No, they've learned the secrets of professional debugging. This book will equip you with the tools, techniques and approaches-proven in the crucible of professional software development-to ensure that you can tackle any bug with confidence.\ You'll learn how to handle every stage of the bug life-cycle,...

Search in google:

If you develop software, sooner or later you're going to discover that it doesn't always behave as you intended. Working out why it's misbehaving can be hard. Sometimes very hard. Debug It! is here to help! All bugs are different: there is no silver bullet. You've got to rely upon your intellect, intuition, detective skills and yes, even a little luck. But that doesn't mean that you're completely on your own-there is much you can learn from those who have gone before. This book distills decades of hard-won experience gained in the trenches of professional software development, giving you a head-start and arming you with the tools you need to get to the bottom of the problem, whatever you're faced with. Whether you're writing Java or assembly language, targeting servers or embedded micro-controllers, using agile or traditional approaches, the same basic bug-fixing principles apply. From constructing software that is easy to debug (and incidentally less likely to contain bugs in the first place), through handling bug reports to rolling out your ultimate fix, we'll cover the entire life-cycle of a bug. You'll learn about the empirical approach, which leverages your software's unique ability to show you what's really happening, the importance of finding a reliable and convenient means of reproducing a bug, and common pitfalls so you can avoid them. You'll see how to use commonly available tools to automatically detect problems before they're reported by customers and how to construct "transparent software" that provides access to critical information and internal state.

Preface xiAbout This Book xiAcknowledgments xiiI The Heart of the Problem 11 A Method in the Madness 31.1 Debugging Is More Than "Making the Bug Go Away" 31.2 The Empirical Approach 51.3 The Core Debugging Process 61.4 First Things First 71.5 Put it in Action 112 Reproduce 132.1 Reproduce First, Ask Questions Later 132.2 Controlling the Software 152.3 Controlling the Environment 162.4 Controlling Inputs 182.5 Refining Your Reproduction 262.6 What If You Really Can't Reproduce It? 352.7 Put It in Action 383 Diagnose 393.1 Stand Back-I'm Going to Try Science 393.2 Stratagems 463.3 Debuggers 523.4 Pitfalls 533.5 Mind Games 573.6 Validate Your Diagnosis 623.7 Put it in Action 634 Fix 654.1 Clearing the Decks 664.2 Testing 674.3 Fix the Cause, Not the Symptoms 694.4 Refactoring 714.5 Checking in 734.6 Get Your Code Reviewed 744.7 Put it in Action 755 Reflect 775.1 How Did it Ever Work? 775.2 What Went Wrong? 785.3 It'll Never Happen Again 815.4 Close the Loop 845.5 Put it in Action 85II The Bigger Picture 876 Discovering That You Have a Problem 896.1 Tracking Bugs 896.2 Working with Users 946.3 Working with Support Staff 996.4 Put it in Action 1017 Pragmatic Zero Tolerance 1037.1 Bugs Take Priority 1037.2 The Debugging Mind-Set 1067.3 Digging Yourself Out of a Quality Hole 1087.4 Put it in Action 113III Debug-Fu 1158 Special Cases 1178.1 Patching Existing Releases 1178.2 Backward Compatibility 1188.3 Concurrency 1238.4 Heisenbugs 1258.5 Performance Bugs 1278.6 Embedded Software 1298.7 Bugs in Third-Party Software1328.8 Put it in Action 1379 The Ideal Debugging Environment 1399.1 Automated Testing 1399.2 Source Control 1429.3 Automatic Builds 1479.4 Put it in Action 15510 Teach Your Software to Debug Itself 15710.1 Assumptions and Assertions 15710.2 Debugging Builds 16710.3 Resource Leaks and Exception Handling 17210.4 Put it in Action 17911 Anti-patterns 18111.1 Priority Inflation 18111.2 Prima Donna 18211.3 Maintenance Team 18411.4 Firefighting 18611.5 Rewrite 18711.6 No Code Ownership 18911.7 Black Magic 18911.8 Put it in Action 190A Resources 193A.1 Source Control and Issue-Tracking Systems 193A.2 Build and Continuous Integration Tools 196A.3 Useful Libraries 198A.4 Other Tools 200B Bibliography 205Index 207