learnxinyminutes-docs
learnxinyminutes-docs copied to clipboard
Idea/FR: "Exercise Mode"
(Warning: This idea / feature request would be a lot of work. I'm aware this is a community-driven project. I expect this issue to be closed.)
Idea: An "Exercise mode" toggle at the top of every learn page. When toggled on, it turns all non-comment code into textboxes. When you type into a textbox and hit enter, it gives you the diff between what you typed and what was there. Diffs can be naive and client side. No code evaluation or anything.
Motivation:
- A core idea in active recall & spaced repetition is that you should separate questions and answers. To learn something well, you want to first make a guess at the answer, and then see it.
- A user can approximate "exercise mode" by scrolling slowly, but sometimes comments explaining code behavior are after it or on the same line.
- If a user thinks they remember a language but aren't sure, they could scroll halfway down and try the exercises.
Curious what people think about how useful this would be to users and how difficult it would be to implement. My main thought is that extracting block-wise "is a comment" from the parsers might be hard. Perhaps this can be done by selecting <span>
s inside the <pre>
which don't have a comment's CSS class. Don't know if the class naming is consistent between languages or anything.