• Front Page
    • Digital Education
    • Terry Freedman's Books Bulletin
  • RSS
  • Search
    • Welcome
    • The "About" Page
    • Testimonials
    • CV/ResumĆ©
    • My Writing
    • Published articles
  • Corrections Policy
Menu

ICT & Computing in Education

Articles on education technology and related topics
  • Front Page
  • Newsletters
    • Digital Education
    • Terry Freedman's Books Bulletin
  • RSS
  • Search
  • Info
    • Welcome
    • The "About" Page
    • Testimonials
    • CV/ResumĆ©
    • My Writing
    • Published articles
  • Corrections Policy

Reasons to teach coding through problem-solving

June 6, 2025

There are two basic ways of teaching programming -- or pretty much anything, come to that. You can either start with the building blocks and build up, or you can start with some self-contained problems and then pull them apart. In practice, of course, you need to do both, so it comes down to a question of emphasis.

My preferred approach has always been to start by solving problems, as far as possible. Here are my reasons.

Problems are more interesting

Problems don't have to have global consequences to be interesting. A maths problem like "John has 9 sweets. How can he share them equally between himself and his two friends?" is intrinsically more interesting (and more challenging) than "Divide 9 by 3".

In the same way, a problem like "Check if this person is over 13 years of age" is more interesting than "Get the computer to deduct someone's date of birth from today's date."

Obviously, at some point you will need to teach your students how to perform that calculation. I am simply contending that by starting with a problem, you are giving them a reason to actually want to.

Students achieve something meaningful right away


Obviously, we can discuss what is meant by "meaningful", but if you take a problem like the one about age, above, it involves students applying programming methods to an actual problem. You could start them off by spending a lesson or two on how to use dates in calculations, but even if they understand it fairly quickly, I'm not sure whether they will have the same sense of achievement.

Problems provide hooks

Problems don't have to be of global importance to be interesting.

Problems don't have to be of global importance to be interesting.

It's very hard to learn abstract concepts straight away. Although when Piaget talked about concrete learning he was referring to very young children, I believe that the concept applies to anyone of any age when they are starting something they are not familiar with.

Having a problem-to solve is a way of providing a mental hook, or set of hooks, on which to hang the concepts you intend to use.

Abstraction, Decomposition and Pattern Recognition are easier

These three components of computational thinking are easier to apply, and to teach, if you start with a real problem. Take the age problem, above. A problem for a small business like "Should I issue a reminder to pay my invoice?" is, essentially, the same problem. It involves calculating whether the difference between today's date and the date that the invoice was issued is greater than 30 days (or whatever the business's payment terms are). I think it's easier to draw this out from a problem-solving approach than with just dealing with the raw components.

Problem-solving provides building blocks

The main strength of starting with the raw components, as it were, is that you can use them to build up more complex programs. But you can do the same by starting with a problem-solving approach, and in my view it makes it much more interesting. Take the age problem (again). An interesting extension would be to say. "How could you make the program handle a situation in which, at the time of filling in the online form, the person is under 13, but by the time they actually start, they will have turned 13?"

Pseudocode is easier to apply

In my experience, it's easier to write, and to teach kids to write, pseudocode if you have a real problem in mind than if it is simply an abstract, academic, exercise.

Problem-solving makes it easier to use a spiral curriculum approach

Bruner's concept of the spiral curriculum refers to the revisiting of problems at a deeper and more complex level. It's much easier to do so if you have a reasonably meaningful problem in the first place. In fact, the second problem introduced under the heading of building blocks, above, is a simple example of the application of the spiral curriculum.

A big question

Is it worth teaching problem-solving at all now that AI can do it for you? Yes. Because even if you want AI to generate the actual code, you still need to outline the problem and describe in pseudocode what you want the finbished program to do.

Conclusion

As I said at the start, you have to teach both the raw components and how they might be applied, but I think that starting with a problem makes it much easier to learn.

For more articles like this, along with how to's, competitions, freebies, and other good stuff, sign up to the Digital Education newsletter, which is now in its 25th year!

Did you know, I also have another newsletter, Eclecticsm, where I write about literature and life.

 

 

In Computing Tags problem-solving, coding, programming
← 6 Outlandish things to do in your Computing lesson Robotics is STILL a waste of time →
Recent book reviews
a little history of the earth.jpg
One for your Geography colleagues perhaps? Review: A Little History of the Earth -- two reviews in one!
Read more →
a word for all seasons.jpg
For your English colleagues: A Word for all Seasons -- two reviews in one!
Read more →
the mending.jpg
For your maths colleagues: The Mending of Broken Bones: A Modern Guide to Classical Algebra -- two reviews in one!

I submitted my review of this book to Teach Secondary magazine, an educational magazine in the UK. The first review below is what the magazine published. The second one is what I actually wrote! In substantive terms there is little difference between the two, but you may find it interesting to see what the editor altered.

Read more →
the worst exhibition.jpg
For your History colleagues: The Worst Exhibition in the World: Degenerate Art, 1937 -- two reviews in one!

I submitted my review of this book to Teach Secondary magazine, an educational magazine in the UK. The first review below is what the magazine published. The second one is what I actually wrote! In substantive terms there is little difference between the two, but you may find it interesting to see what the editor altered.

Read more →
History lesson, by Terry Freedman.jpg
Is The computing Curriculum Too Masculine? Revisited 16 years later!

One of the apparently insoluble problems of the age is how do you encourage more girls to take up Computing? I think a lot can be done, and have done so myself, but I wonder how far a lot of the effort fails to get to the heart of the issue, which could be the curriculum itself, the way it is taught, or a combination of the two?

Read more →
best writing maths.jpg
Book review: The best writing on mathematics, 2016

I think this could be an excellent resource for teachers of mathematics.

Read more →
international short (2).jpg
For your Eng Lit colleagues? The Penguin Book of the International Short Story -- two reviews in one!

I submitted my review of this book to Teach Secondary magazine, an educational magazine in the UK. The first review below is what the magazine published. The second one is what I actually wrote!

Read more →
Turner and Constable (1).jpg
Two reviews in one: Turner and Constable: Rivals and Originals -- art and history

One for your colleagues, perhaps: art, art history, ploitics with a small ā€˜p’.

Read more →
satire (1).jpg
Two reviews in one: State of Ridicule: A History of Satire in English Literature -- politics, history, English

One for your colleagues, perhaps. Sperrin has provided a wealth of information that can be used to provide a rich experience for students of politics, history and English literature.

Read more →
a little history of maths.jpg
Two reviews in one: A Little History of Mathematics

I submitted my review of this book to Teach Secondary magazine, an educational magazine in the UK. The first review below is what the magazine published. The second one is what I actually wrote! In substantive terms there is little difference between the two, but you may find it interesting to see what the editor altered.

Read more →
Dig+Ed+Banner.jpg

Contact us

Privacy

Cookies

Terms and conditions

This website is powered by Squarespace

(c) Terry Freedman All Rights Reserved