The Playground

December 12, 2009 | categories: Programming, The Playground

Over the last 2 years, I've done a lot of personal programming projects. Some of these are available on my github, but any information about them is spread among Twitter and a few forums (some of which no longer exist). So over the next month, I'm going to blog about a few of these. I've chosen the name "The Playground" for the category because it accurately reflects both the nature of the projects (small projects that are mostly tinkered with, with very little concrete plans) and the reasons for making them (to practice programming, or to mess about, or because I was bored).

Anyway, for the time being, here is a quick summary of my projects currently in my github repo:

Twitter Matter

This is a simple Python program to send tweets from the command line. At the moment, it can send tweets, and get the latest tweets from your timeline, your friend's timeline, and @replies to you. I made it mainly because although I've always said Python looks like a nice language, and I know the basics of it, I never wrote an actual program in it beyond Project Euler maths puzzles.

JavascriptCity (aka Webcity, webicity, JSC)

This is an attempt to write a Simcity clone in Javascript. I got quite far into it, with the ability to set zones, have them develop and build roads actually working. However, at the current stage any change I make is too bad for performance that it is basically on hold. I can say it's definitely not impossible to write a Simcity clone in Javascript, but you need someone with better Javascript skills than me to make it, and probably someone who knows about <canvas>.

Young Developer Forum

This is a program set up by me and a Iroup of people on a forum which has since shut down. It didn't really get very far.


This is an IM server and client that I wrote in Java. It was my first experiment in GUI programming and Threading in Java. Some revisions of it work, and some don't.

JS Battleship

This is a battleship game I am writing in Javascript. It re-uses a lot of code from JavascriptCity, but without the huge 200x200 table grid that caused a lot of programs.

Uploading a PDF is not putting information on the web

November 21, 2009 | categories: Pcs

One thing that alwasy gets on my nerves is when I go to a website to read an article and the web page turns out to just be a summary of the article with the full article in a PDF. 99/100 times, this results in me leaving the page and finding the information elsewhere. There are other variations of this: "See our website for information", and the information is a PDF file is another common one.

If I did click on the PDF, what would happen? On Windows, Adobe Reader would open up (slowly, sometimes taking as long as 5 minutes), then the PDF file would start loading. If I was lucky, it'd be in a browser tab. If I was unlucky, it'd be in a whole new window. On Linux, it'd open in Document Viewer, which is faster. However, I would then be unable to click any links in the document.

Why would anyone supply on the web, a page that needs an external application to run outside the web browser and call it putting information online? Especially when said application has had security problems in the past. It just strikes me as being very lazy.


October 31, 2009 | categories: Gaming
ODST is a good game, and well worth playing

During the last week, I got Halo 3: ODST. It's the first new Xbox game I've gotten in a good while. I haven't played Halo 3 much since the release of COD4, so before I got it I played through Halo 3 so I'd have something to compare it to. The actual campaign is kind of short, but it's well polished.

The first thing I noticed about was the price. At €45 it's a welcome break from the €60 new releases I'm used to. And definitely cheaper than MW2 which is going to be €70 at release here.

The graphics are about equal to those of Halo 3. So while they are far from bad, they're still outclassed by many other games. Given that Bungie has up until now mainly had to animate armour and aliens, some of the details such as hair and skin have a PS2 feel to them.

The story is where ODST shines. It makes a break from the "infiltrate big forerunner artifact, blow it up, escape" of previous Halo titles. You wake up 6 hours after the drop and have to track down your squad, with flashbacks to the events earlier in the day on finding each piece of evidence. I can't say too much more without spoiling the plot.

During the gameplay, there are a lot of "defend" sections. These are quite fun, and are long enough to be challenging without being boring. The game's special mode is a defense game where you have to last as long as you can, much like COD5's Nazi Zombies mode. It's more serious than Zombies, lacking the powerups (at least on your side, the skulls randomly activate to increase the Covenant's strength), and novelty aspects (ray gun, wunderwaffe) of Zombies, but replacing it with much larger maps and more variations in enemies. Despite much of the hype about the ODSTs being weaker than Master Chief, and a more tactical game, the only part you'll notice this is when you are fighting against the hunters.

Overall, I'd rate it about 7/10. I actually had more fun out of this than Halo 3 itself, which didn't impress me too much.

Theme Hospital on modern computers

October 13, 2009 | categories: Gaming, Pcs

One of my favourite old games is Theme Hospital by Bullfrog. I still have my original disc, and play it a lot. It has a lot of charm, but it's not always simple to get running. So I'm writing up this guide on playing Theme Hospital on a modern PC. It has been re-released a couple of times, but my disc has both the Windows and DOS versions on the one disc.

First of all, if you are running a 32 bit version of Windows, have the Windows version, and have no intention of playing the multiplayer mode, just insert your disc and install away. It still runs perfectly up until XP. On Vista on my PC, I had to set the compatibility mode to Windows 95, and turn "Run as Administrator" on and it worked from then on. The same steps should work the same on Windows 7 32bit, but I don't have a computer running that to check. [EDIT: A friend informs me that it doesn't work on his Windows 7 32bit, but I still haven't tested for myself. Try the DOSbox instructions if it doesn't work for you]

If you have 32 bit Windows, and the Windows version, just play away.

If you want multiplayer, or you have the DOS version, things become more complex. For Vista, the IPX network protocol, which was used by Theme Hospital, along with many games of it's time has been removed. There is a hack to enable IPX in Vista, but it does not allow you to change the settings, and did not work for me. If you have XP or earlier, installing IPX to the Hamachi VPN software apparently works but I don't have access to a XP computer to test it.

The final option which I eventually resorted to using is to install Theme Hospital to DOSbox. This works on all Windows versions from 2000 up, and for Mac OS X and Linux aswell. Download and install DOSbox. Make a folder to store the files. I recommend you make it something easy to type such as C:\hospital on windows on /home/user/hospital on Linux/OSX. Then open up DOSbox. You will be presented with a DOS prompt. Type the following:


mount C "/home/user/hospital"
mount D "/media/cdrom" -t cdrom

Or Windows (replace E: with the actual drive letter of your CD rom drive)

mount C "C:\hospital"
mount D "E:\" -t cdrom

Next we need to install Theme Hospital to DOSbox. First, when your cursor is stuck in the DOSbox window (as happens later in the process), to get it out press Ctrl-F10. Now, in dosbox type:


This will open up the Theme Hospital DOS installer. Click the install button and let it install to C:\HOSPITAL (note: For windows users, this is equal to C:\hospital\HOSPITAL on the actual system). Then go to the configuration screen. Configure your sound card and music card. I found selecting Creative Sound Blaster Pro worked fine for me on Linux and Windows. I did have to turn my system volume up to full on Linux to hear it as the volume was stuck down low, however.

To avoid typing in the mount commands each time edit your configuration file. On Windows click the edit configuration file shortcut. If you are using Linux, you first have to issue the command CONFIG -writeconf dosbox.conf inside of DOSBox. Afterwards, the dosbox.conf file will be written to your home directory.

At the very end of the file, add the mount commands you entered before installing the game.

Afterwards click exit. The DOS version of theme hospital is now installed on DOSbox. If you want to play multiplayer, read on. Otherwise, you can stop now.

Edit your configuration file again and replace the line:




For each additional computer you wish to play it on, repeat the above process. Finally pick one computer as the host. On that computer start DOSbox and type the same instructions as startup last time, but add this before starting the game

ipxnet startserver ipxnet connect

Find the host's IP address. For internet play, try For local network play, check your network connections dialog.

Now on each client computer type the following (replace the with your host computer's IP address):

ipxnet connect

And start the game on all the computers, enter the network game screen and play away.

Some Final Notes

Gameplay performance on the same system was much better on Vista than it was on Linux. The game played perfectly under Vista, while under Linux the sound was noticeably choppy. Whether this  is a problem with DOSbox or with my computer's drivers is not certain.

I'm not sure if it is possible to play the Windows version against the DOS version. I have not tried.

Syncing contacts

September 11, 2009 | categories: Gadgets

Recently, I've set up contacts to sync between my iPod Touch, PC and mobile phone (Sony Ericcson k750i). It's a feature that's been in all my last few phones but not one I've bothered with for a simple reason: My phone makes phone calls and texts, while my PC sends emails. There was no crossover. However, with the addition of my iPod Touch to the collection, which can send both emails (through Apple's Mail app) and texts (through the Eirtext app. It's for Ireland, but other apps exist for the UK and US), things have changed.

So my starting point was:

  • iPod Touch with a few of my most used phone numbers and email addresses
  • Gmail with a few email addresses
  • Thunderbird on Windows and Linux with separate contact lists
  • Mobile phone with most phone numbers, and a few email addresses.

For my starting point, I began with Gmail, since that was already online, so accessible with all devices. I found there actually was a google contacts, which seemed a good place to start. So I set this up, and while doing so, discovered Google Sync. I now had everything I needed.

The first thing I synced then was my iPod Touch. Google conviently provides instructions on their website. Since I was on 3.0 here is a shortened version of the instructions. Click the link for the long version, or the 2.2 instructions.

Part 1: Backup existing contacts to Google Contacts

  1. Connect your iPod Touch to your computer and open iTunes.
  2. Select your iPod Touch and click the Info tab.
  3. Check the Sync Contacts with option and select Google Contacts from the drop-down menu.
  4. Click Configure and enter your Google username and password, then click apply.

Part 2: Set up synchronization

  1. Open Settings.
  2. Select Mail, Contacts, Calendars.
  3. Tap Add Account... and choose Microsoft Exchange.
  4. In the Email field, enter your full Google Account email address.
  5. Enter your Google Account details for the username and password fields and press next.
  6. A new Server field will appear. Enter, then press next.
  7. Select the Google services you want to sync. According to Google, only contacts and calendar work.

And now my iPod Touch was set up.

My next item to set up was Thunderbird.  This was handled neatly by the Google Contacts add on. Install, enter account settings, enjoy. I had to do this twice. Once for my Windows installation of Thunderbird, and once for my Linux installation.

The final task was my mobile phone. This was a bit harder, as there were no instructions on the google sync homepage, and no sign of where to look, but after asking on Superuser, I found this page of instructions from Google. It's for the w800i, but they work on the k750i aswell. The one hitch was because of the large number of duplicated contacts, I had to let it send all contacts to Google, merge the duplicates, delete all from the phone, then resync to download the new contacts.

And that was it. Contacts synced across all three devices.

« Previous Page -- Next Page »