Hints: best practices

Learn some tips on how to write exercise hints that get learners closer to the solution without giving it away.

Amy Peterson avatar
Written by Amy Peterson
Updated over a week ago

Writing a hint for every exercise is crucial. Not all learners will successfully complete an exercise using the context and instructions alone, but it would be even more frustrating if they weren't given further help in these situations and couldn't complete the exercise at all. Therefore, we require every exercise and every step of multi-step exercises has a hint to help learners achieve success. However, hints are not the easiest things to write; it's a balancing act of providing enough information without providing too much information. Read on for some tips on how to write hints in your exercises.

Screenshot of coding exercise with hints highlighted

How much help should each hint provide?

A useful heuristic is that the hint should get the learner halfway to the answer. Across all of DataCamp, 86% of learners go on to ask for the solution, which is way above the 50% target. "Halfway to the answer" is further than you think. Be bold in your hinting.

How many hints should I provide?

One hint per instruction is a good starting point. For easier exercises, this may reveal too much of the solution, and for harder exercises, it may not cover all the common problems that learners have, so you are free to use your judgment and have greater or fewer hints if necessary.

Jog learners' memories

A common reason that learners may fail to be able to complete an exercise is that they have forgotten something they learned in a previous exercise. You can use the hint to jog their memory.

Anticipate a problem

Often there are a few specific things that learners will get wrong. You can use the hint to address these things. Once your course has launched, you can use the Content Dashboard and the Diff Viewer tool to identify the problems that learners are having.

Don't provide the answer

It can be tempting to solve the problem of an exercise being too hard by providing a chunk of the solution in the hint. If an exercise is reduced to a "copy and paste" problem, the learner doesn't learn much, so this is discouraged. In general, try to phrase the hint so that a small amount of thinking is still required to solve the exercise.

Don't repeat the instruction

The opposite problem is that hints may simply repeat or rephrase information in the instructions, without providing any new help. Since learners have to spend XP to see the hint, this is a big source of frustration.

Examples

From Repetition in "String Manipulation in R with stringr." The hints refer to knowledge that the learners already have from previous exercises.

  • "The input to the negated_char_class()  is the same as that of char_class()  you used in the previous exercise."

  • "Wrapping exactly()  around a pattern is the same as specifying the pattern in between START %R% and %R% END like you've done before."

From Specifying the Microwave Oven class in "Object-Oriented Programming in R: S3 & R6". The hints focus on anticipating learners' mistakes (misspelling; wrong assignment operator) rather than providing solution code.

  • "The class name is case sensitive. Did you spell "MicrowaveOven" correctly?"

  • "Use = for assigning arguments within the call to R6Class. For example, private = list(), not private <- list()."

  • "Similarly, use power_rating_watts = 800, not power_rating_watts <- 800."

From Simple filtering of numeric values in "Intro to SQL". The hint shows the structure of the solution.

SELECT ___
FROM ___
WHERE ___ = ___;

Did this answer your question?