Image 01 Image 02

Latest Post
Posted on 18th August 2014 by Sebastian

I followed the course Computational Geometry at DIKU in the beginning of the year. For the exam, I prepared a number of exam topic dispositions.

Download PDF here

The dispositions cover the following topics:

  1. Polygon triangulation
  2. Range searching
  3. Point location
  4. Voronoi diagrams
  5. Delaunay triangulations
  6. Geometric data structures
  7. Robot motion planning and visibility graphs

The notes are primarily intended for other curious students at DIKU. If you wish to learn about the subjects, I can recommend the book Computational Geometry: Algorithms and Applications, which was used during the course.

Posted on 19th February 2014 by Sebastian

"People You May Know" on LinkedIn

Recently, LinkedIn has started adding people based on your email contacts to their “People You May Know” page. Just to be clear, this is people who do not have a LinkedIn account already, so attempting to add them will have LinkedIn send them a mail on your behalf.

You might note that they cleverly have made them look almost identical to how people who actually have accounts on LinkedIn, so it’s very easy to inadvertently send an invite to someone while using this page.

I don’t quite like the thought of that, so I made a userscript that removes the email entries from the listing, showing only people with pre-existing accounts.

The resulting page looks something like this:

"People You May Know" with email entries removed

“People You May Know” with email entries removed

Once you have Tampermonkey (in Chrome) or Greasemonkey (in Firefox), the script can be installed by clicking the following button:

Posted on 6th October 2013 by Sebastian

Yesterday the 2013 Nordic Collegiate Programming Contest took place. I have taken part in this contest the last 4 years, my two first years winning the Danish sub-contest called “DM i Programmering”.

This year I participated with Kristoffer Søholm and Morten Brøns-Pedersen, two of the members of the DIKU hacker-group Pwnies. We chose to call ourselves Fwnies, and managed to secure ourselves a 4th place in the Danish rankings, and a 20th place overall.

In connection with hacking competitions, the different teams often do write-ups explaining their solutions after the contest is over. I quite like that concept, so I thought I’d share our solutions for the NCPC problems.


Posted on 18th December 2012 by Sebastian

So, I have made yet another userscript; this time for the readers of the Something Awful forums. This is not my first time doing so, and I have in fact created a group for Something Awful userscripts on

This time, it’s a script that highlights posts made by friends. The script automatically reads your buddy list when you visit your user control panel, so you don’t need to do any manual maintenance of your friends list.

I had previously made the same feature for the SALR extension for Chrome, but seeing as I don’t use that anymore, I decided to remake it in stand-alone form.

The script has been tested with Tampermonkey on Chrome, but should work just fine with Greasemonkey on Firefox.


Posted on 31st October 2012 by Sebastian

Next time you typeset a LaTeX document, where you discuss some Haskell code, consider using the following command to typeset the name:

That is, instead of I use the function \texttt{liftM2} to lift ..., use I use the function \hoogle{liftM2} to lift ....

What the command does is not only format the function name in a fixed-width font using \texttt, but also link it to a Hoogle-search, to allow the reader to easily look up what the function does, in case it’s unknown to them.

Posted on 20th April 2012 by Sebastian

So you’re a student at the University of Copenhagen, and you’re starting on a new course. Wouldn’t it be lovely if you could add your schedule to your calendar, so that you could keep track of when to be where?

Well, Rasmus Wriedt Larsen has devised a website, KU Calendar Helper, which automatically produces an ICAL feed you can add to your Google Calendar or similar. You can simply input the URL to the course schedule, and it’ll do the boring work for you.

To simplify this process, I created the following userscript:

To use this script, follow these simple steps:

  1. Go to the SIS-page of the course you want a calendar feed for.
  2. Click “Vis skema for kurset”
  3. On the top of the page that comes up, click “Export to calendar”
  4. Follow the instructions on the page that comes up

The script has been tested in Chrome using Tampermonkey, but should work well in Firefox using Greasemonkey as well.

Posted on 30th January 2012 by Sebastian

You may already know imgur, an image host you can use freely for whatever you please.

An interesting fact about them, however, is that each picture given a name consisting of only 5 alphanumerical characters. This leaves for roughly 916 million different names. As it turns out, there appears to be around 90 million uploaded images[1], which means that if we randomly guess a name for a file, we have an about 1 in 10 chance of actually finding an image.

Those odds are pretty good, so I wrote a small application which does just that.

Download the latest version here (or get the source code directly from github)

  1. [1] Rough estimate based on empirical observations.

Posted on 8th January 2012 by Sebastian

Quines are a wonderful thing. A quine is a program, that when run produces its own code as output. Now, in most interpreted languages you can read your own code through means of I/O — I’d consider that cheating: We can do much better than that. We’ll do it without anything but a clever theoretical result. (And maybe a little bit of code to make it work in practice.)

Posted on 26th October 2011 by Sebastian
A Hasse diagram generated in Mathematica.

A Hasse diagram generated in Mathematica.

It’s that time of year again; the new students have started at DIKU and start their careers as computer science students with the course DiMS — Discrete Mathematical Structures, taught from the book by the same name.

Part of the curriculum is learning about Hasse diagrams, which in essence are a way of easily visualizing the relationships between different elements under a partial order.

Now, a student came and asked me about how to draw these diagrams in Mathematica, so I got some code working which did just that. The resulting diagram, is the picture used for this post.

Posted on 21st August 2010 by Sebastian

When you’re a student, you’re usually on a tight budget, so the chance to get something you need at a steep discount usually falls on good soil.

Luckily, the marketing departments of many large software corporations know this, and wants to get you hooked on their applications, leaving us students very happy.

First of all, it’s worth checking if your school or university participates in the Microsoft Developer Network Academic Alliance, or MSDNAA for short. If that is the case, you may be eligible to get free copies of Windows, Visual Studio and much more. Simply head on over and search for your school to see if you can get lovely free software. If your school does show up in the list, ask your local IT department if it’s possible to get an account. (If you study at DIKU, you can sign up here.)

Microsoft provides another way to get free software called DreamSpark. DreamSpark provides free access to lots of free development software for students at participating schools, in a manner similar to that of MSDNAA. Sadly, University of Copenhagen does not appear to be a part of this deal, but your university might be; simply go to the page and follow the instructions to log in.

Next up is OnTheHub, with which your school might have struck a deal to provide cheap software from Microsoft, Adobe, VMware and more. Simply head on over to their search page, and see if your school is listed. University of Copenhagen has a deal with VMware, for instance, which means we get free copies of VMware Workstation, among other things. In case nothing is available for your school, you can also take a look at their store, which may contain something useful.

Additional deals that aren’t quite as major, but still notable: