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

How To Fix Bugs

How To Fix Bugs

A talk for new programmers. My attempt to tell you all the stuff that will seem like common sense to you in two years.

This presentation is not very useful without the full text, which you can read at https://gist.github.com/jorendorff/8008765 .

Jason Orendorff

December 16, 2013
Tweet

More Decks by Jason Orendorff

Other Decks in Programming

Transcript

  1. What not to do ~ Feel discouraged ~ Smush the

    code around until it goes away ~ Fix it without understanding
  2. What not to do ~ Feel discouraged ~ Smush the

    code around until it goes away ~ Fix it without understanding
  3. How to fix bugs ~ Get steps to reproduce ~

    Make a test case ~ Get more information
  4. How to investigate ~ Learn to read a stack trace

    ~ Dump the data ~ Tie off loose ends ~ Work backwards ~ Learn the tools
  5. Writing debuggable code ~ Check in the test ~ Look

    everywhere for the same mistake ~ Write debug methods ~ Write assertions ~ Make it obviously correct