© Karl Beecher 2018
Karl BeecherBad Programming Practices 101https://doi.org/10.1007/978-1-4842-3411-2_11

11. Debugging

Karl Beecher1 
(1)
Berlin, Germany
 

Objectives

In this chapter, you’ll learn:
  • How to carry out debugging as an incompetently led investigation, specifically by:
    • Making wild guesses

    • Favoring your own pet theories

    • Refusing to be methodical

  • How to frustrate debugging by writing code that leaves no clues behind

  • How to avoid carrying out proper fixes on faulty code

Prerequisites

Before reading this chapter, make sure you’re familiar with debuggers and their basic facilities, like stepping through code and inspecting variables.

Introduction

You can’t win them all. Not every bug you create will escape the attention of your conscientious colleagues. ...

Get Bad Programming Practices 101: Become a Better Coder by Learning How (Not) to Program now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.