In a recent blog post Eugene Wallingford says that when teaching:

I frequently pose a problem for them to work on for a few minutes before we look at a solution, or several candidates, as a group. All too often some students look at the problem, think it's too difficult, and then just sit there waiting for me to show them the answer. This approach often results in them feeling two kinds of failure: they didn't solve the problem, and they don't even appreciate the solution when they see it.

There is a double problem here, The first is that some students don't attempt to solve a difficult problem - giving up early. This leads to the second problem of not recognizing the beauty of the solution once they see it.

How can we encourage/enforce/demand/cajole students into making a good faith effort on a difficult problem without making them feel defeated at the end?

Often the exercises we give students have a learning objective that is more important than the actual solution to the problem. Learning is to be valued over solutions in a teaching environment. But students don't always see that and can be led to think of themselves as failures even when they work hard toward a solution (Authenticity Bias). We need to find ways to avoid that outcome while we encourage hard thinking.

The big idea here is that the effort to find a solution, even if it goes down an unprofitable path, will lead to learning. The practice of "stretching your brain muscle" is wort pursuing.

One Pedagogical Pattern was originally named Kobayashi Maru after a training exercise that was central to a certain Star Trek episode. In this pattern, the idea is to give students an impossible task to give them practice in very hard problems, possibly requiring orthogonal thinking. (The pattern was later re-named to Mission Impossible). That isn't exactly the same issue here, where we are looking to encourage deep thinking on deep but solvable problems.


This issue is not just about programming. It can be anything. For example a complex database design issue or a complex retrieval. Or in Compilers, some optimization issue that needs to run fast. Lots of opportunities for hard problems in any class.

I can suggest a few approaches that might be fruitful, depending on your students.

  1. Make it Social. Instead of having the students work individually on the problem, have them work in pairs or groups. Let them discuss with each other ideas, even off-the-wall ideas around the problem and its possible solution.

  2. Make it Competitive. This is a situation in which long lasting groups might be brought to bear. Group the students in small groups (2-5) and pose the problem to the groups. Let them discuss the solution in their groups for a few minutes. At the end, award a few points to the group with the most "interesting" answer. Or have the students themselves vote on the "winner".

  3. Make it Fun. This will take more work, but instead of presenting the problem in technical terms present it as a problem in some, possibly stupid, imaginary context. Something from a fairy tale or a common metaphor related to the problem. Let it be a bit creative on an orthogonal dimension as well as the technical dimension.

  4. Make it Weird. This is a bit risky, but you could possibly "reward" the worst possible answer to the question in some way. Often just cheering, rather than points, might be enough. The idea, is to get them to think about the problem and this may work out. Related is to reward the longest list of not-solutions, especially if the students can tell you why the proposal fails. I once actually impressed the examiners (for an oral preliminary exam for the doctorate) by explaining why my first "solution" would fail, even though I didn't come up with the correct answer.

I'll note that this is about hard problems so we can't expect that many, if any, students will come up with an answer that Dikjstra, perhaps, was the first to give. The important thing is engagement and learning.

I think this is a pretty common problem, especially for novice programmers. They're given an assignment and don't know how to start- in fact, they don't even know what it's asking!

I don't think this is due to a lack of "courage" - it's because they don't have the framework required to start breaking problems down yet.

I think step one is to normalize this a bit, and specifically mention that this is a common way to feel. Then walk them through the process of getting over that initial hurdle. What behavior do you want them to exhibit? Model that behavior for them.

I try to encourage people to break their problem down into smaller steps and take those steps on one at a time. There are a lot of approaches here, including:

  • Restate the problem in your own words.
  • Break the problem down into logical sub-steps.
  • Identify your input and output.
  • Think about how you'd do this without a computer, with a piece of paper and a pencil.
  • Do the absolute smallest thing you know you need to do, like open your IDE, or write the class or function declaration.

Another thing that I think is important is demonstrating this behavior yourself. A lot of lectures and tutorials cover the happy path of developing code. Students see how easy it is when you do it, and then get home and don't know how to start and think that must mean they're terrible programmers. In fact every single programmer feels this way, so it's important that they know this. So I recommend doing a live demo of working through a problem, including stuff like using Google, looking stuff up in the reference, making mistakes, debugging, etc.

  • 1
    Just wanted to highlight this part: "...don't know how to start- in fact, they don't even know what it's asking". Part of a class discussion could include breaking down the question as a group. As the question is broken down, it will be easier for students to see paths to solutions. Then they can start to have discussions on how to write/construct the code for the answer. – JustBlossom Jul 5 at 16:57

I think sometimes it's because they don't even know where to begin, and when you think about it, this makes sense.

Consider an average student. (I'm going to use a lot of math examples because a. I just reread "A Mathematician's Lament" and b. I'm reading a great book called Burn Math Class that explains calculus in the best way I have ever read, and then proceeds to prove a bunch of "elementary" math stuff with it - very cool.)

They've spent most of their time in class watching a teacher put up a problem and then explain how it is solved, assign a similar-but-not-quite problem to use a similar approach on, and maybe help struggling students with the homework. They've not often seen their teacher truly struggle with a problem at the board with them.

Even if they are lucky enough to have seen this, the teacher is (generally, hopefully) the teacher for a reason: they know what they're doing, and thus the methods used to approach the problem can get lost in the speed. Decisions made in how to approach the problem, etc, aren't mentioned.

And I'm not quite talking about problem solving techniques, although I'm talking about those too. I'm talking about the process more. The book I'm reading talks about "pre-mathematics" - the stuff you do to approach the problem, the preparation before the solution comes to mind and is cleaned up and published or written on the blackboard or what have you.

For example, the way the author approaches a proof of the formula for the area of a rectangle is very interesting and different from any other approach (admittedly, all other approaches I have seen have been "this is so, now deal with it") - he talks about intuitively, what properties area must have, then mathematically defines those properties, then uses a functional equation to solve for area, shows how unit conversion comes out of the mathematics...it's rather impressive.

Or consider how the author talks about the definition of slope - he talks about how there are other possible formulas, like run/rise, or whatever, but why the particular version used was chosen. It's all explained, the process of defining and proving.

So, do something similar with your class, perhaps. Pick a problem that is at the student's level that you don't really know how to solve, and go after it - but slowly, explaining your thought process every step of the way, why you're picking the tools you're using, etc.

For example, maybe you wish to approach creating a calculator app of some sort. Talk with your students - why is OOP efficient? Would that apply in this case? Is the program going to be small enough that a procedural program would be quicker to write and not lose much readability? What are the design requirements? Hold a Socratic-method type session, with you guiding. Do this and ask less and less pointed questions, progressing to calling on people to approach the problem as best they can. Perhaps let other people lead the Socratic questioning.

Show them how to begin.

  • Good insights. Great ideas. You could probably obtain the same "presentation" by picking a problem you do know the solution to, and pretend you have a 5-year-old asking "WHY?" every time something is claimed to be the way. – Gypsy Spellweaver Aug 3 at 1:01
  • @GypsySpellweaver exactly, yes! It's the fact that people assume you know when you've never had any reason to know. – heather Aug 3 at 1:02
  • 1
    That was one of the points I learned doing GED with adults. They'd outgrown the adolescent inhibitions about seeming foolish, and would ask "why?" Sometimes as much as a 5-yr-old. Gives the instructor insight into what they do, and don't, know and how they know it. – Gypsy Spellweaver Aug 3 at 1:05
  • The best way to learn a subject is to teach it. – Gypsy Spellweaver Aug 3 at 1:05

If someone was not participating, I would talk with them privately first. Often students will perk up if they intereact with the instructor. They know that at least one person is "on their side, even when they were wrong" (to paraphrase a Taylor Swift song) and so not be so concerned about being 'wrong' in the future.

The only solution I can come up with is personal interaction. I don't think that a teaching pattern or curriculum will solve it. The courses I did best in were because I loved the instructor, and second best was when the instructor paid some attention to me (outside of the classroom situation, which would have been a disaster) and so I felt that I owed him some effort.

If you want to highlight some code of historical value don't expect the students to solve it. It probably took someone better trained and more talented than your students days, weeks, months or years to get it right.

Keep the material in line with what the students are supposed to be able to do. Presenting complicated problems that overshoots half the class is wasting time.

Present all or almost all of the problem and let the students work from there.

  • I assume your intent here is "push them, but not beyond their ability". Does that seem right? – Buffy Aug 9 at 13:27

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.