English subtitles

← Do Not Debug Like That - Software Debugging

Get Embed Code
4 Languages

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

  1. Not only would I start using arbitrary debugging statements everywhere,
  2. I would also try to debug the program into existence. Just change things until they work.
  3. Let me try. The error of this may have something to do with quotes.
  4. So don't just simply go and remove all these extra quote checks in here.
  5. Let me see whether this makes any difference. Okay. I removed all the quote checks.
  6. Let's see whether it works right now, and we run the program and see--it's foo.
  7. The output is foo. It's almost correct. Only the quotes are missing.
  8. Well, now we can handle the quote--maybe we will just remove this in order to align in here,
  9. and may be we can change things until things are proper.
  10. Let me see whether this works. Same. Oh yeah, great. Let me see. Okay.
  11. And I can run the thing again and--however, I think I removed too much at this point
  12. because if you recall our original example--the one with the greater than sign here in the target URL
  13. that we now still get this error in here, the quote is in here which should belong here,
  14. which is why we introduce quote handling in the first place.
  15. So now actually, maybe I should go back to this earlier version,
  16. but how do I get back to the earlier version.
  17. Well, of course, I did never backup my earlier version.
  18. So I don't even know what the earlier version was. This more or less was my state of debugging.
  19. This is how I debug as a student, which was not the perfect way to do it.