Unlike most people today, I have a personal website. This is it. I have had my own site since 1996 and it has been on this domain - mdv.se - since 23 August 2003. It will never be very useful or finished, though I would not call it a work in progress, since there is nothing really to progress towards.

At the moment I use it to share some programs I have written in C and to post some pictures of myself from over the years. It is not narcissism - it is a lack of other content! I know that there are many services I could use for both of these things, but I neither aim to reach as many people as possible - mainly just myself and maybe a friend or two - nor to have the services ready-made and served up for me. I want to create my own solutions.

Mostly though, I hang on to this domain for the e-mail addresses I have on it, but since I have the domain, I at least wanted to put something here.


e-mail | programs | pictures
Optimized for a screen resolution of 1920 x 1080. Images are randomly selected on page reload.

e-mail | programs | pictures

After attending an introductory course in C programming at the KTH Royal Institute of Technology in Stockholm, during the autumn of 2010, I started writing programs in C. Here are some of them. The files are compressed using 7-zip and contain a Windows executable file (.exe) and in some cases other supporting files.

When I think that a program is ready enough I put it here. However, I may still improve on it if I think of something - and I do, sometimes years after I first put it here. I also choose to not put some of the things I write here if I think that they are too simple or interesting only to me. For example, I really liked a dll I wrote with support functions for an Excel macro I made, but that is pretty much useless without that macro - and the need for that macro in the first place. I have also written a relatively large program for controlling the lights in our apartment, but that is not general enough to be of use to anyone else.

Click on the name of the program that you want to download.

Name Lines Size Description
Hangman 493 19 kb The classic pen and paper game where the player must save their friend by guessing a word in a limited number of attempts. This project was the first I wrote after finishing the course at KTH, so it took some time but I learned a lot. It is in English and I have taken many words just downloading entire news articles on the web, but I have also deliberately searched for long words to add to the game. Wikipedia link.
Bulls and cows 416 17 kb A master-mind like game, with numbers, that I wrote in a reasonably short amount of time. A simple game that can be quite addictive though. Wikipedia link.
Drugwars 1,645 69 kb This game is a classic. The purpose is to get as rich as possible by selling drugs. When I thought of writing this game I first thought it would be too complex, but after some thinking and planning to keep it simple it was alright. I have written a five-page manual, not only to explain the game but also my thinking behind some solutions in it. Please note that this is my take on the game and it differs from earlier versions on purpose. Wikipedia link.
Yahtzee 968 21 kb The dice game based on older dice games and to some extent on poker rules. I chose to write a Yahtzee program because after my Drugwars project I had not written anything in C for a few months and I thought that Yahtzee would be a suitable challenge. The rules for Yahtzee can be downloaded as a pdf from here, from Hasbro who today own the game.
vcf splitter 331 18 kb This is a program for splitting a single vCard (.vcf) file containing multiple contacts into multiple smaller files; one file for each contact. I had a need for a program like this after I had exported all contacts from my android phone into a single .vcf file, but Outlook could only read the first entry and I realised that I needed to split the file into one file for every contact. I was not going to do that manually, was I?
Yahtzee multiplayer 1,526 56 kb The Yahtzee project above is just single-player. This version allows for up to six players and introduces some new features which make sense with more players. There are some technical changes too but the user will not notice them.
Drugwars with audio! 1,712 448 kb Basically this is the same game as Drugwars, but with added sounds. I have added some wave sounds files to spice up the gunfights and a little tune when the player gets into trouble. The MIDI melody used in the program is generated by the program itself and, unlike the waves, does not come from an external file. All sounds are played using the Win32 API.
2048 - mdv version 898 217 kb My version of 2048. It includes a save function. It is really simple but really addictive! Wikipedia link.
Sokoban 1,858 1,015 kb When I wrote this I was more interested in coding than in level design, so the game requires pre-made level files to be imported, some are included. To work well with external files, I wrote a file and level manager, which was interesting in itself. I also added the ability to save; some of the levels can be very large. Wikipedia link.
Cursor 638 78 kb My first GUI program, written using the Win32 API. It is a utility for preventing screen savers from activating. It works by moving the mouse cursor after a selectable interval of inactivity.
2048 - GUI version 1,745 330 kb GUI version of my previously written 2048. Of course some changes have been made in general but the biggest change is that this version has been written for the win32 GUI.

'Lines' are lines of actual code, not counting empty lines or lines with only comments.

e-mail | programs | pictures