Friday, October 04, 2013

Teaching Problem Solving

One of the things we like to say learning computer science in general and programming in particular leads to is learning problem solving. It’s a nice theory and I’ve said it myself. It’s really more complicated than that of course. A student can learn all the syntax for a programming language but that doesn’t make them a problem solver. Not automatically. What I see all too often is a student who can create, for example, a loop on a test or tell me what a loop does but still has trouble applying the right tool (like that loop) to a new problem.

Problem solving is largely about taking one idea or concept and applying it to a problem that is completely new to the problem solver. It is about saying something like “x worked for problem a and problem b is similar to problem a so x may work here.” It seems simple and obvious to state. In reality sometimes it takes a bit of perception to see that problems a and b have base similarities behind superficial differences. Other times a solution requires parts of solutions for several different problems put together in a new or unique way. Visualizing those more complex solutions can be difficult. This is especially true for people with limited understanding of the tools available to them. (Note: I talked about this a bit in Hammers and Nails and Writing Complicated Code)

The problem that is keeping me awake lately is how to teach that sort of problem solving. How do I teach how to see the problem in a way that makes it more clear which tools should be considered?  It’s vitally important to me to do this better than I have been doing.

Some students “get this” easily and early. Some people have more of knack for problem solving than others. To some extent I think this is a visualization problem. It depends on how people picture a problem in their mind and how they relate different problem images to others. On one hand some people just see solutions pop into their heads and go do it. On the other hand are people for whom dealing without a clearly laid out, step by step set of instructions makes a task all but impossible. It’s like people bringing IKEA furniture home. Some can look at the picture on the box and see in their mind how it comes together. Others need that step by step set of instructions and can’t imagine how it all comes together until it is done.

What I am thinking about now is discussion a lot of different problems in a semi-abstract way and seeing if I can get students to start visualizing how to solve them. Perhaps is the see a bunch of related problems they can start to better extrapolate to new problems. The idea being the more uses for tools they are exposed to the better they will become at looking at future problems. It’s one thought. I’m trying hard to come up with more ideas..

And I am open to suggestions. How do you teach problem solving to your students?

4 comments:

Peter Donaldson said...

I try to develop pupils understanding of and use of cs speak to help them describe what they need the computer to do in general terms. For example is the computer carrying out a similar action over and over again? Yes, then we need repetition but is it going to be fixed or conditional repetition? I can then ask other prompting questions that help pupils to think what they want the computer to do.

The cs speak and the hidden mechanism underlying particular statements such as
a = 5, the integer value 5 is stored in a memory location labeled a for example gives them a framework to make sense of the domain.

Unknown said...

Boy can I relate to this. I am teaching loops right now. I'm planning to introduce them for one task and then before they begin the next, have them make some predictions about how they would work in that task. I want them to think before they do. Too often they just start typing coed before thinking about how it should work.

Chris said...

It's more than just problem solving though. Problem solving is obviously the end goal, but there's the toolset we give them that causes the headaches. Programming has evolved over hundreds of years and we just expect kids to get it with no historical context. Teaching the roots of programming, building up the story as to why and how we are where we are, provides a much more structured approach to programming. And after they "get" what programming is, then the problem solving flows.

Give a student a crossword and they get on with it. Ask them to play sudoko and we have to tell them the rules.

Dale said...

I also would like to know the best way to teach problem solving. As far as I can tell Problem Solving is a skill, and as such it can be "caught" but not "taught." As such the best I've been able to do is to come up with carefully structured sequences of problems that scaffold the discovery.