In one study, published in Learning and Instruction, psychologists Sidney D'Mello and Art Graesser found "that even negative emotions can play a productive role in learning."
Confusion, D’Mello explains, is a state of “cognitive disequilbrium”; we are mentally thrown off balance when we encounter information that doesn’t make sense. This uneasy feeling motivates us to restore our equilibrium through thought, reflection, and problem solving, and deeper learning is the result. According to D’Mello, engaged learners repeatedly experience “two-step episodesalternating between confusion and insight.” Back and forth, between perplexity and understanding: this is how the learning of complex material happens.
In fact, deep learning may be unlikely to happen without the experience of confusion, suggests a study conducted by another researcher, Arizona State’s Kurt VanLehn. The students in his experiment were not able to grasp the physics concepts they were learning until they had encountered, and surmounted, an intellectual “impasse.”
Still another study, this one led by Harvard physicist Eric Mazur, found that students who observed a demonstration in science class understood the relevant concept no better than before—unless the students were asked to predict the outcome of the demonstration in advance. When their predictions turned out to be wrong, the resulting confusion motivated them to consider the concept more deeply, and they learned more.
On a related note, Stephen Ramsey at the University of Nebraska has a wonderful post that eloquently makes the case that attitude is more important than (initial) aptitude in learning programming.
Nearly every programmer I know – and I know some great ones – started out not with a course, or a book, or a teacher, but with a problem that was irritating them. Something in their computational world didn’t seem right. Maybe it was broken, or maybe just missing. But being comfortable with not-knowing-what-the-hell-they’re-doing, they decided that getting a computer to do something new was more-or-less like figuring out how to get the chain back on the bike. They weren’t trying to “be programmers” any more than the parent determined to fix the kid’s bike is trying to be a “bicycle mechanic.”All of these suggest that cultivating mental habits among our students (and ourselves) where we are okay with being unfamiliar with a subject, okay with struggling to master a concept or tool or problem, okay with working in new formats, okay with failure and trying again is important for intellectual and academic development in school and with the work done outside of school.