Official Blog
announcements
+2

# DataCamp's Tab- and Bullet Exercises

Did you know DataCamp recently released two new exercise types? Discover the tab- and bullet exercises in this post!

At DataCamp, we are always looking for innovative ways to improve learning experience. This post will give you more insights into two new exercise types that we recently introduced as a part of our Introduction to SQL and Introduction to Shell courses.

Research on learning has shown that cognitive load is a key factor in how people learn. It also stresses on the importance of shortening the loop between a learner trying something out and getting formative feedback. We designed the Tab and Bullet exercises to lower cognitive load and shorten the feedback loop to improve learning experience.

## Tab Exercises

Consider the following exercise, where a user new to SQL is being taught how to combine GROUP BY, WHERE, and ORDER BY clauses to summarize data.

Get the average budget for every year after 1990 where it is more than $60 million. This requires the user to write the following query: SELECT release_year, AVG(budget) AS avg_budget FROM films WHERE release_year > 1990 GROUP BY release_year HAVING AVG(budget) > 60000000 A novice might feel intimidated writing such a long query. It presents two key learning challenges: 1. Higher Cognitive Load: the learner needs to focus on multiple concepts at the same time. 2. Longer Feedback Loop: they need to complete the entire query before they can get feedback. Analyzing data from our courses supports the hypothesis that exercises with long instructions that require the user to tackle multiple tasks simultaneously result in more requests for hints and solutions, have lower ratings. This same exercise can be rewritten as a TabExercise, that builds up the solution, one piece at a time. This allows the learner to focus on one concept at a time, complete it, submit it to get feedback, and then move on to the next part. It also allows us to label subgoals, which studies have shown accelerates learning as well.. The table below breaks the task down into a series of steps along with the queries you will be writing at each step. Note the gradual build-up of code, with each step focusing on one element of the eventual solution. No Instruction Code 1 Select release_year and budget from films SELECT release_year, budget FROM films 2 Filter the results to only include films released after 1990 SELECT release_year, budget FROM films WHERE release_year > 1990 3 Group by release_year and compute the average budget SELECT release_year, AVG(budget) AS avg_budget FROM films WHERE release_year > 1990 GROUP BY release_year 4 Filter the results to only include years with an average budget greater than$60 million SELECT release_year, AVG(budget) AS avg_budget
FROM films
WHERE release_year > 1990
GROUP BY release_year
HAVING AVG(budget) > 60000000

You can take this TabExercise for a spin to see how exactly it works on DataCamp, and learn some useful SQL in the process!

Figure 1 | Tab Exercise

Here is another example of a TabExercise, this time in R, where the learner is required to use dplyr to solve the following exercise.

Get the most visited destination for each airline carrier.

No Instruction Code
1 Compute for every carrier, the aggregate number of visits to each destination. hflights %>%
group_by(UniqueCarrier, Dest) %>%
count()
2 Sort in descending order of number of visits hflights %>%
group_by(UniqueCarrier, Dest) %>%
count() %>%
arrange(-n)
3 Get only the top ranked destination for each carrier. hflights %>%
group_by(UniqueCarrier, Dest) %>%
count() %>%
arrange(-n) %>%
top_n(1)

By focusing on one step at a time, you will have a much better learning experience. Take this exercise out for a spin here, and let us know what you think.

## Bullet Exercise

Repetition is the key to gaining fluency in any topic. Accordingly, our courses provide users with the opportunity to apply the same concept multiple times in some exercises. Repetition in a traditional exercise suffers from the same drawbacks we pointed out before - increased cognitive load (all code is seen together) and increased time to feedback (all parts need to be completed before submission).

We introduced the Bullet Exercise to handle such situations. In a BulletExercise, you tackle a series of related questions, one at a time, building your understanding as you go.

In the example below, you learn how to select distinct values in a column through repetition. You can take this exercise out for a spin here.

Figure 2 | Bullet Exercise

The BulletExercise differs from the TabExercise in three important ways:

1. Concepts: the sub-exercises in a BulletExercise are homogenous and focus on one concept, whereas those in a TabExercise can be heterogeneous and focus on how to combine multiple concepts.

2. Dependence: the sub-exercises in a BulletExercise are standalone and independent of each other, where those in a TabExercise are dependent and build on one another.

3. Display: the sub-exercises in a BulletExercise are short, repetitive, and displayed at the same time, whereas those in a TabExercise are longer and displayed one at a time.

Faded examples are a powerful way to help you learn. The Tab and Bullet exercises allow us to support faded examples in our learning platform. The basic idea is to start with the full structure of the solution code, and remove pieces at every step so that by the end, you are writing the full code to solve the exercise, from scratch.

Shown below is an example that teaches the use of the GROUP BY clause in SQL using fading.

Note how the structure of the sample code remains mostly unchanged, and every step reduces the extent of scaffolding you receive. By the time you arrive at the last task, you internalize the code structure, and should be able to write the full query without any support! A faded example of this kind can be easily implemented in DataCamp as a BulletExercise, as seen here in this example.

No Instruction Sample Code
1 Compute average budget of films by year of release SELECT release_year, AVG(budget) AS avg_budget
FROM films
GROUP BY release_year
2 Compute average gross earnings of films by language SELECT ___, ___ AS avggross
FROM films
GROUP BY
__
3 Compute average budget of films by country of production SELECT ___, ___
FROM films
_____ __ ___
4 Compute average gross by release year and language

To get the best effect, we can combine these and follow a TabExercise that breaks up a multi-part exercise into steps, with a traditional interactive exercise where you can flex your muscle on a newly acquired skill, by solving a similar problem from scratch. An example of this can be seen in the SQL course, where a TabExercise on writing a complex query is followed by a NormalExercise, where you write the full query from scratch.

## Conclusions

Currently, we support Tab and Bullet Exercises only in our SQL, Shell, and Git courses. Initial data shows that these exercise types lower the percentage of users requesting a hint or a solution by 25 - 50%, have better ratings, and provide an improved learning experience. We will be rolling these exercise types out for the R and Python courses as well. As always, we would love to get your feedback and comments on this topic as we prepare for the rollout!