DEV Community

Tul-id Digital
Tul-id Digital

Posted on

Why I built a spaced-repetition app for coding drills

I used to read a solution, nod, and move on. A week later I could not write the same thing from scratch. Understanding something while it is on the screen and being able to produce it yourself are different skills, and only the second one helps in an interview or on a real project.

That is why I built Daily Coding, a free web app of short drills for JavaScript/TypeScript, SQL and page building.

How it works

Each drill is small enough to finish in a minute or two. You answer it, and if you get it right it comes back later. If you get it wrong, it comes back sooner. Repetition is the whole idea: the same basics, seen again until you stop having to think about them.

When you answer wrong, you do not just see the correct answer. You get a hint first, so you can have another go. If you are still stuck, you get a step-by-step explanation of how to reach the answer.

An example drill

Here is the kind of problem I mean:

const result = [1, 2, 3]
  .map(n => n * 2)
  .filter(n => n > 2);

console.log(result);
Enter fullscreen mode Exit fullscreen mode

What does this print?

The answer is [4, 6]. A wrong answer here is usually [2, 3] or [6], which comes from mixing up the order of the two steps. The hint would say "check which method runs first". The explanation walks through it:

  1. map doubles every item, giving [2, 4, 6].
  2. filter keeps items greater than 2, so 2 is dropped.
  3. The result is [4, 6].

Nothing here is advanced. That is the point. These are the basics people say they know, and then hesitate over when typing them without help.

What I would like feedback on

It is a test version, so I would like to hear what is wrong with it:

  • Are the drills the right size, or too easy or too fiddly?
  • Do the explanations actually help, or do they just restate the answer?
  • Which basics are missing that you would want to practise?
  • If you have been coding for years, do the drills feel honest, or are any of them misleading?

You can try it here: https://daily-coding-drills.netlify.app

It is free and has no ads. Tell me what you think in the comments.

Top comments (0)