I've been trying something a little bit different for our CS2 class this semester. The course typically covers object-oriented programming in Java along with topics like recursion. In fact, students becoming proficient in Java is one of the hard requirements of the course. But students who have recently passed the course did not seem sufficiently prepared for what came next: systems programming with C. In fact, some students (barely) passing the course seemed not to be able to program sufficiently well on their own at all.
I knew there was an appetite to try something new, and I thought I had the perfect book to try out: Think Like a Programmer. Only problem was that the book uses C++, and as I said above, we need to use Java. I ended up chatting with a member of our curriculum committee about it, and we realized that maybe, just maybe, we could do both. We could teach just a bit of C++ so students would understand the book, and do our major examples and assignments in Java. So that's what I'm doing. The question is, will it turn out well, or end in disaster?
In some ways, it seems like trying to cover two languages in a course where many students can't grasp even one is a really bad idea. But hear me out. I am not trying to teach them how to be proficient C++ programmers. My goal is only to show enough C++ so that students can understand Think Like a Programmer, and even more importantly, so that I can more explicitly illustrate some key concepts in Java that are normally hidden away.
For example, C++ makes you choose whether you are passing by reference. With some simple examples, I can illustrate the difference between pass-by-reference and pass-by-value more clearly. When we get to Java, I can easily explain what gets passed by reference automatically. Understanding dynamic memory can also be made more explicit in C++, then applied to topics like creating linked lists in Java. Even the fact that C++ allows me to build up to objects without needing to have a dummy class in the meantime is quite helpful.
We're only in our third full week of class so far, and we're just getting started on Java. So I don't know yet how well this experiment will work once we have the two languages going side by side. But I can say that it has been very beneficial to be able to approach the course using the problem-solving perspective of Think Like a Programmer and the slightly lower level view that C++ allows for things like how variables and arrays are stored in memory. If this continues working well, I think this could be a winner.
I'll be soliciting anonymous feedback after a couple of weeks of using both languages, and hope to report back after I get some data from students. Eventually I'll also share more details about the course design itself.
In the meantime, I wold love to hear your opinion - does this approach have potential, or do you see it as a disaster waiting to happen?