Debug It!: Find, Repair, and Prevent Bugs in Your Code
Book information
Description
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, from constructing software that makes debugging easy, through detection, reproduction, diagnosis and rolling out your eventual fix. 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. Contents Preface About This Book Acknowledgments The Heart of the Problem A Method in the Madness Debugging Is More Than ``Making the Bug Go Away'' The Empirical Approach The Core Debugging Process First Things First Put It in Action Reproduce Reproduce First, Ask Questions Later Controlling the Software Controlling the Environment Controlling Inputs Refining Your Reproduction What If You Really Can't Reproduce It? Put It in Action Diagnose Stand Back---I'm Going to Try Science Stratagems Debuggers Pitfalls Mind Games Validate Your Diagnosis Put It in Action Fix Clearing the Decks Testing Fix the Cause, Not the Symptoms Refactoring Checking In Get Your Code Reviewed Put It in Action Reflect How Did It Ever Work? What Went Wrong? It'll Never Happen Again Close the Loop Put It in Action The Bigger Picture Discovering That You Have a Problem Tracking Bugs Working with Users Working with Support Staff Put It in Action Pragmatic Zero Tolerance Bugs Take Priority The Debugging Mind-Set Digging Yourself Out of a Quality Hole Put It in Action Debug-Fu Special Cases Patching Existing Releases Backward Compatibility Concurrency Heisenbugs Performance Bugs Embedded Software Bugs in Third-Party Software Put It in Action The Ideal Debugging Environment Automated Testing Source Control Automatic Builds Put It in Action Teach Your Software to Debug Itself Assumptions and Assertions Debugging Builds Resource Leaks and Exception Handling Put It in Action Anti-patterns Priority Inflation Prima Donna Maintenance Team Firefighting Rewrite No Code Ownership Black Magic Put It in Action Resources Source Control and Issue-Tracking Systems Build and Continuous Integration Tools Useful Libraries Other Tools Bibliography Index A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Similar books
Seven Concurrency Models in Seven Weeks: When Threads Unravel
2014 · EPUB
Seven Concurrency Models in Seven Weeks: When Threads Unravel (The Pragmatic Programmers)
2014 · PDF
Physics of Low-Dimensional Semiconductor Structures
1993 · PDF
七周七并发模型
2015 · PDF
Seven Concurrency Models in Seven Weeks. When Threads Unravel
2014 · PDF
Seven Concurrency Models in Seven Weeks: When Threads Unravel
2014 · PDF
Seven Concurrency Models in Seven Weeks: When Threads Unravel
2014 · EPUB
Seven Concurrency Models in Seven Weeks: When Threads Unravel
2014 · PDF