Introducing Khanpedia

Last weekend Khan Academy held its first inaugural Healthy Hackathon. It has already been covered well by Jessica and Ben, but I will add that I also found it to be healthy, fun, and overall a great success. I saw my coworkers produce some incredible hacks–well, more like highly polished brand new features–that I’m really looking forward to seeing land on the site in the near future.

Khanpedia

For my hackathon project I wanted to work on something that would let me flex my relatively weak frontend muscles. I also wanted to see what kind of cool stuff could be done with the Khan Academy public API. So I made Khanpedia, an unofficial Chrome extension that integrates Khan Academy content into Wikipedia. Everybody loves the untold treasures that lie within Wikipedia’s blue links. Now, with Khanpedia installed, about 7,000 of those links will turn green with Khan content Khantent! Clicking on a green link will let you jump to Khan Academy videos and exercises about that topic or continue on to Wikipedia as usual. (I’m unapologetic about puns. My new favorite zsh alias is called khanginx.)

Fellow intern Emily Eisenberg deserves props for helping me with some of the finer, more maddening points of JavaScript. Thanks also to KA-er John Resig for the little big thing called jQuery.

Some interesting details about the extension, depending on your definition of interesting:

  • It’s open source, of course.
  • The extension ships with its own index of KA content so it’s pretty light on resource consumption. Because I’ll need to update the extension in the Chrome Web Store frequently to keep up with our ever-expanding Knowledge Map, I gave it a nifty little one-step build script that fetches the topic tree, traverses it, and builds a new version with an updated index. The script even features an auto-versioning scheme whose semi-brokenness completely obviates any possible benefits that one would expect to gain from an auto-versioning scheme.
  • You may occasionally encounter a green link that takes you to a Khan Academy page with zero search results for that topic, in which case instead of getting upset at me you should be thankful that the Internet works at all, given that it requires lots of functioning hard disks and network protocols, which is kind of a tall order if you think about it.

Enjoy!