Skip to content

Commit

Permalink
Merge pull request #166 from anharrington/master
Browse files Browse the repository at this point in the history
2 fopp typos
  • Loading branch information
bnmnetp authored Jan 7, 2019
2 parents e68a1d2 + b0cb5be commit a08b77d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion _sources/Debugging/BeginningtipsforDebugging.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
2 changes: 1 addition & 1 deletion _sources/Debugging/intro-DebuggingGeneral.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 <https://www.computerworld.com/article/2515435/app-development/moth-in-the-machine--debugging-the-origins-of--bug-.html>`_ about `Admiral Grace Hopper <https://en.wikipedia.org/wiki/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
--------------
Expand Down

0 comments on commit a08b77d

Please sign in to comment.