Return to Video

Actual Cause - Software Debugging

  • 0:00 - 0:04
    Finally, the general concept of a cause can be misleading.
  • 0:04 - 0:08
    To think about the window shuttering, we said it was the ball. It's right.
  • 0:08 - 0:11
    But, it could also have been the window maker.
  • 0:11 - 0:15
    If the window maker had not made this particular window
  • 0:15 - 0:17
    then the window would not have shuttered
  • 0:17 - 0:22
    and if the house builder had not built this particular house with the window in it
  • 0:22 - 0:24
    then the window would not have shuttered either.
  • 0:24 - 0:27
    For a single effect, there can be multiple causes,
  • 0:27 - 0:30
    and all of these are valid according to our earlier definition.
  • 0:30 - 0:33
    This is where the concept of an actual cause comes in handy.
  • 0:33 - 0:39
    An actual cause assumes and changes as little as possible, but it changes the effect.
  • 0:39 - 0:44
    If we think about the causes we have discussed, a ball shuttering the window
  • 0:44 - 0:48
    does not change much except for the window.
  • 0:48 - 0:53
    The window maker not producing the window makes of a larger different
  • 0:53 - 0:57
    because then we would have the house with one window missing
  • 0:57 - 0:59
    for quite some time, which would change a lot.
  • 0:59 - 1:02
    Parts of the house would get very wet for instance,
  • 1:02 - 1:05
    would be cold or hot depending on the climate.
  • 1:05 - 1:09
    If the house maker had not built the house, the change would be even bigger.
  • 1:09 - 1:12
    So, what you want is an actual cause
  • 1:12 - 1:17
    that assumes and changes as little as possible, which precisely what the ball is in here.
  • 1:17 - 1:20
    For debbugging the same hole, you want to have a cause
  • 1:20 - 1:24
    that assumes and changes as little as possible but still produces the effect,
  • 1:24 - 1:29
    and that's precisely what delta debugging gets you starting with the general cause
  • 1:29 - 1:34
    the entire input reproduces an actual cause namely a subset of the input
  • 1:34 - 1:37
    in which everything is relevant for producing the effect.
  • 1:37 - 1:41
    Here's a quiz. I invoke the GNU compiler, and it crashes.
  • 1:41 - 1:44
    Which of these are general causes for the failure?
  • 1:44 - 1:49
    Is it me because no me, no invocation, no crash
  • 1:49 - 1:53
    or is it Richard Stallman, the founder of the GNU project
  • 1:53 - 1:57
    because without Stallman no GNU compiler no crash
  • 1:57 - 2:03
    or is it oxygen, without oxygen, no Richard Stallman, no me, no compiler,
  • 2:03 - 2:08
    no crash, probably also no world as we know it, no computers,
  • 2:08 - 2:13
    no electricity, interesting, or finally is it a bug in the compiler
  • 2:13 - 2:15
    because no bug no crash. Check all that applied.
タイトル:
Actual Cause - Software Debugging
Video Language:
English
Team:
Udacity
プロジェクト:
CS259 - Software Debugging
Duration:
02:18
Udacity Robot edited 英語(米国) subtitles for Actual Cause - Software Debugging
Fran Ontanaya edited 英語(米国) subtitles for Actual Cause - Software Debugging
Amara Bot added a translation

English subtitles

改訂 Compare revisions