Introduction
Spaced repetition is the most evidence-backed study technique in cognitive science. Review material just before you're about to forget it, and each successful recall makes the memory stronger and the next interval longer. It's the engine behind Anki, and it's the engine behind LearnCoachAssist.
But here's the uncomfortable truth: the algorithm is only as good as its implementation — and a lot of implementations are quietly broken. When we audited our own scheduler recently, we found a bug that meant every card in the app was being treated as brand new on every single review. This article is the story of that bug, why it's more common than you'd think, and what a correct spaced repetition scheduler should actually feel like.
How SM-2 Spaced Repetition Works
Most flashcard apps use an algorithm called SM-2, designed by Piotr Wozniak in the 1980s. After you see a card, you rate how well you knew it:
- Again — you didn't remember it
- Hard — you struggled but got it
- Good — you knew it
- Easy — it was trivial
Each card tracks two numbers: an interval (how many days until the next review) and an ease factor (how fast the interval should grow, typically 1.3–3.0). Rate a card Good and its interval multiplies by the ease factor: 3 days becomes ~8 days becomes ~20 days. Rate it Again and the interval collapses and the ease factor drops. That's the whole system — simple, proven, and 40 years old.
The Bug: State That Never Persists
While building LearnCoachAssist, we noticed something suspicious in testing: a card rated Hard and a card rated Good both showed 1 day until the next review. Not occasionally — every time. Hard and Good were identical, which should be impossible.
Digging into the code, we found the real problem. The database table that stores each card's progress was missing three critical fields from its "fillable" list: ease_factor, interval_days, and review_count. In plain terms: the algorithm computed the correct next interval, but the save silently dropped it. Every rating re-read the default values (interval 0, ease 2.5) and treated the card as if you'd never seen it.
This is a classic failure mode in real-world spaced repetition apps, and it's devastating in practice:
- The app never learns how well you know a card, so it never stretches intervals.
- Every card comes back "tomorrow," burying you in reviews of things you already know.
- Hard and Good collapse into the same schedule, so the buttons lose meaning.
No scheduling algorithm can fix that — the state has to persist first.
What a Correct Scheduler Looks Like
Fixing the persistence bug let us also fix the scheduling design itself. A good SM-2 implementation has three properties:
1. Learning steps, not just days
A brand-new card you get wrong should come back in 10 minutes, not tomorrow. You're still forming the memory — the context is fresh, and a quick relearn step at the exact moment you're about to forget it is worth more than a review a day later. Our steps for new cards:
- Again → 10 minutes (a relearn step, not a full lapse)
- Hard → 1 day
- Good → 3 days
- Easy → 7 days
2. Hard < Good < Easy, always
The four buttons have to mean something. Once a card is graduated, our scheduler uses:
- Hard — 80% of the current interval (always shorter than Good)
- Good — current interval × ease factor (classic SM-2)
- Easy — current interval × ease factor × 1.3
And a serious miss (Again) drops the card back to a 10-minute relearn step instead of vanishing for a month — so you re-learn it while the context is still warm, then it climbs again from a slightly reduced ease factor (−0.20 per lapse, clamped between 1.3 and 3.0).
3. A ceiling, so nothing gets lost
Intervals cap at 365 days. Without a cap, a card you aced a year ago could quietly schedule itself five years out — and then it's gone forever. With a cap, everything eventually cycles back.
How to Check Your Own App
If you use a flashcard app and something feels off, here's the quick test: learn a new card, rate it Good, then check what it promises for the next review. On a healthy scheduler it should be several days (typically 2–4). If it says "1 day" or "tomorrow" — every time, no matter how you rate — the app is treating you as a perpetual beginner. Your memory is fine; the scheduler is broken.
For context on why these intervals work, read our guide to the forgetting curve, the full spaced repetition system, and the science of active recall.
Try the Fixed Version
LearnCoachAssist is a free flashcard app — 285+ decks across programming, AI, business, science, and languages, with AI-generated cards, spaced repetition, and a focus mode. No install, no credit card, works in your browser. If you're coming from Anki, the scheduling follows the same SM-2 lineage — just with state that actually saves, learning steps that make sense, and buttons that tell the truth.
Your future self, three weeks from now, will remember.