|What Makes Learning A New Language Difficult|
|Written by Mike James|
|Wednesday, 16 March 2022|
So you know language x and you think that there is a good reason to try language y. Surely the switch should be easy - after all, programming languages are all the same, right? New research suggests that there are problems.
There is no question that the hardest part of learning to program is the initial idea of what it is all about. We still tend to teach beginners as if learning a language, was the same as learning to program. It isn't. But once you have learned a language we can say with some certainty that you can program. You might not be any good at it but you have made the transition from non-programmer to programmer and this is a huge leap.
After the huge leap you would expect changing to another language would be a toddle - but apparently not. Learning another language is tough because of interference from what you already know. New research from North Carolina State University and Microsoft strongly suggests that the problem is that once you learn a language your mind set and habits make swtiching to another language harder than it should be. What is more this fact is largely ignored and there are no tools or facilities to help with the problem;
To learn new languages, every programmer we interviewed used just-in-time learning, an opportunistic strategy focused on only learning features as needed. Given time constraints, programmers made use of immediately available resources such as online documentation, video tutorials, online searches, and available experts. Traditional resources such as programming language books were only used as a reference, because programmers "just don't have time to do that"
Just-in-time learning - ah I know it well and with the help of the Internet it can work well 90% of the time. When it fails, however, you are usually left in a "if you want to get there I wouldn't start from here" situation after "just-in-timing" your way into entirely the wrong place.
Cross-language interference is a real problem:
Cross-language interference occurs across various language transitions on Stack Overflow posts. We found that 61% of the 450 posts contained incorrect assumptions about the target language, and only 39% contained correct assumptions.
This is most likely a consequence of the just-in-time approach to learning the new language. You carry on with what you know and can modify it slightly until the practice reveals that you really can't make something work and you have to step back and admit that you need to realize something new about the language.
The research was done by looking at Stack Overflow questions about pairs of languages and then doing interviews. You can see the number of posts for each language pair and what percentage had answers accepted and what percentage had correct starting assumptions:
So what can we do about it?
The paper presents four possible solutions.
Implication I—Design documentation that reduces interference and supports knowledge transfer.
The idea here is that we tend to write documentation for beginners not experienced programmers. Experienced programmers need key differences pointed out and similarities confirmed.
Implication II—Build automated tools to provide on-demand feedback
Well this seems like a good idea anyway!
Implication III—Be intentional about programming language syntax, semantics, and pragmatics.
This one seems a like unlikely do we really expect language designers to take account of how easy it is to convert to their language.
Implication IV—Support not only programming languages, but programming language ecosystems.
This also seems like a tall order - make the entire environment more like other environments. The trauma of having to move to new tooling is part of the trauma of having to deal with a new language - it all adds to the stress. I don't think anyone would disagree with this, but the idea that we have a single IDE and language environment seems unlikely to be achieved.
Read the rest of the paper. It is interesting and, for a research paper, suprisingly easy to read.
Nischal Shrestha, Colton Botta, Titus Barik, Chris Parnin
or email your comment to: firstname.lastname@example.org
|Last Updated ( Wednesday, 16 March 2022 )|