memokoans
What if we could combine the magic of Koans with the superpower of spaced repetition learning?
๐ Rationale
Koans are a fantastic way to learn the shared dialogue of a new programming language (the standard library, the patterns, and the common tooling) or brush up on an old one. Solving small puzzles and seeing passing tests also gives a big dopamine hit.
Similarly, Iโve had a lot of success with Spaced Repetition using Anki (Iโve been using to memorize the capitals and flags of the world).
For learning things like
dc or
The J Programming language, it would be wonderful to come back every few weeks to test my knowledge of various incantations.
Input an RGB value in hexadecimal and display the corresponding RGB values in base 10
echo 66B5FF | dc -e "16i ? d100% rd100/100% rd10000/ rR f" | xargs
102 181 255
๐ Initial requirements
-
Input: A series of prompts and answers
-
Output: An Anki deck where each card contains
-
Front: The problem (โA function that flattens an array of arraysโ) and test code (
flatten([1, 2, [3, 4]]) == [1, 2, 3, 4]
) -
Back: Solution code (
function flatten(arr) { [].concat(...arr) }
)
-
๐ Follow-up work
-
Command-line interface for reviewing decks
-
Command-line interface for executing code and verifying itโs solution