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:

lanpairs

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.

  • Mike James has lost count of the languages he has learned. He started with Fortran and BASIC, progressed through Java and Lisp and most recently delved into Go and Rust. His language-specific books in the I Programmer Library are on Python, Kotlin, C# and JavaScript, see sidebar.

More Information

Here We Go Again: Why Is It Difficult for Developers to Learn Another Programming Language?

 Nischal Shrestha, Colton Botta, Titus Barik, Chris Parnin

Related Articles

Language Aptitude Not Math Predicts Programming Skill

Does Math Help Programming Or Programming Help Math?

Deep Teaching

Computational Thinking For Kids

The Real Reason To Learn To Program - The Power

What Makes A Programmer

Programming - A Life Long Challenge

Teach Concepts Not Just Code

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

 

Banner


AI Propels Python To Top Language on GitHub
30/10/2024

This year's Octoverse Report reveals how AI is expanding on GitHub and that Python has now overtaken JavaScript as the most popular language on GitHub. The use of Jupyter Notebooks has also surged.



Prompt Engineering Techniques To Make You An Expert
18/11/2024

Introducing a GitHub repository full of hot tips and instructions on how to build the perfect prompt presented in a collection of Jupiter Notebooks.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

<ASIN:1871962587>

<ASIN:1871962706>

<ASIN:1871962714>

<ASIN:1871962420>

Last Updated ( Wednesday, 16 March 2022 )