Skip to content

Projects

I love solving programming contest problems: they’re usually both interesting and demanding. One particularly nice feature about this type of problems is that, once you’ve solved them, you can move on to something else. There’s no need to invest a lot of time on implementing features no one will ever use, polishing code, and so on. However, from time to time I like to take on slightly larger projects. On this page I list my favorites, both big and small. Note that I will probably never “finish” any of them, but they’re still fun to look at and play with.

2015

asciimath
asciimath example Inspired by the programming problem Green Eggs and Ham, this is a command-line utility for creating ASCII art of math equations. See the asciimath project on GitHub.
Google Code Jam Runner
One of my favorite programming contests is the annual Google Code Jam. Unlike many other programming contests, contestants are asked to run their solutions on their own computers. The Google Code Jam Runner is a wrapper around solutions, and takes care of repetitive tasks such as handling multiple test cases. It is also configurable to run these test cases on multiple processors, possibly across multiple machines, and then gather the results. It has come in handy a few times. Take a look at the project on GitHub.
simpletracker
BitTorrent I’ve been interested in BitTorrent, especially BitTorrent trackers, almost since I started programming. The most common tracker software was written in PHP, which was my favorite programming language at the time. Trackers are quite easy, but also really fun to implement, which is why I’ve written a few implementations over the years. Recently I had some files I wanted to share with my friends, and BitTorrent was the obvious choice. However, I didn’t find any really simple implementation that fit my needs, so I made my own. You can find the code on GitHub. Written in PHP, of course.

2014

Self-Description
Self-Description This was my first project written in Rust, a programming language I’m really fond of. It’s just a simple application for generating a picture similar to the famous Self-Description comic, which is one of my favorite xkcd comics. I use a technique similar to Fixed-point iteration that I originally learned about from one of Petr Mitrichev’s blog posts. You can take a look at the code here.

2013

Dyraklam
A few of the Icelandic letters have an accent, such as ý and á. When picking Icelandic domain names, it is customary to drop the accents and use the corresponding non-accented letters instead, like y and a. Many years ago this gave me an idea for a pun. In Icelandic “dýraklám” means animal pornography, while “dyraklám” means door pornography. If we look at their non-accented canonical forms, we notice that they are the same: “dyraklam”. Eventually I bought the domain dyraklam.is and put up a few images of doors. I then shared it with my friends, and it started spreading like wildfire. It became viral in Iceland, and less than 24 hours later 10% of the population had seen the website. It was covered in the Icelandic media, and I was even invited to an interview on the radio. It was definitely a cool experience.
Collatz meets Fibonacci
Related plot The Collatz conjecture is yet another famous example of a conjecture that is easy to state and understand, but seemingly impossible to prove or disprove. My teacher at the time (currently my MSc. thesis advisor) thought of a nice way to turn a Collatz sequence into a permutation. We then asked how many permutations of a given length n could be produced in this manner, and surprisingly we found that the answer to this was the nth Fibonacci number!

Or well, at least we thought so until we saw the answer for n=15, which was \mathrm{fib}(n)+1. We researched this phenomenon and eventually proved that the answer for length n permutations is always between \mathrm{fib}(n) and 2\mathrm{fib}(n). You can read about it in our paper. We held talks about this at the annual Icelandic mathematics seminar, at the MIT combinatorics seminar, and the 2015 Joint Mathematics Meetings with good reception.

From my perspective, the best part is that we managed to turn it into a Project Euler problem: Problem 494: Collatz prefix families. It is currently one of only a handful of problems with the maximum difficulty rating. I’m extremely proud to have been a part of this.

Befunge Simulator
Befunge code I learned about the Befunge programming language while competing in Unknown Language Round #4 on Codeforces. It’s a very cool esoteric programming language. I created a simple Befunge editor and simulator which can be found on GitHub.
focus blog
I’ve implemented more blogs than I’d care to admit. Everything from statically generated blogs to blogs using way too much AJAX. Unfortunately I’m not a good blogger, so these implementations always end up in the trash.

Before I started university I wanted to blog about my experience at school. That’s why I created focus, a simple blog system written in Node.js supporting Markdown, LaTeX equations and syntax highlighting. The code (and a few blog posts) can be found on GitHub.

2011

Doomsday Trainer
The Doomsday algorithm is a simple way of determining which weekday a particular date lands on. When I first learned about it I remember reading on Wikipedia: “Conway can usually give the correct answer in under two seconds. To improve his speed, he practices his calendrical calculations on his computer, which is programmed to quiz him with random dates every time he logs on”. Inspired by this, I created a lock-screen for Windows that did the same. The program can be found on GitHub.
BAMVC
I was taking a Web Programming class at the time, and thought that using an MVC framework would allow me to finish the assignments more quickly. I don’t remember if we were allowed to use code written by others (i.e. any of the standard MVC frameworks), but in any case I wrote my own. The framework can be found on GitHub.
FeedReader
FeedReader interface This RSS news aggregator was my final project in one of my Web Programming classes, I think. The code can be found on GitHub.

2010

Chess
Chess board This chess playing program was a final project in one of my classes. It supported all the legal chess moves, and was fairly feature rich. It had both a console interface and a graphical interface. It could be run in a few different modes; playback mode where previous games could be imported and replayed, offline mode where two players sitting at the same computer could compete, and online mode where players would enter a lounge where they could chat and challenge other players for an online match. The program can be found on GitHub. Note that it also requires an old version of my SharpBag library.
SharpBag
I competed annually in the Icelandic high school programming contest while I was eligible. We were allowed to use pre-written code during the contest, so I spent a lot of time preparing a gigantic code library. I wrote all kinds of helper functions so I could code faster, implemented some algorithms and data structures, and so on. However, it turned out that the process of preparing the library helped me the most. When I competed for the last time, not only did I not use the library, I didn’t even use the C# programming language. I ended up placing first nonetheless. The library can be found on GitHub.