I recently had two CS colleagues (from different schools) make the claim that we shouldn’t worry about the programming language in the first course because it just doesn’t matter. They each believed that we should focus on the CS learning outcomes. The belief is that if students learn the concepts well, then the students can simply apply it to whatever language they learn next. Ben Shneiderman and Richard Mayer described it this way in 1979 (see link here):
Learning a first language requires development of both semantic concepts and specific syntactic knowledge, while learning a second language involves learning only a new syntax, assuming the same semantic structures are retained. Learning a second language with radically different semantics (i.e., underlying basic concepts) such as LISP or MICRO-PLANNER may be as hard or harder than learning a first language.
The empirical evidence I know suggests that learning a second language isn’t easy for most learners. While there is typically transfer from one programming language to another, it’s not seamless. Tshukudu and Cutts have been studying what transfers and what doesn’t when students move between Python and Java (see paper here). David Weintrop studied students moving from block-based to text programming. Yes, there was transfer, but learning was slowed when they shifted modality (see blog post here).
The first programming language is particularly important when we think about programming for other-than-CS majors. Students want to learn what’s valued in their desired community of practice. If a student wants to become a data scientist, R or Python makes a lot more sense than learning C. A computational artist might be motivated to learn Processing, but might not see a lot of relevance for learning MATLAB. Not everyone who learns programming today wants or needs the ability to switch languages as easily as computer scientists do.
I’ve been thinking recently about this question from the other side. Why did anyone ever think that the first programming language didn’t matter?
I have a hypothesis that this belief once was true, when the field was younger. When CS curricula were first defined in the late 1960’s, there was an emphasis on the mathematical underpinnings of programming. Nathan Ensmenger describes it in “The Computer Boys Take Over” as part of increasing the perceived professionalization of computer science. So students who entered computer science in the early days typically had a stronger mathematical background than the average students learning to code today. This is obvious when you consider that the average has shifted. Programming was mostly taught to undergraduates in the 1970’s, and today, there are probably more K-12 students learning coding in the US than there were undergraduate CS majors in the 1970’s. CS education was developed assuming a stronger mathematics background than we can assume today.
Here’s my hypothesis: The transfer that Shneiderman and Mayer saw wasn’t from one language to another. It was transfer of different forms of the same mathematics. If we teach the semantics of the programming language based on mathematics students already know, then a new syntax is just a new formalism for the mathematics. Math has always been taught, “Now let’s try it this way.” Mathematicians love to explore the same idea in different formalisms or with different approaches. Check out the Pythagorean theorem page in Wikipedia — there are more than a half-dozen proofs described. We’re conceptualizing the problem wrong if we think only about the programming knowledge transferring. For students with a strong mathematical background, the first programming language and future programming languages are just different notations for things the students already knows. That explains why what Shneiderman and Mayer are describing used to be true. But I don’t think it is anymore.
But what if the coding learner doesn’t know a lot of mathematics already? What if it’s a sixth grader who struggles with math class and is now taking his first CS class? What if it’s a graphic designer who is trying to script PhotoShop but avoided math classes doesn’t think of themselves as a programmer (see Brian Dorn’s work)? I predict that transfer to Python or MATLAB is going to be a lot harder than what Shneiderman and Mayer were describing. What if the coding learner is a “conversational programmer” (see paper here) who wants to be able to talk to programmers about their tasks but doesn’t actually want to develop software? The modern coding learner is a lot different than the ones in the 1970’s.
We don’t have to make programming about mathematics. We know that most people using Scratch are telling stories without a lot of math (see paper here). Conversational programmers struggle to find resources that help them learn because so many of them require a focus on the logic and mathematics (see paper here), but we are developing approaches to help conversational programmers learn without the math (see paper here). We might be able to teach a lot more people about programming if we don’t expect students to know mathematics first, which we may have been able to expect 40+ years ago.
If I’m right, there are implications for researchers and for teachers. For researchers, if you’re looking for transfer and not measuring mathematical prior knowledge, you may be missing a critical explanation for any transfer you’re seeing. For teachers, be aware of accidentally teaching programming-as-math. If your students are struggling, maybe you’re relying too much on mathematical knowledge that isn’t there.
Mark Guzdial is professor of electrical engineering and computer science in the College of Engineering, and professor of information in the School of Information, of the University of Michigan.
Join the Discussion (0)
Become a Member or Sign In to Post a Comment