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

2017 - Jouella Fabe - Fix Bugs Without Falling Into a Rabbit Hole

Db2ee812bdc6fd057f8f4209c08b6f63?s=47 PyBay
August 11, 2017

2017 - Jouella Fabe - Fix Bugs Without Falling Into a Rabbit Hole

How not to fall into a rabbit hole when debugging mysterious bugs in a large open source library.

Almost everyone uses some open source library, but when that library fails to do what you want - i.e. decoding only 2 pages out of a 4 page pdf file or it just straight up raises an exception.

Many would dive deep into the code. In this talk, I will try to convince you *not to do that* by sharing my anecdotal experiences such as finding an elusive unicode character encoding difference between two popular OS's from a large open source project.

Video: https://youtu.be/nAhjroo374I

Db2ee812bdc6fd057f8f4209c08b6f63?s=128

PyBay

August 11, 2017
Tweet

More Decks by PyBay

Other Decks in Programming

Transcript

  1. Fix bugs without falling into a rabbit hole @jmfabe

  2. Outline • Why this talk is relevant • Anecdote on

    debugging a pdf decoder library • What makes debugging in a large open source project difficult • Steps on how to tackle the beast • Closing remarks
  3. Why is this talk relevant?

  4. A tale of two bugs

  5. First bug Passing a 4 page pdf and only decoding

    the last 2 pages
  6. None
  7. Second bug Library method raises exception when it calls unichr

  8. None
  9. Why is it hard?

  10. None
  11. None
  12. None
  13. None
  14. None
  15. Run through a list first

  16. Some ideas - Replicate the problem in a different environment

    or in a different interpreter - Play around with the libraries tests - Write your own unit tests to see what happens
  17. Understand how the problem came to be Come up with

    a list of questions
  18. Case study: decoding last 2 pages out of 4 How

    does the library read the pages?
  19. • Try to go through a check-list • Come up

    with a list of questions • Do some research about the problem • Go back and step through a debugging session • Talk to someone else or take a break
  20. None
  21. None
  22. • Debugging mysterious bugs can expand your knowledge • Debugging

    is a skill, exercising it makes you a stronger engineer