Algo Drills
A command line tool for memorizing algorithms in Python by typing them. In alpha and things will change.
How it works
- Type out an algorithm based on its function signature and docstring.
- See what you did wrong or get a new algorithm.
- Repeat until bored.
Getting Started
- Clone this repo .
- Look at
algorithms/bisect_search.py
and its references. - Run
./drill.py practice
- Fill out the newly created
worskpace.py
to match the code inalgorithms/bisect_search.py
. Do it from memory or look back at the file. - Run
./drill.py practice
again. You'll do this a lot. Maybe make a shortcut. - If your code matches, it will be deleted and you can try again. If it's different, you'll get a diff.
- Check out other algorithms that look interesting in
algorithms/
. - If you see an algorithm you like, copy-paste its ID to
user_data/allowed.csv
. - Run
./drill.py -h
to see more features. - Keep going!
FAQ
Isn't memorizing bad?
No. Memorization without understanding is bad. You should understand an algorithm well before committing it to memory.
Are these the best versions of these algorithms?
No. They're versions the author likes.
Can I view my history?
Yes! Check out user_data/history.txt
for a nice format. Maybe keep it open in a window for motivation.
Can I add my own algorithms?
Yes! ./drills.py new_algo --help
Can I see all the algorithms for a specific reference?
Yes! Just two books right now. ./drills.py reference --help
Can I help?
Yes! Tell me how you like this tool, submit a bug report (or fix!), tell me if you have a feature idea, show your friends, or show me your own cool algorithms. You can email me at my last name at gmail, or message me on reddit at /u/travisjungroth.
Made with