Teaching Computer Programming: Get Ready-Set-Create!

To cement learning, allow students to use skills to solve real-world coding challenges

Jan 18, 2017 by Drew McConnell, Manager of Digital Learning, FIRST




Teaching Computer Programming blog post


The goal of an Introduction to Programming class is for students to learn to program computers. The goal is not merely to read code, understand code, interpret code, analyze code, or even to evaluate code. The goal is to create with code; to use the languages of computer programming to create new, useful technology. Now, yes, in order to create with code one must also read, understand, interpret, analyze, and evaluate it. But many classrooms stop here. They never get to creation, and in turn, deprive their students of the real skill they came to learn.

This is often a constant balancing act in a classroom. How does a teacher help their students acquire fundamental programming skills while also helping them think logically and computationally? In my high school classroom, I have attempted to bridge this gap by always having two threads of assignments going at any given time. The threads are:

  1. An open-ended project to foster computational thinking and problem-solving.
  2. Assigned lessons in CodeCademy to gain basic programming fundamentals.

The idea is that as students design computational solutions to the open-ended project they can use CodeCademy to acquire the fundamental programming skills needed to do so. For a majority of students this approach works well, but a small handful of students have trouble. They struggle to make the leap from applying fundamental skills in a step-by-step lesson to designing a computational solution with the fundamental skills as the pieces of the puzzle.

The problem is that these kids have never been required to think critically before. They’ve always been told what to do and how to do it. They’ve applied algorithms in Math, but they’ve never had to design their own algorithm to solve a problem. In tackling this issue, my title as “teacher” falls short. I cannot teach computational thinking. There is no amount of knowledge I can impart that will enable them to think logically and computationally. Yet the task before me is still to help these students learn to program computers, and this inevitably requires computational thinking.

So what do I do? Like any good teacher, I ask questions. I find mechanisms that force students to think about the logic of code. When asked “What do I do next,” my standard answer -- much to the chagrin of my students -- is: “I don’t know. What does your program need to do?” This response typically results in silence and blank stares, but it is essential to the process. I cannot answer this question for them. They must learn to answer (and eventually ask) this question for themselves.

Recently I had a student, Robbie, programming a Go Fish card game. After much effort his program would deal cards to both a human player and a computer player, and allow the human player to ask for a card from the computer. Stumped on his next steps, Robbie asked “What do I do now?” Refusing to answer this question for him, I pulled out a deck of cards. I dealt seven cards to each of us and asked him if he had any ‘fours’. He instinctively began scanning his cards and I stopped him.

“What are you doing now?” I asked.

Unsure of himself, he replied, “Checking to see if I have any ‘fours’.”

“What will happen if you do?” I asked.

“I’ll give them to you.”

“And if not?”

“I’ll say ‘Go fish.’”

“You just laid out the next steps of your program,” I told him.

I wish I could tell you this brief conversation was a lightbulb moment for Robbie and that he has now mastered the art of computational thinking. This would not be true. It took another half hour of guiding questions to help Robbie move from these simple steps to successfully implementing them in his program, but it was essential to his learning process. And while I will likely have to continue asking him the same guiding questions, I saw progress in Robbie that day. He answered questions he could not answer a month before.

Learning to think computationally is a process. It requires a whole new way of thinking students have never done before, and it is not acquired overnight. As I wrote this blog I wanted to present a clean and easy solution to bridge the gap between fundamental programming skills and computational thinking. The reality is that I cannot. Computational thinking takes practice. Some students need to be guided through the process again and again and again. They need to learn to ask the right questions about a problem before they can solve it. This comes by hearing you ask the right questions again and again and again. And slowly, through persistence and no small amount of patience, they will first begin to understand the questions, and then to ask them themselves. Once they know how to ask the right computational questions, they can begin to apply their fundamental skills to solving them.

Drew McConnell is manager of digital learning for FIRST. Read Drew's bio

Read more about how FIRST supports educators by engaging students in STEM learning and preparing them for the future.

If you have an inspiring story or piece of wisdom that you’ve picked up through your experiences in the FIRST community, please reach out to us at and inquire about becoming a guest contributor for Inspire.

Back to Blog