How to give your students structure as they learn programming skills

Creating a computer program involves many different skills — knowing how to code is just one part. When we teach programming to young people, we want to guide them to learn these skills in a structured way. The ‘levels of abstraction’ framework is a great tool for doing that. This blog describes how using the framework will benefit you and your learners in the computing classroom.

Two learners at a laptop in a computing classroom.

We’re also excited to share our new Pedagogy Quick Read, which you can download for free to:

  • Find practical tips for using the ‘levels of abstraction’ framework with your learners
  • Read a summary of the research behind the framework

Learning to program: Everything at once?

Creating a program from the ground up can be daunting, especially for new learners. Without support, they’ll likely get stuck sooner or later; programs rarely work the first time round. And the more complex the problem that a program is addressing, the more likely it is that the first version of the program won’t work.

In a computing classroom, two girls concentrate on their programming task.

One reason that learning to program can be challenging is that it involves understanding a lot of specific concepts and applying many varied skills. From early on in their learning journey, young people need to have a firm grasp of concepts such as repetition, selection, variables, and functions. Also fundamental to learning to program well is the skill of abstraction: understanding a task and identifying which details are relevant and which can be ignored.

To get to grips with all these different concepts and skills, young people need structure — otherwise they’ll try to hold everything in their head at once, and likely feel overwhelmed by the cognitive load. This sort of experience may cause them to disengage instead of persisting. They may even decide that programming is not for them.

In light of these challenges, the ‘levels of abstraction’ framework is a great tool for teaching.

The benefits of the ‘levels of abstraction’ framework

The framework breaks programming down into four levels, each focusing on a different aspect of creating a program:

  • Problem: Analysing the problem or task the program should address, to understand and record the requirements.
  • Design: Turning the analysis into an algorithm — a set of steps for the computer to follow to create the desired output. This can involve flowcharts or storyboards, but importantly no code.
  • Code: Developing the code based on the design (and building the physical components if any are involved).
  • Running the code: Testing the code, checking outputs, and debugging where necessary.

Throughout the processes of developing a program, learners (and professional programmers) move between these levels as they implement their designs and debug them, sometimes even returning to the problem level if more analysis or clarification is needed.

Young child in the classroom using Scratch to program.

Potential benefits of the ‘levels of abstraction’ framework for teachers:

  • It helps you break down the activity of programming into discrete parts.
  • It helps you engage your learners, as you can show them that programming involves more than knowing how to code.
  • If your learners get stuck with their programming, the framework can help you guide them to a solution.

Potential benefits for learners:

  • The framework will help them think through all the steps needed to create a program that works, and practise their problem-solving skills and analytical thinking.
  • They will more readily see how programming connects to their world — at the problem level — and find aspects of programming where they have strengths and can use their creativity.
  • They will gain a stronger idea of how software is built in the tech sector.

Our new Quick Read shares tips on how to best use the framework in your teaching.

Things to aim for when using the framework with your learners:

  • Be aware of what level they are working at and when it’s time to switch to a different one.
  • Understand that, when they encounter an issue with their program, they can step back and use the framework to figure out where the issue comes from. The issue might be a bug in the code, the algorithm not working as intended, or a description of the problem not taking into account something important.

We hope you find the framework useful. If you have ideas for how to use it in your teaching, why not share them in the comments?

Teaching programming: The wider context

When following the ‘levels of abstraction’ approach, learners need to explain how programs work and debug them. That means program comprehension is a key skill here. You may have already helped your learners to develop and practise this skill, for example with the PRIMM approach. The Block Model is another useful tool for helping your learners talk about various aspects of a program. And if you use the pair programming approach in programming activities, your learners can improve their program comprehension by talking about their code with each other. On our website, you’ll find more guidance on the best ways to teach programming and computing.

Photo of a young person coding on a desktop computer.

And what about generative artificial intelligence (AI) tools for programmers? In the age of AI, we think young people still need to learn to code because it empowers them to navigate and think critically about all digital technologies, including AI. And while generative AI tools can help a skilled programmer create quality code more quickly, more research is needed to show whether such tools help school-age young people build their understanding as they learn to code. You can see some of the great work being done in this area if you catch up with our 2024 research seminar series.

The ‘levels of abstraction’ framework is useful in your teaching no matter what tools young people use to create programs. Even with an AI tool, they will still need to work at all four levels of abstraction to program effectively. 

1 comment
Jump to the comment form

Avatar

The levels of abstraction is also a reasonable framework for interacting with AI, so is a good approach in general: asking an LLM to “make a boat race game” is less likely to get what is wanted in one hit… but instead ask it to prompt questions to develop the problem, a possible design for the defined problem and then an implementation of that design. Could even ask it for suggestions of tests to run (and why).

Reply to beeka

Replying to beeka
Cancel reply?