How to Teach CS
I’ve been grappling with a lot of ideas about teaching CS and how to teach CS for the past few days. I recently reflected on my own experience with functional programming and closure. Then Alfred Thompson wrote about teaching XML in schools. And of course it’s come up this year in my classes, as I tried to teach the basics of ActionScript to my 12th grade students. Tried. The result ended up being more like “copy this code and modify it”. I didn’t give enough exercises or teach with enough granularity to expect students to really understand what they were doing. I need to build that more carefully next time. I have all the tools to deliver it. I just need to develop the curriculum, and be sure that I understand my goals.
Part of the problem here is that I need to unpack my own knowledge about CS and programming. With an undergrad education and years in the industry, there’s a ton of information and practical experience that I rely on to get things done but don’t consciously or explicitly deal with. It’s time to bring that out. It’s time to slow down my teaching, build better assessments, and script the presentation more closely. I think I need to build a concept map and figure out the dependencies, then try to project that onto a calendar.
I think the main sense I want to endue is that of debugging. If I can get students using document.write() and alert() to provide themselves with information, with output, I feel like that’s a key tool — not just practically, but also conceptually. Reading output and checking state along the path of execution what turns programming from an abstract problem into a testable, solvable puzzle. When you can see what happens as a result of the code you wrote, and choose the points that you want to see those results, it becomes a Rubic’s cube instead of a math problem. If that’s all they get from it, I’ll be happy. But hopefully they’ll come away with the seed of an understanding of what programming is and what it feels like to spend time doing it, along with some finished products they can see in a browser.
More than other subjects, it seems like there are a huge diversity of approaches to teaching CS. This is probably because there are a profusion of languages and development environments, as opposed to say math, where there’s only one algebra in common use. I almost don’t know where to start researching what other people have done in terms of introductory CS classes that are intended to go deeper conceptually than just the syntax of calling on pre-built libraries of functionality. Obviously you can’t get a high school class deep into theoretical computer science in 6 weeks, but it seems like there might be some ways to get at the underlying ideas that work better than others. Suggestions, anyone?