Teach Debugging to Beginners to Build Confidence

It is important to teach debugging to beginners right away. Debugging is when a programmer finds “bugs” or errors in their code and fixes them to improve the program. This is an essential programming skill. So much so, that it should be taught at the beginning of a coding unit.

Where Were the Debugging Strategies in the Instructional Materials and Python Courses?

When I was asked to develop Python materials for TechnoKids Inc. I jumped at the chance. I began to read books about Python. They had titles emphasizing that the instructions inside were for “absolute beginners”. I noticed that none had activities or advice on debugging. Instead, if the code I was copying from the page didn’t work I was left guessing why. It was frustrating!

My reaction was one that I knew students would feel. I worried that young programmers might begin to think “I am not good at programming” when they encountered an error they could not fix. This belief might turn them away from learning more about coding. I knew it was necessary to reframe how students respond to mistakes in their programs. They needed to feel empowered, not defeated.

The books were helpful in understanding the types of instructional materials available to teachers on teaching Python – but I needed to learn more!

I wanted to understand the difference between what young children and young adults were learning about Python. I signed up for a first year course at the university where I did my undergraduate degree. This course did have a section on debugging, but it was at the end of the course. I asked the professor why it was introduced so late and was told it was because beginners could not understand the error messages until they had learned how to code. As a result, I spent a good portion of the course inefficiently applying debugging strategies. I knew there had to be a better way!

When it came time to create the TechnoKids Python STEM projects I had reached a decision…debugging needed to be taught right away. I wanted students to be able to understand the meaning of the errors they would see. More importantly, I knew they needed simple strategies to fix their code.

teach debugging to beginners

Teach debugging to beginners.

What Happens When the Program Keeps Shouting ‘You Are Wrong’…But You Don’t Know How to Make it Right?

When Students Lack Debugging Strategies, Red X’s Tell the Learner They Can’t Code

During my investigation of Python programming with kids I noticed that there were common errors made. These mistakes would trigger several responses by the IDLE Python program. The Python Editor Window, which is where programmers build the code, will display a box with a red x on Windows devices. Those are for syntax or indent errors. In this case, there might be a forgotten bracket or # in front of a comment: simple to fix, but not without knowledge of debugging.

The angry red x’s that show up on the screen mock a novice. Unintentionally they seem to say “you can’t code”. To prevent students from becoming discouraged, teachers should provide strategies for decoding error messages. This will build confidence and promote independence.

syntax and indent error boxes in Python

When a student lacks debugging strategies the Python error messages can be a source of frustration.

When Students Lack Debugging Strategies, They Can’t Find the Problem

Another technique the IDLE Python program uses to assist programmers is to identify a spot within the code where there is an issue. This is accomplished with a reddish-pink box around text. The skilled programmer knows to look BEFORE the highlight.

However, those without debugging strategies can stare at the code forever and never know what is wrong. This is because children and young adults are literal. They look at the reddish-pink text and say “Oh, the problem is right HERE”. Beginners lack sufficient knowledge to locate the error. This shortcoming can easily be overcome by explicitly teaching debugging strategies.

Python error

The word highlighted is not the error. It is the missing bracket BEFORE shape.

When Students Lack Debugging Strategies, Red Text Tells a Beginner They Do Not Understand How to Program

The error response by the IDLE Python program is to show a message in the Python Shell. The text is red. It often tells the programmer there is a name or type error. These errors can occur if a library is not imported, a command is spelled wrong, a variable is not used properly in the code, or a sentence does not use the correct punctuation for joining text with variables. The Python message identifies the line number and reason for the problem. However, with no debugging strategies it can seem like gibberish.

The red text in the Python Shell is the equivalent of using a red pen to grade student work. Many educators have given up this practice as it promotes self-esteem issues, which can turn students away from wanting to learn. Studies have show that for many learners red pen is like ALL CAPS. It yells “You are wrong!” When red text is the method for highlighting errors, it can make a student feel angry or sad. This is avoidable when educators teach debugging to beginners at the start of a coding unit.

Python error messages can seem like gibberish to beginners.

Teach Debugging to Beginners at the Start of a Coding Unit

To avoid making students feel bad about themselves, why not just give students perfect code to copy? Then when they run the program, no errors will happen. Or if they do, they can quickly refer to their sample to find the typo. Problem solved!

No. Not really.

The limitation to this instructional approach is that it restricts learning. One of the goals of teaching a STEM project should be to support students so they produce their own original creations. Aside from developing programming skills, the learning objectives in a programming unit should include: fostering an interest in programming, developing computational thinking skills, and applying logic and reasoning to solve a problem. The aim should not be improving typing skills.

Spark an ongoing interest in programming. Teach debugging strategies at the beginning of a coding unit. This will build confidence and promote independence.

Python Lessons that Explicitly Teach Debugging to Beginners

Teachers need to deliberately teach debugging strategies at the start of a programming unit. This empowers students. Using this instructional approach, the TechnoTurtle STEM project includes activities that teach students about common errors and how to fix the code.

TechnoTurtle has 30 coding assignments. Elementary and middle students solve mazes, create artwork, and build games. Several of the lessons emphasize debugging strategies. They are interwoven throughout the project to introduce or reinforce computer science concepts:

  • Edit a Python Program: Modify values to understand the purpose of code.
  • Bug Zapper: Add mistakes to a program to learn how to debug Python.
  • Clean Up the Code: Fix coding errors by selecting from the list of choices.
  • Trial and Error: Test different ideas to move a Turtle through a maze.
  • Draw a Robot: Write one line of code at a time and make corrections as you go.
  • Edit an Invitation: Change code to discover how to join text with variables.

The Power of an Infographic

As an alternative to report writing or giving a presentation, an infographic is a compelling way for students to demonstrate their learning. Due to its visual nature, an infographic portrays facts, data, images, and a call to action in a convincing and appealing format. When we teach students the tools for designing their own infographics, they acquire a variety of essential skills. Here’s a list of the values of teaching students how to build an infographic.


Apply Research Skills

In order to present the facts and images that are fundamental for an infographic, students need to build search skills. In a couple of recent blogs, we outlined some tips for teaching explicit strategies for online research. Limited reading and scanning skills, irrelevant sites, advertising, and biased websites are stumbling blocks to students finding reliable, appropriate results quickly. If we teach them how to search, they will achieve greater success in finding trustworthy information fast. Making an infographic is a great way for students to boost their search skills.

Develop Digital Literacy

An infographic can be designed for almost any subject area. Topics in science, geography, visual arts, history, and language arts can all be expressed using images and brief text. Multiple technology skills are developed:

  • graphic design
  • digital citizenship
  • online search strategies
  • communication and word processing
  • web-based publishing

Promote Critical Thinking

An infographic has very limited text. When creating this type of document, a student needs to evaluate all the information and determine which facts are most important and engaging. An infographic has different sections, so they need to organize the layout in a logical way. Finally, the headings of each block of information must be interesting to capture audience attention. Therefore students must synthesize, paraphrase, and describe the topic in brief but intriguing titles. These skills are in the top two levels of Bloom’s taxonomy, evaluation and synthesis, where students master the most complex learning tasks.

Inspire Creativity

Infographics are lots of fun to create! Choosing layouts, picking color themes, drawing icons,
listing fun facts, making an image carousel, and displaying surprising numerical data are just some of the elements to design and construct. Students find it highly motivating to make an original infographic. Spark the interest of students from Grades 6 and up with a novel assignment. Inspire them to make unique infographics that both demonstrate their learning as well as inform others.

Develop Real World Communication Techniques

An infographic presents a topic using universally recognized symbols and images. Text is brief and enticing to attract and hold the viewer’s attention. Students need to understand the topic, but they also have to convey it in an authentic way that will captivate readers. An infographic is likely to be web-based, so it should mirror contemporary media. There is a lot of information to compete with, so it must be accurate and convincing. The student isn’t writing a report for the limited audience of one teacher. It is being written for the public. Quality, grammar, vocabulary and tone are critical with a global audience.

Learn How to Create an Infographic with TechnoEarth

technoearth icon

TechnoKids’ newest project, TechnoEarth, instructs students how to build an infographic about an environmental issue. They play the role of environmental stewards as they design an interactive infographic about an important problem. They learn how to outline the cause, harmful effects, stakeholders, location, and solutions using a highly engaging format. Learn more about TechnoEarth here.

Boost Online Search Strategies: A Fun Activity

In the previous post, we listed a set of tips to develop online search strategies. Try this skill building activity with middle school students to apply those tips and raise awareness of ways to find trustworthy information fast.

technoearth icon

This activity is from TechnoKids technology project TechnoEarth. In this project, students learn how to use Google Sites to design an interactive infographic about an environmental issue. The search activity below is a Skill Review from Session 1, in which students learn about environmental stewardship and infographics. Then they pick a topic of their choice and use a template to research the cause, harmful effects, stakeholders, location, and solution.

Explore Online Search Strategies

1. Try many keywords

search strategies

Some topics use different terms to mean the same thing. For example, both algal bloom and algae bloom refer to lots of algae in water. Compare the search results for algal bloom and algae bloom. Look at the list of sites, questions, images, or videos on the page.

  • Are the results the same for algal bloom and algae bloom?
  • If no, which keyword do you think is the best? Why?

2. Be specific

boost search strategies

Pretend your research topic is poaching of rhinos.

  • What is a solution to the problem?
  • To narrow the search results, what phrase did you use?

3. Pick from the dropdown menu

search drop down

The dropdown menu in the search box suggests keywords. Let’s say you are researching smog. List two suggested phrases you think would be helpful.

4. Refer to People also ask

search people ask

Many people ask questions about environmental issues. Search for plastic pollution. List a question from the People also ask section that you find interesting.

5. Check the URL

search strategies

The website address can give a clue about who made the web page. Find a government website about overfishing. The URL might end .gov or .gc.ca.

  • What is the URL?

6. Skim and Scan

skim and scan

Save time! Find a website about harmful effects of acid rain. Scan the search results for words that match the facts you need.

  • Which search result do you think will be the best? List the title.
  • Scan the description. Which keywords are in bold text?

Design an infographic using Google Sites. Improve research skills and search strategies.

Boost Search Strategies with Middle School Students

web design for kids Google Sites

There is LOTS of information on the Internet. When students are conducting searches for specific topics, they can become overloaded with results. Irrelevant sites, limited skimming and scanning skills, advertising, and unreliable data are all factors that can make online searching time-consuming. Competent Internet search strategies can help students to locate high-quality sites quickly to get the facts they need.

Here’s a list of tips to boost Internet searches. In the next blog, we’ll post an activity to use with students to discover different ways of finding information by applying these tips.

search strategies
TechnoEarth includes a skill review to boost search strategies.

Search Strategies to Find Information FAST!

Try many keywords:

search strategies

Some topics have more than one term used to describe it. Each will provide different results.

Be specific:

boost search strategies

To narrow search results use a phrase that states exactly what you want. The more precise, the better.

Pick from the dropdown menu:

search drop down

As you type into the search box, a list of suggested phrases appears. This can save you time typing. Plus, it offers helpful keywords.

Refer to People also ask:

search people ask

The People also ask section has popular questions. The answers can quickly provide you with the information you seek.

Check the URL:

search strategies

Look for sites that are well known organizations, government agencies, or educational pages. The URL of these sites end with .org, .gov, or .edu.

Skim and scan:

skim and scan

Read the title. Check the description for the keyword. It will be bold. Glance over the text looking for words that match the facts you need.

Notice if the site is an Ad:

boost search strategies

Websites can pay to be at the top of the search results. The listing will be labeled Ad. Just because it is first does not mean it is the best.

Check the sources:

search strategies sources

A website may list their sources of information. Often, they are links to online articles. Verify that they are high-quality. If they are, use them.

Use Find to highlight facts:

search strategies using find

If there is a lot of text, use the Find feature. Press CTRL+F on the keyboard. Type a word into the search box. If it is on the page, it will highlight. Jump to each place where the word appears using the Previous and Next buttons.

Use multiple search engines:

search strategies using search engines

Use more than one search engine such as: Bing, Google, or Duck Duck Go. Each provides different results.

TechnoEarth to Boost Search Strategies

technoearth icon
TechnoEarth Technology Project

TechnoKids’ newest project, TechnoEarth, inspires students to become environmental stewards. As they research an important issue, they develop and refine search strategies. Then, using Google Sites, they design an interactive, web-based infographic that outlines the cause, harmful effects, and solutions. The publication also summarizes stakeholders, highlights interesting facts, and pinpoints the location of the problem. Students inform the public about the environmental issue, raise awareness, and spark action.

Check out the next blog post to get a fun activity from TechnoEarth. Students search for information and explore these tips to build proficient search skills.