Why psychological advice in a programming course? Because frustration and a fixed mindset impede learning.
If you made it into college, you can learn to program. When people have trouble, it’s often because of their emotions, or mindsets.
Programming is frustrating. F-r-u-s-t-r-a-t-i-n-g. Frustrating. Frustrating. Frustrating. AARRGHHH!
Your emotional state matters. It affects learning. Some tips.
Don’t rant, throw things, or otherwise “let off steam.” You’ll feel good for a few minutes, but it makes things worse in the long run. Really. The research is in.
Do have reasonable expectations. Your code will not work the first time. My code doesn’t work the first time, and I’ve been programming for years. I don’t expect it to work, so it doesn’t bother me when it doesn’t.
Don’t leave assignments to the last minute. OK, everyone tells you that, but listen this time. Programming takes longer than you think. Something always goes wrong. That’s normal.
Do learn how to figure out why a program isn’t working. Staring at code won’t help you fix it. Using the debugger will. The debugger is your friend. Follow it on Facebook and Twitter. Like it, poke it. Give it compliments, like “You must work out!” Send it flowers on St. Debugger’s Day. You need the debugger in your life.
Do get help when you’re stuck. Asking for help is Really Hard for some people. (I’m one of them.) Remember, it’s your instructor’s job to help. Your friends can help, too. Meet for coffee every Tuesday and Thursday afternoon. You can help them, they can help you.
Do remember your accomplishments. Yes, that assignment was hard, but you did it. If you did that one, you can do the next one, too. Go you!
Do take a break. If you’re very frustrated, do something else for an hour. Give your brain time to flush the I’m-as-frustrated-as-a-monkey-who-sees-a-banana-but-can’t-get-to-it chemicals. Then go back and make that code run. Run, code, run!
Georgine and Ethan flunk a quiz
She took a math quiz last week. She got 5 out of 20. She’s not happy.
He’s in the same class an Georgina. He took the same quiz. He got the same score.
What they do now depends on why they think they got a low score. Psychologists contrast a fixed mindset with a growth mindset.
Let’s say that Georgina has a fixed mindset. She thinks that math ability is something you either have, or you don’t. Her low score tells her that she doesn’t have the math gene, or whatever it is.
Georgina thinks she got a low score because something in her brain is lacking. Here’s how she sees her brain.
So, what does Georgina do? Maybe she gives up. What’s the point of trying if you don’t have the math gene? Or maybe she decides to cheat. Research shows that people with a fixed mindset are more likely to cheat when they fail at something.
Here’s the thing:
Georgina is wrong!
Not just a little bit wrong. Totally, completely, utterly wrong.
Study after study shows that there’s no math gene. Math abilities are not fixed. Everyone can improve.
Despite what many people think, IQ isn’t fixed, either. Even this dude…
…didn’t think that IQ was fixed. That’s Alfred Binet, the guy who invented IQ tests. In 1911 he wrote:
With practice, training, and above all, method, we manage … literally to become more intelligent than we were before.
Ethan has a growth mindset.
He says to himself, “Self, I can do better. I’ll ask the TA to explain things, give me more problems to do. Not busywork problems, but ones that help me understand. Jimmy will help, too.” (Jimmy is Ethan’s roommate.)
Notice something here. It’s not about working harder, maybe reading the textbook again and again. Ethan monitors what he understands. If reading the textbook again doesn’t work, he tries something else. For Ethan, that means finding people who can help, who can explain to him what he doesn’t understand.
Ethanical is a word now. It means be like Ethan. It can take courage to ask people for help. Thing is, many people love to help others understand stuff.
Seriously, what’s the worse that can happen if you ask your TA and friends for help? Would they hit you with a flamethrower? Probably not.
You’ve got much to gain, and little to lose.
If you want to know more about growth vs. fixed mindsets, Google growth mindset.
I learned to program in the 1970s, when computers were steam driven. Thockatta, thockatta, thockatta. That’s how they went. I’ve learned a dozen programming languages, and written hundreds of programs. Man, am I old. Ooooooooooold.
Even today, I don’t expect my code to work the first time. If it happened, it would scare me. Might be a Sign of the Final Days.
I have a testing mindset, and you should, too. Write a little code, test it, and fix it. Write a little more, test that, and fix it. And so on. Knowing how to find and fix bugs is a critical skill. We’ll talk about that as we go.
Programming is frustrating. Don’t throw things.
Growth mindset. Everyone can learn to program. Ask for help when you need it.
Testing mindset. Write a little code, test it, fix it. Repeat.
Don’t take bugs personally. Your computer doesn’t hate you. Well, yes, it does, but it hates everyone, not just you.