YouTube

Got a YouTube account?

New: enable viewer-created translations and captions on your YouTube channel!

English subtitles

← Dependencies and the Scientific Method - Software Debugging

Get Embed Code
2 Languages

Showing Revision 3 created 05/25/2016 by Udacity Robot.

  1. How do dependencies fit into our model of debugging?
  2. Well, that's fairly straight forward.
  3. When we see a failure, we see which part of the state is erroneous.
  4. Then we track back the dependencies to see
  5. which earlier states could possibly have caused that infection.
  6. We determine these possible states as well as the locations in the
  7. program where they would be caused through the dependencies.
  8. So, if we see an error down here, it could have come
  9. from here, from here, or from here.
  10. In one out of these three, or at least one out of these three,
  11. should contain the infection that we're looking for.
  12. So we use dependencies to find possible
  13. origins for each for each infection.
  14. In the second step we use the
  15. scientific method to track down infections.
  16. We have the choice between three possible origins here.
  17. So, we use the scientific method to find out
  18. which of these three parts of the state is at fault.
  19. We set up an experiment.
  20. We make up the appropriate observation,
  21. and we gradually refine or reject our hypothesis
  22. until we have come up with a diagnosis
  23. and figured out which part of the state is wrong.
  24. Then we repeat the whole thing back and back and back again.
  25. Again, choosing between multiple possible origins,
  26. following back the dependencies,
  27. and again using the scientific method to track down
  28. which of these actually is at fault.
  29. Instead of the scientific method, you can also use deduction
  30. to rule out specific possibilities.
  31. For instance, you may be able to show that neither this one nor this one
  32. can possibly have influenced the state under these circumstances.
  33. So, the only one that remains is the one up here.
  34. You repeat the process until you find a statement
  35. whose in-going state is all correct, but where the out-going state is infected.
  36. So, how do we call a statement whose in-going state is all correct,
  37. but its out-going state is infected?
  38. What is this?
  39. Is this a cause, a defect, or an infection?