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

The Art of Debugging

The Art of Debugging

Talk I gave at WeWork, Android NYC Meetup.

Synopsis.
Lisa Neigut, Android Engineer at Electric Objects, will run through types of errors, some fun problems she's had at EO with race conditions, common ways to find problems, tools available to you, and how to read thread dumps.

Event link: http://www.meetup.com/android-developers-nyc/events/227835405/

67867d2677e7dd983000441ff0b1c089?s=128

NeiL saitug

January 14, 2016
Tweet

More Decks by NeiL saitug

Other Decks in Programming

Transcript

  1. THE ART OF DEBUGGING

  2. WHAT IS A BUG??

  3. None
  4. NOT WORKING AS INTENDED

  5. None
  6. None
  7. None
  8. None
  9. None
  10. None
  11. 3 BUG TYPES

  12. BUG TYPE 1 PROBLEMS YOU CAN SEE: OK

  13. BUG TYPE 2 PROBLEMS YOU CANNOT SEE: HARD

  14. BUG TYPE 3 PROBLEMS YOU DO NOT KNOW EXIST: IMPOSSIBLE

  15. None
  16. None
  17. STEP 1:

  18. None
  19. None
  20. STEP 0: HOW TO DEAL

  21. None
  22. None
  23. None
  24. TRUST

  25. None
  26. STEP 1: GET AS MUCH INFORMATION AS POSSIBLE

  27. GET AS MUCH INFORMATION AS POSSIBLE Stack Trace

  28. GET AS MUCH INFORMATION AS POSSIBLE Stack Trace Version of

    Android
  29. GET AS MUCH INFORMATION AS POSSIBLE Stack Trace Version of

    Android Device Make & Model
  30. GET AS MUCH INFORMATION AS POSSIBLE Stack Trace Version of

    Android Device Make & Model Steps to Reproduce
  31. STEP 2: SEE IF YOU CAN REPRODUCE IT

  32. STEP 3: GOOGLE FOR KEYWORDS / SEARCH STACKOVERFLOW

  33. STEP 4: RE-READ YOUR CODE

  34. STEP 5: GATHER MORE INFORMATION

  35. CRASHLYTICS logException

  36. SERVER SIDE LOGGING

  37. EVENT GRAPHING

  38. GOOGLE ANALYTICS EVENTS

  39. DEBUGGING INTERLUDE

  40. KEY THINGS TO REMEMBER:

  41. KEY THINGS TO REMEMBER: > Concurrency: Are your classes thread

    safe?
  42. KEY THINGS TO REMEMBER: > Network Conditions

  43. KEY THINGS TO REMEMBER: > Android has Bugs

  44. KEY THINGS TO REMEMBER: > But Samsung is Buggier

  45. KEY THINGS TO REMEMBER: > Check Your Assumptions

  46. KEY THINGS TO REMEMBER: > Check Your Assumptions (aka) Your

    Backend Dev May Be Lying (Unintentionally)
  47. PREVENTING BUGS

  48. None
  49. WRITE A CHECKLIST

  50. WRITE A CHECKLIST > if the network is not available

    > if the server has an error > if it returns correctly > if something else goes horribly wrong > if the user is unauthenticated
  51. BETA TEST

  52. MAKE THE TESTS AUTOMATIC

  53. RUN THE AUTOMATIC TESTS

  54. WHAT IS A BUG??

  55. A BUG IS A FUTURE YOU DID NOT CONSIDER

  56. CURATED ANDROID FAILS @VOLUMEDOWNPOWER

  57. SEND ME YOUR BUG STORIES. @NIFTYNEI

  58. None