What is scaffolding, and why is it important when teaching computer science?

What is scaffolding?


If you’re not an educator, this word probably makes you think of the temporary support structures used by construction workers to reach tall places. On the other hand, if you’re a teacher, your primary association may be something else.

In the education world, “scaffolding” has a specific technical meeting. It refers to the way that a teacher or curriculum slowly removes instructional supports as students learn. The goal of scaffolding is to guide students to independent thinking and problem solving. We want students to learn how to approach a wide range of problems, not just the specific task at hand.

Scaffolding is important for learners in every field, but it’s particularly relevant when teaching computer science.

Most K-12 learners have little experience writing code, so they’ll need extra support up front. Writing code is a skill. Computer science learners are not just memorizing facts or syntax. They’re learning a new way to think. If we want them to master skills, we must guide them towards independent thinking.

So what does scaffolding look like in a computer science curriculum?

At the start of a project, you’ll want to be very explicit in telling students what code to write and where. If a student has never written an if statement or a for loop, you can’t expect them to understand how to do it just by hearing the theory behind it and seeing a syntax example.

As a project goes on, students should receive less support. Each step should require a little bit more independent thought. Students build on what they’ve learned, slowly learning not just a programming language, but how to use code to solve a problem.

Ideally, we’re teaching them not just the “what” of programming, but also “why” and “how.”

How do you know if a curriculum isn’t scaffolded enough?

Unscaffolded computer science curriculum falls into one of two extremes.

The first extreme gives too little support to students. It provides abstract information and then asks students to perform a concrete task.

An example assignment might show students the documentation for the Java class String, and then ask them, “find and use methods in this documentation to write a new method that states whether a given input String is a palindrome.”

This assignment leapfrogs several levels of thinking, asking students to synthesize lecture material without ever getting them to analyze or apply. It doesn’t even check for comprehension.

The second extreme gives too much support. It will give students project to work on, but will spell out what to do for every step along the way, like a recipe. An example assignment that gives too much support might be a video tutorial called “How to Build Space Invaders in Python with PyGame,” that never pulls back and asks a student to figure out the next step themselves.

Students will end the assignment with a finished product, but they won’t ever be required to solve a problem. They’ll be told exactly what code to write the whole time.

Both extremes cater to the students who don’t need a teacher.

An exceptionally self-directed student given too little support will find a way to solve the problem. This will probably involve doing research and practice outside of the curriculum to gain the support lacking in the assignment.

An exceptionally self-directed student given too much support will think outside the task at hand to learn why the project steps work. This will probably involve experimenting and adding new features not requested by the assignment.

Meanwhile, the students who need you to teach never really learn anything.

If you don’t give your students enough support, they’ll have nothing to show for their frustration, and probably won’t want to keep learning to write code.

If you give your students too much support, they’ll never learn to write code beyond following a set of steps. Students will never get to be creative, and they won’t feel like they know what they’re doing.

What does a properly scaffolded computer science curriculum look like?

1. First, students will read about a new code concept or structure. They’ll learn a big idea and some syntax. The concept might be something like arrays, class inheritance, or Boolean operators.

2. Next, students watch a short video showing someone write code using the new concept. They get to see the skill applied, along with an explanation for how and why it was written that way.

3. After the short text and video lessons, students start working on a project that uses the concept. They’ll be writing code to build a video game.

4. Our instructions start be telling students exactly what to do. “Open this file. Find this code section. Make this change exactly.” Each further step will give a little bit less direction.

5. By the end of the project, students are adding new features without explicit direction. We guide them into independent thinking and problem solving.

The more project students work on, the more they learn, and the better they get at thinking for themselves. After completing a few courses, students are able to design and build their own video games from scratch.