Mathematics uptake

Teaching coding in modern statistics

The Business Analytics program at Monash University is data first

Students learn coding from week 1 of their degree, and are working with data from week 2

This means that students see code as part of their understanding, rather than as a result of their understanding

A typical introductory tutorial

A typical introductory tutorial

How I learnt to code

Tip

We’re up to Java 25 now… 👴

Competition in the classroom

There is plenty of research that suggest competition amongst students enhances learning outcomes:

  • Chen, Law & Chen The effects of peer competition-based science learning game on secondary students’ performance, achievement goals, and perceived ability Interactive Learning Environments (2018)

  • Cagiltay et. al The effect of competition on learning in games Computers & Education (2015)

Anecdotally, we have run prediction competitions as assignments, and students are enormously engaged, start early, and regularly seek feedback

Code Golf

Code golf is a type of recreational computer programming in which participants aim to solve a problem [accurately] using the least number of characters in their source code.

Code Golf

In the depths of YouTube, Code Golf is a popular format for teaching programming concepts.

One of the most popular sites is CSSBattles, where players compete to write the shortest CSS code to match a target design.

ggplotbattles.dev

ggplot battles

  • Built using webR and javascript
  • No local R installation required
  • Measures pixel-by-pixel correspondence
    • not code equality!

The system

  • Battles are self-contained R files
  • Uses a quarto-like syntax for defining parameters and relevant text
  • Open-source, more battles = more good
#| title: "Penguin Distributions"
#| dataset-name: "palmerpenguins::penguins"
#| colours: "`c('darkorange','purple','cyan4')`"
#| description: "The `palmerpenguins` dataset is one of the most famous in modern R programming. Data were collected and made available by [Dr. Kristen Gorman](https://www.uaf.edu/cfos/people/faculty/detail/kristen-gorman.php) and the [Palmer Station, Antarctica LTER](https://pallter.marine.rutgers.edu/), a member of the [Long Term Ecological Research Network](https://lternet.edu/). The original data is available [here](https://allisonhorst.github.io/palmerpenguins/)."

Evaluating effect

Approved for a real-world education experiment in ETC1010/5510: Introduction to data analysis

  • Approximately 400 students
  • Split class into two groups: one group uses ggplot battles, the other does not
  • Run pre- and post- quizzes which evaluate their learning of ggplot2 concepts
  • Measure difference in score using a mixed-effects model, with a participant-level random effect

Quizzes

Monash uses Moodle as it’s eLMS. Quizzes are designed using the moodlequiz RMarkdown package, which makes generating quizzes from R code fairly seamless.

Quizzes

Upcoming features

  • IDE to look more IDE-like (variable windows, multiple files etc)
  • User-account system for scoring and tracking
  • Revamped battle categorisation since the number of battles has grown

How can you help?

If you would like to use ggplotbattles.dev in your own teaching, please do, and please tell me about it.

If you have an idea for a battle, please submit it to the GitHub repo

ggplotbattles.dev