Write-Only Memory:
The Blog of Kevin Thomasson

DIY, electronics, programming / whatever.



Sometime in 1995, me and a friend of mine created a program called Atom in QBasic during one of our weekly computer-nerd meetups. The principle of the program is simple; atoms smash into one another creating even more atoms. Atom creates very interesting results despite its simplicity, and we wasted a considerable amount of time watching atom collisions and modifying parameters back in the day.

ATOM.BAS running in QuickBasic 4.5 inside DOSBoxATOM.BAS running in QuickBasic 4.5 inside DOSBox

Ten years ago, when I was learning to program Java at the university, I wrote a program emulating the behaviour of the original program as an Java applet. I was in search of this code for reference and inspiration as I am planning to make a version for the Commodore 64. While searching I stumbled upon the original QBasic files! I was able to execute the program after installing DOSBox and finding a copy of QBasic. Fueled with nostalgia and inspiration, one thing led to another, and before I knew it I had created a pixel-perfect (at least in Chrome and Firefox) JavaScript port of Atom—including implementing a routine to print text using the VGA 8x8 bitmap font on a HTML canvas :)

Read more


QuasiXml - an XML-ish parser for .NET

I decided to write my own XML parser when faced with the task to load non-well-formed XML files into an object model in C#.


You might rightfully wonder why on earth I wasted time on creating an XML parser when .NET framework already has the capability to parse XML perfectly in several ways. My answer:

The ideal thing to do is obviously to get the producer of the markup to fix existing "wellformdness" issues, but in reality this is not always an option.

Read more


Hello, World!

I have had this idea about starting a blog for quite some time now. Each time I have made an mental effort to start, I could not get past the part were I would choose blogging software. There was always something that felt wrong for different reasons, and when thinking about making my own blogging software I always came to the (somewhat depressing) conclusion that it has been made too many times already.

Let's reimplement the wheel

This time around I am fed up with negative thoughts like "it's been done". Yes, it has been done, but not by me, and that's really all that matters. Making a custom blog engine is a really good opportunity to catch up on areas left neglected by work and spoil yourself with tailor made software supporting your own workflow. In my case, the technical areas I wanted to include were:

Read more