Mark Guzdial writes about an article I, too, read recently suggesting that these learn to code sites aren’t doing the job. It’s not enough for students to go through a tutorial; they still don’t have the real problem solving skills necessary to do “real” programming. For example, they don’t really know what a loop is, or why you’d use it. He backs up some of the claims in the article with older research that essential shows the same thing: learning to code requires a lot of practice and teacher (or peer) support. In other words, students need a classroom and the culture that goes with it, in order to learn to code beyond just surface level remembering bits.
I’m coming to think that problem solving should come first or simultaneous with learning to code. Learning to code doesn’t necessarily correlate to problem solving, though many people think it should. Programming is a way of solving problems. The most frequent question I ask my students is, “What are you trying to do?” In other words, what problem are you solving. We often then talk through possible solutions. I think the difficulty lies in translating a solution into the programming language at hand. You’re sort of forced not just to solve the problem, but solve the problem with a particular set of tools, which I think adds to the difficulty level. I kind of like that. It’s a little like writing a sonnet. When you have constraints, your creativity sometimes blossoms. But sometimes that can make things seem more difficult.
I’m learning a new programming language at the moment, and I have to admit, it’s easier than learning the first. I understand what a loop is. I understand what looping through an array (or a list in Python) is. I understand that computers count from 0. I understand why looping is important, and I understand that you can repeat by 1s, 2s, 5s, etc. (to count by 2s, 5s, etc.). One should know those kinds of things after learning to code. I think one of the biggest things I learned, even before really learning to program, was that the goal of computing is to make the computer do the work for you, and to do that work as efficiently as possible. Repeat where possible. Use as few steps as possible. Understand how computers see and process data. To me, those are the fundamentals. They can be learned through coding, but they can be learned in other ways, too. Perhaps learning those things ahead of time as concepts would help.