Mindprint Toolbox

Search Results

Please wait...

De-Bugging Your Work

Tags

All Ages Strategy

Skills

Flexible Thinking Abstract Reasoning

De-Bugging Your Work

If your student struggles to decode their own work in computer programming

How To Apply It!

  1. Rarely will a program run correctly the first time through, so it's essential to know how to efficiently debug your work.
  2. First make sure you have the instructions correct. Were you trying to program what was asked? Re-read the instructions, ideally aloud. Reading the instructions aloud can disrupt the mind's trick of "seeing what you expect to see," so you catch anything you might have missed originally.
  3. Highlight key words as you read the instructions. This too will force the mind to focus on critical components that could have been missed the first time through.
  4. If the mistake is in the coding and not in following directions you will need to systematically look for your error:
  5. Identify what in the code is working and what is not. Are you getting the same error every time or does the error change? Why would this be the case? Which part of the code would cause that error and highlight it.
  6. Consider printing out the code and then highlighting on paper with different colors. It's easier to find mistakes on paper.
  7. Now that you have identified the lines of code probably causing the error, can you find your mistake? Is it an error in syntax (e.g. missing comma, parentheses, etc.)? Use any debugging strategies and tools you have used before.
  8. If the problem is the logic, get ready to dig in. Consider looking at your previous projects, help pages, and other references for clues or strategies. Try making small changes to see if they work. Be prepared to experiment or iterate.
  9. Keep track of all the things you tried so you don't waste time trying the same thing twice.
  10. If you are feeling frustrated, take a break if you can and come back later with fresh eyes.

Why It Works (the Science Of Learning)!

When we use one approach to a problem our mind can trick us into only seeing the problem that one way. The art of checking your work is to see the problem from different perspectives so you can identify where you might have gone off course. Providing students with concrete steps for how to debug their work can help them discover their errors. Since errors are part of the coding process, debugging is an important skill that you will want to develop along with your coding skills.