It's Like Python But... Teaching Programmers New Languages
Written by Mike James   
Friday, 31 August 2018

An important, but mostly ignored, group of programming language learners are those expert in another language. Most programming resources either assume you are a complete beginner or an expert, but not an expert in another language.

I have often said that once you learn to program, learning other languages is easy and the key is to make the connection between the basic ideas in the first language and the second. I don't even think you need to be that specific - find out what a variable, loop, conditional construct, etc. is in the new language and you are off the starting blocks. Discover what the language claims to do that makes it special and you are almost home.

Of course, all of this is just opinion. You need research to back up any suggestions like this and, guess what, there is remarkably little research on such topics. Enter the latest paper from Nischal Shrestha,  Titus Barik and Chris Parnin from North Carolina State University and Microsoft Redmond -  It's Like Python But: Towards Supporting Transfer of Programming Language Knowledge. They are working on the slightly more restricted idea that knowing a language can help you learn a second language if you make use of analogies between the two. 

The idea is fairly simple, if you have an experienced Python programmer and they want to learn R, don't start as if they were a beginner, but point out the similarities between R and Python. Show how R does the things the programmer knows how to do in Python.

transfer1

One of the new features of this research is that they implemented Transfer Tutor - a program that teaches by analogy:

We designed Transfer Tutor as an interactive tool to promote “learnable programming” so that users can focus on single syntax element at a time and be able to step through the code snippets on their own pace. We made the following design decisions to teach data frame manipulations in R:

1) highlighting similarities between syntax elements in the two languages

2) explicit tutoring on potential misconceptions

and

3) stepping through and highlighting elements incrementally.

The design also made use of negative transfer learning, i.e the things that you might assume were the same but were in fact different.

You can read the detailed results in the paper, but essentially the subjects seemed to find the experience useful and made lots of points where learning by analogy and contrast was more efficient. One unexpected finding was the participants were reluctant to accept certain facts without trying them out through code execution. I don't know about you, but if something makes sense and is logical in context, then I'm happy to accept it without an explicit test.  The Transfer Tutor wasn't liked by all students, however, and there is clearly room for some fine tuning.

In this paper, we evaluated the effectiveness of using learning transfer through a training tool for expert Pythondevelopers who are new to R. We found that participants wereable to learn basic concepts in R and they found Transfer Tutorto be useful in learning R across a number of affordances.Observations made in the think-aloud study revealed thatTransfer Tutor highlighted facts that were easy to miss ormisunderstand and participants were reluctant to accept certainfacts without code execution. The results of this study suggestopportunities for incorporating learning transfer feedback in programming environments.

Personally I don't find this surprising and, while it might be self publicity, I use the transfer idea in both of my books - Programmer's Python and Programmer's Kotlin - only in a more general sense. All languages have communalities and it almost certainly isn't necessary to say "here is an assignment in Java = and here is it in R <-". The concept of assignment is universal, and all you need to do is discuss what the language supports - value semantics, reference semantics or borrowing, as in Rust.

Discuss concepts and leave the commas to look after themselves - or more accurately leave it to the parser.

 operators

More Information

It's Like Python But: Towards Supporting Transfer of Programming Language Knowledge

Related Articles

The Real Reason To Learn To Program - The Power

Does Math Help Programming Or Programming Help Math?

Deep Teaching

Teach Code In School - Before It's Too Late!

Trouble At Code School

MOOCs Fail Students With Dark Age Methods

Programming - A Life Long Challenge

Teach Concepts Not Just Code

What makes a programmer

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


Node.js 15 Improves Rejection Handling
26/10/2020

Node.js, the JavaScript runtime, has been updated with support for npm 7, better handling of rejections, and an experimental abort controller.



Foojay - All About Java and the OpenJDK
02/11/2020

Tracking the OpenJDK is not an easy feat. It evolves rapidly under a release cycle of a new version every 6 months, hence there's hoards of new features, changes and bug fixes.This is where foojay ste [ ... ]


More News

square

 



 

Comments




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

<ASIN:1871962587>

<ASIN:1871962536>

Last Updated ( Friday, 31 August 2018 )