Steps

I had the same conversation with students in my class three times today. I said, “I’m not sure what’s wrong with your code, though this part looks suspicious.” I asked, “What was the last version of your code that worked?” And I said, “I would go back and re-implement this in tiny steps, making sure at each stage that your code passes your test suite.” And then I listed the steps that I went through, none of which involved more than a few lines of code, and described the types of problems that they could run into if each of those steps went awry. And in each case, I heard “That makes sense; I just wasn’t sure how to break things down into smaller steps than the one I took.”

It’s a funny thing: the only way I know to make progress sometimes is to make mistakes constantly. If I find the mistakes fast enough, there might be little enough time between fixing one problem and creating the next so that I at least don’t get confused about where the problem is!

Comments

blog comments powered by Disqus
Fork me on GitHub