View XKCD without a browser

Posted on February 5, 2011


For at least a year I’ve been playing around with Microsoft Small Basic programming language. For those not in the know, Small Basic is a very recent basic dialect meant to introduce kids to programming. Although I’m fully capable of using “real” languages, I like creating small programs because A), I like to test how far such a simple language can go, and B), I can write programs quickly and easily, which is a nice cool-off after hours of serious coding.

Case in point: About a week ago I wrote a Small Basic program that will, when given a comic number (or “c” for current), retrieve the comic and display it (or set it as your wallpaper, if you like). So if for some reason firefox is having problems, I can still get my geeky stick figure fix.

It works by using XKCD’s JSON interface, which is a metadata file about each comic containing (in a very easy-to-parse format) the image location, title, title-text, and so on.

If you have the Small Basic compiler (yes, it’s a compiled language. I know, right?), then you can import the program with the code MQJ958. If you don’t, you can download the .exe file by visiting the below link. You will also need to download the smallbasiclibrary.dll file and make sure they are in the same folder. Don’t worry, it’s harmless.

XKCD viewer.

Stay smart, folks.

Posted in: Computers