Question:

How much code scaffolding should I use?

Answer:

Writing code is one of the fun things about completing DataCamp courses and projects, so use the least amount of scaffolding that will allow the students to complete the exercise without resorting to hints.

This depends upon several things.

  1. Which learner personas are you targeting? Students with less coding experience may benefit from more scaffolding.
  2. Is it the first time students have seen this code before? Provide more scaffolding the first time the students see some code, then reduce on subsequent occasions.
  3. Are there multiple solutions to the exercise? Where there are many possible solutions to an exercise, it can become tricky to provide high quality Submission Correctness Tests for all solutions. In this case, your Content Developer may ask you to provide more scaffolding to encourage students towards a particular solution.
  4. Do you want to focus students' attention on a particular piece of code? Some lines in an exercise may be more closely related to the learning objective of the exercise than others. Make the students type more of those lines.

Here's an example from Foundations of Inference, Ch2Ex15. The exercise asks the students to perform a visualization task and a calculation task for three datasets. The first time, more scaffolding is provided by including the name of the dataset, the names of the arguments, and quotes around the second argument to indicate that it should contain a string. After that, less scaffolding is shown.

# Visualize and calculate the p-value for the original dataset
disc_perm %>%
  ___(obs_stat = ___, direction = "___")

disc_perm %>%
  ___(___, ___)

# Visualize and calculate the p-value for the small dataset
___ %>%
  ___(___, ___)

___ %>%
  ___(___, ___)

# Visualize and calculate the p-value for the original dataset
___ %>%
  ___(___, ___)

___ %>%
  ___(___, ___)
Did this answer your question?