What I did at Khan Academy this past summer: From Khanberry Pi to KA Lite

Jamie Alexandre,

We're currently experiencing what we're calling an "online learning revolution" — but what about the 65% of the world that can't take advantage of it? KA Lite is a lightweight web app for serving core Khan Academy content (videos and exercises) without needing internet connectivity, from a local server. This is the story of how the project came about, and why I think it's important.

For more details, or to get started with using KA Lite, please visit the KA Lite homepage.

This article is part 1 of a 3-part series:
Part 1) What I was up to at Khan Academy this past summer: From Khanberry Pi to KA Lite
Part 2) Introducing KA Lite, an offline version of Khan Academy
Part 3) Technical aspects of KA Lite: taking the web offline

 

My official work at Khan Academy

As a software development intern, I was involved in many different projects. My first major chunk of work was refactoring the code that manages the various video players (along with associated functionality such as subtitles and "energy point" tracking) using my beloved Backbone.js. As the video code was some of the earliest written for the site, and had been growing organically ever since, this overhaul was important for allowing the video player to be taken out of its original context and used more flexibly around the site. It also enabled a project I did during a Facebook hackathon later in the summer, allowing the full Khan Academy video player to be embedded on other websites. Other official projects I was involved with included helping create "new content" announcement emails to send to subscribers (to increase retention), contributing to a reorganization of the video and exercise navigation into a "tutorial" experience, and extending the in-house package management system to do dependency tracing for dynamic package loading.

 

KA Skunkworks

By day, I worked on the primary responsibilities described above, but my nights were spent toiling away on a parallel line of work, which Ben Kamens (Khan Academy's fearless dev leader and outstanding mentor) later dubbed "KA SkunkWorks". By chance, the Raspberry Pi I had been waiting for since April finally arrived in mid-July, and as it sat on my desk at Khan Academy it frequently evoked the inquiry "Awesome! What are you going to do with it?" (to which the only rational reponse was "Everything!"). Fellow intern (and Khan Academy exercise -creation guru) Emily Eisenberg and I hatched a scheme to get Khan Academy content working on the Raspberry Pi, which turned out to be both easier and more challenging than expected. We wrote scripts to generate a simple static version of the site, using topic tree data from the Khan API. However, although the RPi nominally supports 1080p video playback, we had trouble getting videos to play smoothly within the browser (taking advantage of the GPU for HTML5 video), so we opted for registering a custom URI handler that popped up mplayer to play the video. Emily also did a lot of work making a streamlined version of the khan-exercises framework so that it would be fast enough to run on the RPi's limited processor. The result was very minimalistic, but combined with a simple Flask-based API for saving and retrieving the user's progress on exercises, it was enough to allow a completely offline user to engage with the core-value Khan Academy content (videos and exercises), using a pocket-sized, low-power, $25 computer.

 

The pragmatic pivot; KA Lite is born

We demoed the prototype "Khanberry Pi" at a company off-site in August, where it was met with a lot of excitement, and led to some great brainstorming sessions. The RPi's composite video output means it can be connected to an old television set (fairly common in the developing world) — combine this with a $3 keyboard and $2 mouse, and an SD card or USB memory stick for video storage, and you've got a completely offline learning platform costing somewhere around $50. We met with Neil D'Souza, who runs the fantastic non-profit teachaclass.org, which has been helping distribute Khan Academy content and other educational materials to computer labs at orphanages and schools in remote areas of Mongolia, India, Indonesia, and Mexico. It became clear that there was broad demand for a light-weight, offline server solution for use in a wide variety of deployment scenarios throughout the developing (and even the developed) world, and thus the Khanberry Pi project began to pivot, eventually becoming the open-source Django-based project "KA Lite", which I presented at the last company meeting of my internship at Khan Academy.

 

Back at home

Upon returning to graduate studies at UCSD in September (after first writing an online version of the awesome game The Resistance that I became addicted to at the weekly Khan Academy game nights), I sat down with my undergraduate research assistants, who had previously been working with me on my thesis project, ESL Genie. After telling them about KA Lite and its trajectory, several of them hopped on board immediately, and went on to contribute hundreds of hours of high-energy work to the project, during Guayaki- and Spotify-fueled hack sessions over the past 2 months. Dylan Barth and Matt O'Rourke, in particular, dove deeply into the frontend and backend code, and were integral to the project, and Guan Wang made many excellent contributions to UX (User Experience) decisions and design work, with some help from Vicky Tu. (Hint hint: Most of them will be graduating next summer, and looking for opportunities to make a big difference in the world — but you're going to have to fight over them!). Partway through the quarter, my Cog Sci comrade (and educational crusader) Richard Tibbles also joined us in our escapades, helping us make rapid progress. It's been very exciting having so many highly motivated people involved.

 

Continue reading: Part 2: Introducing KA Lite, an offline version of Khan Academy

 


 

Find out more about KA Lite, and signup for updates on the project homepage!

 

You can also read more blog posts about this project, by my co-conspirators:

Dylan Barth: KA-Lite: Khan Academy For The Other 70%
Matt O'Rourke: KA Lite: Bringing Education To Those Who Need It Most


Like this post? Share it on Twitter or Facebook!