Skip to main content

Creating an Interactive Online Student Programming Experience Supported by R and OneDrive

Laptop turned on with code displaying on the screen and a plant next to the laptop in a coffee shop.
Tue, 19 Oct 2021

By Niall Devitt.

Reading Time: ~5 mins.

Featured Image Source: Photo by James Harrison on Unsplash.

 

In this post:

Author's video overview

Introduction

There is a famous, or perhaps infamous, saying in software programming that more time is spent correcting code than is spent writing new code. The same can also be said for the teaching of programming languages, where substantial time can be spent correcting basic command and syntax errors.  This problem is further amplified by the move to online learning where it is not possible to call over to the student’s desk to help them sort the code, with an increased risk that they cannot follow along with the commands.

 Some of the open-source features of R programming, combined with the free OneDrive storage system for students and lecturers at UL, help with reducing this risk through interactive weblinks and web pages. This blog explains some of the teaching methods and practices that have proven useful in online lab classes.

Getting prepared for the lab class

One of the first tasks involved with teaching statistics in programming languages is for students to load clean data to the console, sourced from online repositories. In advance of a lab class, the data is cleaned and saved to the lecturer’s OneDrive account. Once saved, the lecturer right clicks on the data file, and goes to the share option denoted by the cloud symbol (Image 1).

Screenshot of the OneDrive Share option.
Image 1: OneDrive Share Option

Here, the “copy link” option can be chosen to create a weblink that links up directly with the data in the OneDrive folder. In just a couple of lines of code, this link can be used to transfer the data directly to the students’ consoles (Image 2).

The copied link code created from the OneDrive Share option.
Image 2: Live Data Link

In a live lab class using Big Blue Button, these two lines of text can be added to the chat area so that students have direct access to the content. It eliminates the requirement of having to transfer csv or excel type files which need to be saved down to the main computer and called directly from this location, which can slow down the progress of the class.

Creating an interactive student experience

Once the student has the data loaded to their console, the next step is to work through code to perform statistical tests. This code can be quite complex and any error in writing out the syntax will fail to run the command. One option is to provide the student with the list of code in advance of the session, however it has been noted from experience that this removes some of the incentive of attending the class, while also being an inferior product of copying and pasting the content rather than building it from scratch.

Again, the OneDrive system can provide an efficient way of providing the code directly to the student as the lab class progresses. First, an R script document is created in RStudio and saved down to the OneDrive folder (Image 3). 

Screenshot of a new R script being created in RStudio.
Image 3: Creating an interactive R document

Next, the link of the saved R Script document is copied using the OneDrive Share option, as explained above. This link can be used on any web browser, pasted into the address bar, to see a live version of the lecturer’s R script document on the students’ screens. Once the lecturer writes new code they select the save option (Image 4). The student refreshes their browser and the newly created code appears (Image 5). They can then copy this over to their console to ensure they follow the correct syntax. 

Click the images below to see both a lecturer and student view of this live online lab class.

Conclusion/Summary

A lack of face-to-face engagement with students can make it more difficult to deliver module outcomes in online settings. The methods in this post create stability and consistency in the delivery of the course materials, with all students able to move along with the class. The code is left available on the live link for one week, until the next lab class, so students must engage with the content within that time. These methods are also useful in face-to-face lab classes where students can follow along with the instructor’s console in real time. In all, the experience becomes accessible to students of all abilities with greater potential for understanding the course content and passing the module outcomes.

Related LTF Resources

Office 365 Apps (including OneDrive): https://www.ul.ie/ltf/supported-tools/office-365-apps