Teaching students to learn programming

I had one of my better third semester programming students get a bit upset with me today. I had given the class an assignment to write a simple pinball game using Corona. He had been gone the last couple of weeks for various school sponsored reasons so was a bit behind. His comment was “But I do not know anything about this language!” I pointed at the computer and said “find an example and learn”. Being a kid he huffed and puffed and ten minutes later had the idea of how to do what he wanted to do. And of course this got me thinking on my expectations in my programming classes. After X number of semesters what do I want them to be able to do?

Here is sort of my rough outline.

Sem 1: learn the syntax of a simple language (Scratch and Small Basic). Understand common programming usages for If, While, For, global vs. local variables, use comments and write fairly simple programs. Semester one involves a lot of instruction and guidance. Lots of step-by-step. Most of these kids are taking their one and only programming course. I want them to come away from the class with the idea of what programming is; that programming is useful and that although it can be a bit geeky, it does not require that you be a genius to do it. I also what them to get the idea that some really fun things can be done with it. If a kid is interested in being a game writer they will get an idea of the work and planning involved and that it is not impossible.

Sem 2: Program with Visual Basic (just ‘cause it is as good as any and we own some text books). Teach the kids how to read the book problem, break the problem into pieces and build the pieces. Much less step-by-step guidance but still lots of guidance. Lots of forcing them to read the book.

Sem 3: Learn a language (actually several) that we do not have a text book for. Use an API, on-line resources and sample code to reach a fairly operational level in the language. Hopefully learn how to learn. I want them to be able to find and read the resources.

Kids hate to learn how to learn. They want it handed to them in a nice package, hopefully in a step-by-step manner in a lecture. (I kind of like it that way too but then I am also pretty lazy.) For the Corona assignment I show them where to get the free download of Corona, how the website is laid out, which tutorials are halfway decent and some good sample code to look at. At this stage I do not want to teach them to code, I want them to learn to code using the resources available. The class becomes much more interactive. The kids share the “how did you do that?” code. They end up having to teach themselves to a large extent. They learn how to learn.