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?