Case study · 2023

PyMastery

A desktop flashcard platform built around a custom SM-2 spaced-repetition algorithm that schedules revision from real performance data.

Role

Solo project

Stack

Python, SQLite, Tkinter, Matplotlib

Links

Available on request

Highlights

  • Built a desktop learning platform around a custom SM-2 spaced-repetition algorithm that automates revision scheduling from user performance.
  • Designed a normalized SQLite schema to manage card metadata, user progress, and performance history.
  • Created interactive Matplotlib visualisations for topic trends and card-level performance analysis over time.
  • Iterated using student interviews, usage feedback, and performance data — improving flashcard recall accuracy from 62% to 84% after two weeks.

Context

PyMastery came from a simple problem: students often revise consistently, but not always effectively. Flashcards were common, but usually reviewed in a fixed way rather than based on what a learner was actually close to forgetting. I wanted to build something that used learning science to make revision more targeted and useful.

Solution

I built PyMastery, a desktop flashcard platform using Python, SQLite, Tkinter, and Matplotlib. Before building it, I looked into spaced repetition and the idea that revision is most effective when timed around likely forgetting, not repeated uniformly. That led me to design the system around a custom SM-2 based algorithm. After each review, the user's performance updated the next review date: cards recalled well were spaced further apart, while weaker cards returned sooner. I supported this with a SQLite database to track card metadata, progress, and review history, and added visualisations so users could see topic trends and card-level performance over time.

Challenges

The hardest part was making the platform genuinely adaptive rather than just functional. The algorithm needed to reflect real learning behaviour, and the data had to be structured reliably enough to support accurate scheduling over time. I also had to balance technical accuracy with usability so the system felt practical for repeated study, not just correct in theory.

What I learned

The project taught me that useful software starts with understanding the real problem, then iterating based on evidence. By testing the system with students and refining it using feedback and performance data, I improved flashcard recall accuracy from 62% to 84% after two weeks. More broadly, it showed me how algorithm design, user research, and product thinking work best when combined.

Future roadmap

If I developed PyMastery further, I would focus on deeper personalisation, stronger learning analytics, and a web-based version that supports cross-device use. I would also be interested in exploring more advanced recommendation logic based on broader study patterns, not just individual card history.