I just finished teaching my first semester of AP Computer Science. I had no concerns with the content (I have a BS and MS in Computer Engineering, worked as a software engineer for a decade, and can recite Stroustrup’s *Design and Evolution of C++*). But, as I shared with students on the first day of class, I have experience teaching college graduates advanced software engineering techniques, not high school students how to understand programming. What I was lacking (and continue to lack) is pedagogical content knowledge (PCK). I hope to make it to an AP conference next summer or another workshop, but many of them seem to target the very important audience of “I just found out I’m teaching AP Computer Science and I’ve never programmed before.” What I’m looking for is a [Modeling Instruction](http://http://modelinginstruction.org/) workshop for Computer Science. If you have any suggestions for workshops that focus specifically on PCK, please [let me know](http://twitter.com/gcschmit). Despite my lack of PCK, I did stumble upon a couple of effective techniques that I wanted to share.

**Differentiation**

I have a very diverse collection of students in my AP Computer Science classes. I have students struggling in algebra 2 sitting next to students who are taking multi-variable calculus. I have students who debug race conditions on our FIRST Robotics programming team and students who are still struggling to distinguish types from variables. I welcome this diversity. I don’t think there should be a math prerequisite. Managing this diversity wasn’t nearly as challenging as I expected. In fact, I find it easier to differentiate in my computer science classes than I do in my physics classes. I do this is a couple of ways.

First, we spend most of our time in class programming. If a student isn’t working on their own program, they are most likely helping someone else with their program. Most of the programming activities that we do are learning activities and, therefore, not graded. I welcome and encourage their collaborative efforts. That’s how software is created in the real world. As a result, the students who need a lot of extra assistance get significant one-on-one time with me and students who need a little assistance get help from other students. This works quite well.

Second, I (and sometimes the students) create challenges for each programming lab. There is a certain base level of functionality everyone will achieve, but that will take some students two days and others twenty minutes. While the students that finish in twenty minutes can help others, I want to provide them a challenge that makes them stretch. I’ll illustrate with a couple of examples.

One activity was to write a palindrome tester. The challenge was to only examine letters and ignore punctuation. Students who met the challenge found some really long palindromes to test.

Another assignment was to use arrays to implement a stack of integers and then use that stack to implement a base-ten integer to binary converter. I defined a couple of challenges: implement a peek method and optimize memory usage by shrinking the array when it is way too big. However, the most popular challenge was found by a couple of students; they extended the program to support converting decimals from base-ten to base-two!

**Choice**

When practicing looping structures, I provided three different programming activities. One was mathematical: the program calculated multiples of a specified number and the challenge was to write another program that calculated square roots using Newton’s method. The second was printing based: the program printed a triangle of asterisks and the challenge was to print a diamond instead. The third was graphical: the program printed various sized boxes and the challenge was to make the graphics look like a Mondrian painting.

While providing students these challenges is good and helps keep all of the students challenged and engaged, the choice of how to apply looping structures in different contexts seems even more powerful and important. I’ve been reading a bit about the disproportionate representation of women and minority groups in computer science classes and these types of choices seem to align with some of the suggestions of how to interest everyone in computer science.

I spent the past couple of days skimming [Guzdial and Ericson’s *Introduction to Computing & Programming: A Multimedia Approach*](http://coweb.cc.gatech.edu/mediaComp-teach). Their approach is fantastic; I’m going to start next semester by applying our new knowledge of arrays to image and sound processing.

Looking forward to next year, I plan to interweave various application strands (multimedia, computational modeling, numerical methods, graphics, databases) as we learn the various concepts. I hope to expose students a bit to all these strands while permitting them to spend additional time and effort on those that appeal most to them. I may field test some of these ideas next semester with capstone projects if time permits.