Building Today's Review Queue
due-date queue
Part of: AI Flashcard Generator
The scheduler says when each card should come back. When the learner opens the app, they want to know which cards to study right now. The answer is the review queue , and building it well is the difference between a deck people return to and one they abandon after a long weekend. Due cards. Store each card's due date as a day number (days since the deck was created works well). A card is due when its due day is on or before today. Cards due in the future stay out of today's queue. Order matters. After a few days away, a learner might have eighty cards due. Showing them in creation order means the oldest notes get all the attention. A better order puts the most urgent cards first. 1. Most overdue first, measured as today - due. 2. Among cards equally overdue, lower ease first, because those are the ones the learner finds hardest. 3. Among exact ties, the card id, so the order is stable. Python sorts tuples element by element, so one key function expresses all three rules. Negating the overdue count sorts the largest first. A daily cap. Eighty reviews in one sitting is how people quit. Apps cap a session, often at 20 to 50 reviews, and leave the rest for tomorrow. Because the queue i
Challenge: What Do I Study Today