home

Posts tagged with "javascript"

Spaced Repetition Anywhere

July 20, 2025 ❖ Tags: writeup, programming, webdev, javascript, artifical-intelligence

Spaced repetition is an effective habit for memorizing small fragments of information for, effectively, an indefinite amount of time. The idea is to repeatedly challenge your recall of a piece of information, typically with a sort of flashcard, doing so at a frequency determined by your previous recall performance: new information is challenged frequently until you remember it, and previously learned information is challenged less frequently. The concept is simple enough to implement with a few index cards and a shoebox. Despite the simplicity, the landscape of software implementations of spaced repetition is relatively small. The venerable Anki is the best-known spaced repetition application, and I've used org-drill and org-fc in the past, but other than those three, I'm not aware of many other programs for it. These existing systems are fine, but I have a fairly specific use-case that none are appropriate for: I might want to do my reviews on a system where I'm unable to install Anki or GNU Emacs, and I don't want to have to trust a third-party with my cards. This rules out services like Quizlet and AnkiWeb. It's a simple enough concept, so I wanted to see if I could write a flash card application contained within a single HTML file. All we really need is a spaced repetition scheduler algorithm, a way of implementing the "challenge" piece in the browser, and a way of storing cards and their scheduling parameters across reviews.

read more →

Browser Games Aren't an Easy Target

January 10, 2020 ❖ Tags: writeup, programming, reverse-engineering, video-games, game-hacking, javascript

If you're about my age and had a similarly dull upbringing, you probably also have memories of playing video games behind a teacher's back whenever class involved going to some sort of "computer lab." Flash games were the thing when I was in elementary school, and when I was in middle school, I'd bring Quake with me on a flash drive. By the time I was in high school, I'd realized that these opportunities were better spent getting a head start on homework for other classes, but I did have a few friends who still passed the time playing video games. Rather than Flash games or Quake, though, these were browser games using the new-fangled HTML5 canvas. I'd practically forgotten these games existed until someone from my capture-the-flag team mentioned "krunker.io". Apparently it's one of the more popular ones. It got me thinking about how I'd go about writing cheats for a game in the browser. Writing cheats for CS:GO was a breeze, so why would this be any harder? I had some time to spare over winter break, so I decided to give it a go and see what kind of damage I could do.

read more →