From e89a62b3730ca51183262c7dcb0c35edb25a11f8 Mon Sep 17 00:00:00 2001 From: Andrew Harrington Date: Sat, 5 Jan 2019 11:02:59 -0500 Subject: [PATCH 1/2] typo chapter f to chapter --- _sources/Debugging/intro-DebuggingGeneral.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sources/Debugging/intro-DebuggingGeneral.rst b/_sources/Debugging/intro-DebuggingGeneral.rst index 105ddcb5..d76b1060 100644 --- a/_sources/Debugging/intro-DebuggingGeneral.rst +++ b/_sources/Debugging/intro-DebuggingGeneral.rst @@ -24,7 +24,7 @@ the errors that you will inevitably come across. Before computers became digital, debugging could mean looking for insects impeding the functioning of physical relays as in this somewhat `apocryphal tale `_ about `Admiral Grace Hopper `_, a pioneer of computer programming. -Nowadays, debugging doesn't involve bug guts all over your computer but it can still be just as frustrating. To cope with this frustration, this chapter[f] will present some strategies to help you understand why the program you wrote does not behave as intended. +Nowadays, debugging doesn't involve bug guts all over your computer but it can still be just as frustrating. To cope with this frustration, this chapter will present some strategies to help you understand why the program you wrote does not behave as intended. Learning Goals -------------- From b0cb5be74793bcaeab3c26ede250abfad2ddf78e Mon Sep 17 00:00:00 2001 From: Andrew Harrington Date: Sat, 5 Jan 2019 11:05:05 -0500 Subject: [PATCH 2/2] typo ifyou to if you --- _sources/Debugging/BeginningtipsforDebugging.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_sources/Debugging/BeginningtipsforDebugging.rst b/_sources/Debugging/BeginningtipsforDebugging.rst index f0eca0d1..276f532c 100644 --- a/_sources/Debugging/BeginningtipsforDebugging.rst +++ b/_sources/Debugging/BeginningtipsforDebugging.rst @@ -18,7 +18,7 @@ Debugging a program is a different way of thinking than writing a program. The #. Everyone is a suspect (Except Python)! It's common for beginner programmers to blame Python, but that should be your last resort. Remember that Python has been used to solve CS1 level problems millions of times by millions of other programmers. So, Python is probably not the problem. -#. Check your assumptions. At this point in your career you are still developing your mental model of how Python does its work. Its natural to think that your code is correct, but with debugging you need to make your code the primary suspect. Even ifyou think it is right, you should verify that it really is by liberally using print statements to verify that the values of variables really are what you think they should be. You'll be surprised how often they are not. +#. Check your assumptions. At this point in your career you are still developing your mental model of how Python does its work. Its natural to think that your code is correct, but with debugging you need to make your code the primary suspect. Even if you think it is right, you should verify that it really is by liberally using print statements to verify that the values of variables really are what you think they should be. You'll be surprised how often they are not. #. Find clues. This is the biggest job of the detective and right now there are two important kinds of clues for you to understand.