I've noticed a lot of people asking how they can run the programs they've seen or created on Khan Academy's computer science area, so I've written this post to explain how to (sort of) achieve it. Note that not all Khan Academy programs will run on your computer.
One of the reasons I like Linux is that it makes batch editing of files much easier. Where once I would have had to write a Python script to edit multiple files, now I can (after much Googling) write a simple(ish) command in the terminal to do the same. One example is renaming files.
For some work I'm doing, I realised that I'd given a parameter a name that was different from previously, which resulted in thousands of text files with the incorrect name. Which seemed like a good opportunity to learn how to use the Linux rename command.
I'm very excited that my paper (cowritten with Steve Kelly) on MergeAlign has finally come out in BMC Bioinformatics. We managed to time things well, so the website we've created - mergealign.com - is also up and fully functional.
In the last month or so, I've managed to more than triple the number of Earth badges I have on Khan Academy just by focussing on getting the Sub-light Speed and 299,792,458 Meters per Second badges, particularly on the simple exercises. I worked out on which exercises to focus by creating a spreadsheet of all the exercises and all the badges I had for each exercise. I filled out the spreadsheet with a combination of screen-scraping and manual data-entry.
I've started work on a program I've been meaning to make for a while: an SVG optimiser. I've often found myself spending a lot of time tidying, simplifying and compressing SVGs created by Inkscape or Illustrator. Sometimes, changes are merely aesthetic, e.g. reducing numbers from an unnecessary six decimal places to one, or removing unused attributes. These changes make it easier to read the file, and can reduce its size noticeably. Other changes are more practical, such as removing transforms which otherwise make it difficult to see where paths and shapes are actually placed.
Recently, I've been watching the new microeconomics lectures at Khan Academy, which got me thinking about creating an economics simulation, something I've thought about many times. Specifically, I was wondering about how to come up with a reasonable demand curve. They always seem to be drawn as a straight line but with no justification other than simplicity.
In 2011 I seemed to spend a lot of time trying to make various numbers increase, such as my Khan Academy energy points, StackOverflow points, and blog visitors. This may be a result of the increasing "gamification" of websites, or maybe just that I'm so easily drawn in by such mechanics.
Below is an implementation of the Sugarscape simulation I made using the HTML canvas. It shows a 50x50 grid with each square containing between 0 and 4 units of sugar represented with different intensities of green. There is an initial population of 200 agents (red circles) which move about and eat the sugar.
The Black Hole badges are Khan Academy are legendary and unknown, so a lot of people want to know how to get them. The code describing what they are for used to be available here, but that code is out-dated and says that the Atlas badge is for completing 150 exercises.