Proving and Improving Teaching Programming Languages
SIGPLAN Education Board has produced a report “Why undergraduates should learn the principles of programming languages” which was presented at the ACM Education Council meeting. It makes four claims for why students should study programming languages:
- Students learn widely-applicable design and implementation techniques.
- Many students will need to create new domain specific languages or virtual machines, so it’s useful for them to study what’s known about languages.
- By learning programming languages, students learn new computational models and speed learning of new languages. ”The best preparation for quickly learning and effectively using new languages is understanding the fundamentals underlying all programming languages and to have some prior experience with a variety of computational models.”
- Students learn how to choose the right programming language for a task.
The problem is that we have empirical support for none of these claims. People are amazingly bad at transferring knowledge. People tend to learn about a specific situation and not recognize when the same idea applies in a new situation — or worse, they transfer negatively, mistaking the similarity and using older knowledge in an incorrect way.
One of the few treatments of transfer of programming knowledge is The Transfer of Cognitive Skill by Mark Singley and John Anderson. Transfer between programming languages, even between skills in the same language, is surprisingly small. For example, there is evidence that students don’t even transfer (“vertically” as they describe it) between knowledge of how to write programs and how to debug those programs.
This doesn’t mean that the SIGPLAN folks are wrong or that those claims are wrong. It’s simply that they haven’t been shown yet.
- We need studies showing students learning design and implementation techniques from programming languages, then applying them in new contexts.
- We need to show that students can usefully draw on older languages when designing new languages.
- We need to show that knowing one set of languages improves learning of a later set. (Ben Shneiderman argued in the late 70′s that learning a second language can be even harder than learning a first language.)
- We need to show that we can teach students rubrics or guides by which they can choose new languages effectively.
My guess is: We can do all these things. The real trick is how we teach such that these things happen. There are these great examples in How People Learn showing that highlighting foundational knowledge, so that students recognize it and can use it in new contexts, can improve performance. It is possible to teach for transfer. No, transfer doesn’t occur automatically. That doesn’t mean it can’t happen.
The SIGPLAN Education Board is planning to produce curricula to support the goals they’ve outlined. I hope that they also create learning guides, recommendations on how to teach programming languages, and studies showing that these guides and recommendations work. I believe that we can prove that learning programming languages can be very useful, but it may involve improving on current practice, which may not be informed by what learning scientists know about teaching for transfer.