Coding is hard?

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.


4 Replies to “Coding is hard?”

  1. DC1 has been playing with Scratch and it really seems like a toy. I’m not sure if we should try to find something else or look harder for Scratch assignments or what. I’d really like something like the little Pascal bot that I learned with where each assignment introduced a new concept and you moved a little red dot around a maze.

  2. Making a game in scratch can teach some pretty complex skills, especially if you do things like keep score. I basically do the “teach a new concept” trick in intro. We learn loops by making a square, for example. I’m creating all my assignments online using video. I’ll share them here. Feel free to share with your kids.

  3. This problem affects the way computer science is often taught, online or not. Unfortunately, “problem solving” is sufficiently open-ended that we can fall into the trap of thinking that we’re teaching it, when we really aren’t teaching anything concrete enough for students to learn.

    Along the lines of asking “what are you trying to do”, you can have students write test cases _before_ they write code. Writing tests (with both the expression to test and the expected output–the latter is essential) forces students to think about what they are trying to achieve, and to say it concretely. Also a terrific tool for starting to answer the “my code doesn’t work” question — it often doesn’t work because the student didn’t really understand what the code was supposed to do!

    If you really want to drive home connections between problem structure and code, you can also teach students a process for structuring their code around the types of input data that a function requires. We’ve used this “tests, then structure, then fill in code” process for 20 years to push students beyond just coding. It’s the core of our pedagogy (not something we try to bolt onto programming later). Too many classes take the “bolt-on” approach to teaching skills beyond coding.

    If anyone’s interested, our books/materials are free online at (high-school/college course) and (middle and early high-school). Happy to answer questions via email. We do a lot of PD workshops and ongoing support for teachers who want to try our materials.

    Kathi Fisler (

  4. Kathi,

    Thanks so much for your comment and suggestions, extremely helpful! I’ve looked at your materials before. They are indeed quite useful.

Comments are closed.