Upgrade to Pro — share decks privately, control downloads, hide ads and more …

The Dark Art of Debugging

The Dark Art of Debugging

A talk about developing the soft-skills required to be a good software debugger.

7c49b77a97bebe0eabe6bb5cb2b66671?s=128

eojthebrave

May 22, 2015
Tweet

More Decks by eojthebrave

Other Decks in Technology

Transcript

  1. The Dark Art of Debugging php[tek] 2015 - Chicago Joe

    (@eojthebrave) Shindelar https://joind.in/event/view /3183
  2. Hi. I’m Joe Shindelar @eojthebrave

  3. 5 Minutes - GO! + Bugs are inevitable + Debugging

    is a science + Replicate, Isolate, Understand, Fix + Practice …
  4. So … where do bugs come from?

  5. Software: Is a set of written instructions provided for a

    computer to interpret and use to accomplish a task.
  6. Software: Is a set of written instructions provided for a

    computer to interpret and use to accomplish a task. Bugs: Are the defects that arise when those instructions are incorrectly translated.
  7. “There’s a space between zero and one, between the way

    the machine counts and thinks and the way we count and think. When you search for explanations for software’s bugs and delays and stubborn resistance to human desires, that space is where you’ll find them.” - Scott Rosenberg -Dreaming In Code
  8. The ONLY way to be a zero bug programmer is

    to not write any code.
  9. Debugging is a practical application of both technical skills and

    analytical abilities
  10. This presentation is not about tools. But tools play an

    important roll in debugging. Learn your tools. Use your tools.
  11. + Replicate + Isolate + Understand + Fix

  12. Ready? Fire! Aim. Give yourself 10 minutes to jump in

    and dirty- debug. But STOP before you go crazy.
  13. STEP ONE Replicate the problem

  14. It is a capital mistake to theorize before one has

    data. Insensibly one begins to twist facts to suit theories, instead of theories to suit facts. - Sherlock Holmes Quote -A Scandal in Bohemia
  15. Replicate + Keep a log

  16. Replicate + Keep a log + Get it to fail

  17. Replicate + Keep a log + Get it to fail

    + Lay a trap
  18. Replicate + Keep a log + Get it to fail

    + Lay a trap + Stimulate. Don’t simulate
  19. Replicate + Keep a log + Get it to fail

    + Lay a trap + Stimulate. Don’t simulate + Automate the failure
  20. Goal: Generate a list of steps

  21. STEP TWO Isolate the problem

  22. There is nothing more deceptive than an obvious fact. -

    Sherlock Holmes Quote - The Bascombe Valley Mystery
  23. Isolate + Avoid easter egging

  24. Isolate + Avoid easter egging + Check the plug

  25. Isolate + Avoid easter egging + Check the plug +

    Divide & conquer
  26. Isolate + Avoid easter egging + Check the plug +

    Divide & conquer + Change one thing at time
  27. Isolate + Avoid easter egging + Check the plug +

    Divide & conquer + Change one thing at time + Stop thinking and look
  28. Goal: Explain what is causing the problem to occur. Include

    details about application state, time, and inputs.
  29. STEP THREE Understand the problem

  30. Nothing clears up a case so much as stating it

    to another person. - Sherlock Holmes Quote - Silver Blaze
  31. Understand + Brain games

  32. Avoid confirmation bias Beware the availability heuristic

  33. Understand + Brain games + Don’t assume anything. Ever

  34. Understand + Brain games + Don’t assume anything. Ever +

    Practice tempered humility
  35. Understand + Brain games + Don’t assume anything. Ever +

    Practice tempered humility + Read the manual
  36. “Why bother, I can look it up in the Phone

    book.” - Einstein
  37. Understand + Brain games + Don’t assume anything. Ever +

    Practice tempered humility + Read the manual + Ask for help
  38. Goal: Explain the root cause, and how your proposed fix

    will solve the problem.
  39. STEP FOUR Fix the problem

  40. Eliminate all other factors, and the one which remains must

    be the truth. - Sherlock Holmes Quote - The Sign of Four
  41. Fix + Don’t stop until you’re done

  42. Fix + Don’t stop until you’re done + Establish causality

  43. Fix + Don’t stop until you’re done + Establish causality

    + Test your fix
  44. Goal: Close the ticket!

  45. + Replicate + Isolate + Understand + Fix

  46. “The greats weren't great because at birth they could paint.

    The greats were great cause they paint a lot.” - Macklemore
  47. The Dark Art of Debugging php[tek] 2015 - Chicago Joe

    (@eojthebrave) Shindelar https://joind.in/event/view /3183