After working for a dozen years as a software engineer and over two decades as an educator, I am convinced that there isn't a recipe or algorithm for teaching or learning how to solve problems. Yet, I'm also convinced that the primary activity of computer scientists is problem solving - we just express our solutions in a different way than most disciplines. My technique for teaching problem solving requires your participation:
Demonstrate how to solve a problem related to the current topic
Assign students to solve a similar problem
Provide students with one or more solutions created by an experienced problem solver, which they must study and compare with their solutions
Repeat
I also believe that people learn to write programs by learning to read and understand programs. No experienced computer scientist has ever disagreed with that opinion.
"Worked examples focus attention on problem states and associated operators (i.e., solution steps), enabling learners to induce generalized solutions" (Sweller, van Merriƫnboer, & Pass, 1998, p. 273). Following the elaboration steps presented previously is an excellent way to "induce generalized solutions."
"Problem solving requires the mental representation of the situation in the world. That is, human problem solvers construct a mental representation (or mental model) of the problem, known as the problem space... Problem solving requires manipulation of the problem space, be it an internal mental representation or an external physical representation" (Jonassen, 2000, p. 65). For example, when we solve an algebra problem, we often begin by writing or representing it as an equation based on symbols denoting variables and operators. Then, following the rules of algebra, we manipulate or rearrange the symbols until we find the solution. I most often represent a problem with a picture, which you will see throughout the textbook, and see demonstrated in the video at the end of this section. Watch how your teachers explain concepts in class. The representations they use often form a language or vocabulary you can use to help solve similar problems.
"Problem solving can be analyzed in subprocesses... (Mayer & Wittrock, 1996, p. 48).
"Representing occurs when a problem solver converts an externally presented problem, such as a word problem in a mathematics book, into an internal mental representation...
"Planning involves devising and monitoring a method for solving a problem...
"Executing occurs when a problem solver actually carries out planned operations, such as making arithmetic calculations to solve a word problem.
"Although executing is emphasized in classroom instruction, the major difficulty for most problem solvers involves representing and planning." Mayer and Wittrock are correctly indicting teachers for doing a bad job. Successfully representing a problem and planning its solution typically require a deep understanding of many interconnected concepts. Throughout the text, I try to explain the concepts you need to represent and plan - I try to help you achieve transfer learning.
Planning: Math educator Loren Larson offers twelve heuristics useful for planning to solve a problem. Although presented as techniques for solving math problems, they are applicable to most technical fields including computer science.
The video demonstrates how to solve a problem by drawing a figure or picture.
Each problem is different, which makes each picture unique
The uniqueness of each picture means that it's not possible to give step-by-step instructions for drawing the picture
The picture must reflect the important parts of the problem:
All of the given problem information, including the relations between the parts of the problem, must be included in the picture
The picture must include the starting point
The picture must include the ending point or solution
The picture must evolve or change over time, either by the problem-solver editing the picture or by drawing a sequence of pictures
Jonassen, D. H. (2000). Toward a design theory of problem solving. Educational Technology, Research and Development, 48(4), 63-85.
Larson, L. C. (1983). Problem-Solving Through Problems. New York: Springer-Verlag.
Mayer, R. E., & Wittrock, M. C. (1996). Problem-solving transfer. In D. C. Berliner & R. C. Calfee (Eds.), Handbook of Educational Psychology (pp. 47-62). New York: Simon and Schuster Macmillan.
Sweller, J., van Merriƫnboer, J. J. G., & Paas, F. G. W. C. (1998). Cognitive architecture and instructional design. Educational Psychology Review, 10(3), 251-296.