August 12 2020 16:49:07
· Home
· CV
· Articles
· Links
· News Categories
· Media Gallery
· Search


Forgotten your password?
Request a new one here.
Server is Up and Running
NewsAt last! My new server is in place and running on a RAID1 with regular, remote backups! I lost a couple of hours to a stupid mistake that I made. I couldn't figure out why it refused to boot from the hard drives... and after much messing around with formatting, redeploying linux and trying to boot from USB, I discovered it was due to me not having set the boot partition to active!

All that's left to do now is recompile everything for the ATOM 330 architecture, then I can cancel my Linode subscription!
More Server Fun and Games
NewsAll of my server parts arrived today. It must be said that I'm not that impressed with the case. It's a real nuisance to open and remove the front panel (the only way to get hard drives in and out). Hopefully this won't be too much of an issue since I shouldn't need to change the hard drives often. After unpacking everything and disassembling the case, I noticed that LinITX had sent me hard drives with an IDE interface instead of SATA. So basically, my server is sitting here doing nothing until I can get some hard drives. To their credit, LinITX have sent the replacement hard drives already and will collect the incorrect ones when the new ones are delivered, which will be tomorrow.

Another disappointment is the set of stock fans that came with the case. They're loud. I'll have to order some from QuietPC. I'm thinking of getting these:

1x 40mm CPU
1x 60mm Top Case
1x 70mm Back Case
1x 80mm PSU

The BIOS of the motherboard feels pretty cheap. It's unresponsive, basic and ugly... but it at least does the job. Thankfully it's capable of booting from USB sticks - no need for a CD/DVD drive!

The CPU is impressive. Not only is the ATOM 330 a dual core CPU, but it also supports HyperThreading. This means that, to Linux, I have 4 CPUs (in laymans terms).

I have run Memtest86+ on the system, after 1h37m44s it had verified that there are no problems with my RAM... amazing! I normally end up with a bad stick of RAM whenever I buy PC hardware.
Server Downtime
NewsSome of you may have noticed the recent server outage. This has been due to faulty server hardware. It all started when I decided to migrate the server to a virtual machine (I was tired of the inevitable boot failures when compiling new kernels and having to move the server to a desk with a monitor in order to fix it).

Anyway, the first step in migration is to make a backup. Half way through the backup, the hard drive died. Not only did this mean that I lost a considerable amount of data (not much irreplaceable, mostly just configuration and stats files), but I also had to quickly drive to a local store and buy an (overpriced) hard drive so that I could resume operations as quickly as possible. 48 sleepless hours later, I had the server back up and running with minimal data loss (thanks to my scheduled, remote backups). So, just like any sane person, I decided to take a backup of the virtual machine. Half way through the backup, the new hard drive failed.

I refuse to believe this is a coincidence, my conclusion is that either my server's IDE controller is failing and destroying hard drives, or the power supply unit isn't regulating voltage correctly and is frying the drive... or maybe even the drive is overheating under the strain of backing up data. Either way, I can no longer trust my Mac Mini as a server.

As a stopgap solution, I am using a virtual private server from I've got to say, I'm very impressed with their service. I'm not being paid to type this, but their VPSes are fast, reliable and cheap. The administration website is also superb. Setting up the server at Linode took a further 24+ hours, since I had to start from scratch again.

While Linode seems like the ideal solution, I don't like trusting third parties with my data (I also don't like subscription charges), so I've ordered a new load of hardware to construct a new server consisting of:

Chenbro Mini-ITX Server Chassis
Intel D945GCLF2 Dual Core 1.6Ghz ATOM Motherboard
Kingston 2GB 533Mhz DDR2 RAM
2x Seagate Barracuda 7200.10 80GB SATA-II 8MB Cache Hard Drive

It's been a while since I bought any computer equipment (aside from my Macbook Air), but I find it pretty surprising at how cheap all of this is. When I built my first Mini-ITX system, it cost more than everything in this current order and was terribly under powered.

Notice that the new system has two hard drives - yes, I intend to RAID1 mirror my server now (granted, this wont save me from dodgy IDE controllers or PSUs, but it still makes sense).

Another option would have been the T7 ATOM 330 from TranquilPC, but this could only store 2x 2.5" hard drives, which would be more expensive. Had I not recently already bought a 5-Bay NAS, the BBS2 would also have been a possibility. I do, however, prefer to keep my server and my NAS separate.

Once the new hardware arrives (hopefully tomorrow), I'll get the fun task of migrating about 4GB worth of data from my Linode back home to my new server.

Lessons learned? Be damned sure to backup your "/etc" directory, unless you get pleasure from having to reconfigure EVERYTHING in the event of a hard drive failure. Luckily, I had everything else of importance backed up already.

All in all, this has been a pretty expensive and tiresome fiasco, and it's not even over yet!
Vacation Time
PersonalIt's vacation time again. This time I'm going to the west coast of America. I'll be visiting San Francisco and Los Angeles over the next 15 days. If I get time (and have an Internet connection) I'll try to post photos to my Mobile Me Gallery.

I'm now sat in the departures lounge in Heathrow Terminal 5. The terminal is much nicer than T4 and it has free WiFi. Check-in took all of 5 minutes (usually takes me at least an hour) and security was about 30 minutes (again, probably a bit quicker than usual). The downside of everything being so fast is that I now have 2 hours until boarding!
Apple Security Issue
PersonalI was recently given credit by Apple for discovering a security issue in their new Mobile Me service. I think it's very decent of Apple to give credit to people that find such security flaws.
Mac OSX Cocoa Development
SoftwareIt's been about 18 months since I switched to using Macs... and I feel quite guilty that I haven't taken the time to learn how to program using Objective C and Cocoa within the Xcode development environment. Well, with the iPhone SDK being released and international signups now being accepted, I decided it was time to give it a go. I've ordered two books, one on Objective C and the other on Cocoa (both sadly not immediately available). Due to the lack of availability, I decided to scour the web for tutorials and found two superbly illustrated (but lacking in in-depth detail) tutorials. Again, one for Objective C and one for Cocoa. These tutorials are okay if you grasp the basic concepts of C and Object Oriented programming, but will lead you into a false sense of security if you don't know of these concepts. Finally, another tutorial I found to be quite useful was Apple's own on Cocoa application development. Again, this tutorial is aimed at those who already know about programming and everything that goes with it (memory management, MVC pattern and OOP), but it's an incredibly useful resource for getting a feel for Cocoa and Xcode.

Anyway, what would a post discussing new development endeavours be without a screenshot? So here it is, the best Cocoa application ever created. My take on the currency convertor tutorial!

I'm impressed at how easy it was to get the application to look good. I can't claim any credit for the gradient background or the rounded widgets; it's all part of OSX! Without having any knowledge of Objective C and Cocoa, I'd say it took me an hour in total to get that application running (that includes reading all tutorials, messing around with Xcode's settings and then writing the application itself). The great thing is, if you know C or Java, you should understand how it all works because the principals are the same (in fact, Objective C is a superset of C, meaning everything in C is included in Objective C!).

Being serious, I know that this application is hugely trivial and that I have a vast amount of knowledge and experience to gain when it comes to Objective C and Cocoa, but I think I've achieved quite a bit for an hour of hacking. I'm also quite impressed with what I've seen so far in terms of Xcode and how it enforces the MVC pattern. Equally impressive are all of the little things which make development so easy, such as the way tab chain-of-focus is setup (see the Apple tutorial) and the way anchoring works (there is a superbly useful animation on the "Size" property window which shows what will happen to your widgets when the window is resized based on your current selections - take that Visual Studio!)

For anyone interested in following in my footsteps, I read the Objective C tutorial, followed by the Cocoa tutorial and finished with the Apple tutorial. This is probably the best order in which to read as each subsequent tutorial will make more sense after reading the previous one.
Project Management
SoftwareAfter years of using CVS, I decided to take the plunge and "upgrade" to using SVN based on seeing a project named Trac. Trac is a project tracking system that gives you a web front-end to manage issues, source code and Wiki entries pertaining to your project. The only problem I had was its incompatibility with CVS. Upgrading to SVN was a piece of cake thanks to cvs2svn and I have to say, I'm a lot happier with SVN than I was with CVS (the concept of "changesets" is very nice).

Back when I first started working on the SlX libraries and all projects that utilise said libraries, all I used for issue tracking was a ".txt" file and a text editor. Trac makes it so much easier for me to keep track of bugs and new features. If you are working on a software development project or are in a similarly semi-unorganised situation that I was in, I highly suggest that you check Trac out. It's never too late to implement good project management!
Java, MP3s and Lyrics
SoftwareI recently discovered that my iPhone is capable of displaying music lyrics whilst my songs are playing. I thought it'd be a good idea to get all of my MP3s tagged up with Lyrics to take advantage of this. Having previously tagged them all with album art, I knew this would be a rather daunting task (in fact, it's much worse, multiple songs share album art where as each song has its own lyrics!)...

My first idea was to find some existing software that did this automatically. I found something called "Corripio" for the Mac, which lets you code your own script to scrape a website for lyrics. This seemed perfect except that it meant learning a bit of Ruby (the creator's language of choice). After the program crashed a couple of times, I decided it wasn't stable enough to use. At this point I ported the Ruby scraper that I wrote to Java with the intention of using an ID3 library from the internet. The scraper hit for song lyrics. It worked fine, but the quality of lyrics was pretty terrible (I swear most people are deaf), because of this, I decided to rewrite the scraper to scrape LyricWiki (a great site!).

I tried the JavaMusicTag ID3 library which I soon found to be buggy and horribly structured (try using it on an ID3v2.4 tag, it'll tell you that it can't cast new frames from ID3v2.3 to ID3v2.4 frames due its the horrible use of inheritance).

As the old adage goes, "If you want something doing right, do it yourself". So I wrote my own ID3 library for Java which copes with most of the ID3 features that I'd care about. Everything seemed to work fine until I tried editing the ID3 tag in iTunes, at which point I could no longer alter the lyric tags after saving in iTunes. It turned out that when iTunes saves the ID3 tags it checks for the ID3 version. If it finds version 2.4, it saves the album art with a synchSafe integer size but DOESN'T flag that it has done so in the frame header. This means that my tool would mis-read the album art frame and corrupt the header.

My solution for now (though inelegant) is to not support ID3v2.4 tags with my tool.

Anyway, I'm happy to say that all 2211 of my MP3s are now fully title, artist, album, artwork, track number and max track number tagged!
New Car
PersonalOn December 6th 2007, my Peugeot 205 was written off by a careless van driver, who ran into the back of me while I was stationary in traffic at a roundabout. I now have a 2001 VW Polo. Despite it being the same size engine (and even being 16v), it's not as powerful as the 205 and not as fun to drive. I guess they don't make cars like they used to anymore!
iPhone (or never shop at The Carphone Warehouse)
PersonalSo I caved in and bought an iPhone today. So far I'm quite enjoying it. It's very responsive, the UI has been superbly designed for usability and feedback. My only problems with it are that it's locked in to a contract with no hope of unlocking it through O2 (only hacks will be available) and there is no way of making third-party apps for it (yet!). Apparently an SDK is coming in Jan/Feb.

I spent about 2 hours trying to purchase the device from The Carphone Warehouse - forget it. The salesman there was a downright liar and con artist. The guy's name was "Izzy" from the Harlow, Howard Way store. He suggested I get their insurance for 40 GBP quarterly because it covers "everything" and that O2's insurance at 7.50 GP per month wouldn't. I checked the O2 website and it had exactly the same coverage. There's lie #1. The guy even said he was calling his "friend at O2" to compare insurance coverage, I'm fairly sure O2 said they had the same coverage, at which point he hung up and told me they did not. Lie #2.

I asked him if there was an O2 shop nearby so that I could compare insurance myself (I knew there was), he said no. Lie #3. He also said all O2 shops would be sold out, again he had no way of knowing this for sure.

He then told me I needed to give him my bank details so that he could run a credit check when there is absolutely no need for him to do this as it is done entirely by O2 and Apple via iTunes. I was told by him that O2 cross-check what I enter when I activate the iPhone with what he enters whilst I am purchasing the phone - lie #4. I eventually gave in but then found out he was doing it so that he could charge me for the insurance. He then told me "Because it's an iPhone, the insurance is mandatory"- lie #5. He then told me I would not be able to get insurance from anywhere else after buyng it - lie #6. He told me that if I bought the iPhone from Apple directly that they would force me to buy the extended warranty - lie #7. After telling him I'd walk out if he didn't stop harassing me over the insurance he eventually gave in and tried putting the payment through for just the phone... their systems crashed. I waited for another 30 minutes whilst he promised that he was doing everything he could to bring the system back online, but after being in the store for 1.5 to 2 hours, enough was enough. I asked for my card back and told him to tear up all of the paperwork that I had signed. I then drove the 5 minutes to the O2 store that didn't exist and was in and out of the store within 10 minutes, new iPhone in hand, 5.83 GBP per month better off and no hassle of "cross-checking" my bank details - all I did was pay for the phone with a credit card, nothing more.

Apparently I'm not the only person this has happened to, see here, here, here or just Google it.

Lesson: Never shop at The Carphone Warehouse.

I've forwarded this complaint to the BBC Watchdog. If anyone else has had a similar experience, I strongly urge you to do the same!
Apple Airport Extreme
MiscYesterday I bought an Apple Airport Extreme base station (read: a wireless router) to replace my current router, which has a failing WiFi card in it. I figured it'd be nice having a small, neat package that does everything my current Linux router box does. The first minor annoyance was that it only allows you to maintain a class C (/24 - 192.168.1.x) network. I like to use class B (/16 - 192.168.x.y) to partition all of the networked devices in my house nicely. After devising a new class C network, I then found out it wasn't possible to assign names to systems so that I could address systems by name rather than IP. To get around this I had to add a new zone to my BIND server to and make all computers search this "local" zone when resolving names, which didn't work very well. Further to this, you can reserve IPs on the DHCP table for MAC addresses within the Airport Extreme setup program, but when configuring NAT forwarding you have to use the IP address rather than the name which means despite naming machines, you still need to recall their IP addresses in order to setup NAT.

To top everything off, the Airport Extreme does not allow you to forward port 53 via NAT (thanks to a bug in the software, which Apple is aware of but has not yet fixed). This makes it totally impossible to host DNS behind the Airport Extreme! I've had to put my old router above it in the network and use the Airport Extreme as a wireless bridge only. I would probably have been better off just buying a new WiFi card!
816,381 unique visits