Archive for the 'Tech' category

Save the net!

28/1/2009 1:00 pm

The Australian Government wants to screw up the internet for all of us, not just the minority who want filtering! Visit GetUp! and register your vote against mandatory filtering!


AFL Ladder Widget is Broken!

23/3/2006 10:32 am

Update: The widget is fixed, download the new version here!

The AFL has recently changed the layout of their website, including the ladder page where the AFL Ladder Widget v1.4 (and all the earlier versions) downloads the ladder data from. Thanks to John Reed for letting me know. A fix is in the works and a new version will be available to download in the next day or two.

For those who want to know the technical details behind the problem, well the widget is simply downloading the entire ladder page from the AFL website and then parsing through the ladder page source code, looking for the ladder data, which is in a HTML table structure. Once it has found all the data, it is displayed on the front of the widget.

Every time the AFL changes thier website, the formatting of the ladder table changes and because the current algorithm the widget uses to find the ladder data isn’t fool proof, it will more than likely fail to locate it, giving the “Error with data” message. The AFL changing their web site is unavoidable, and it’s not possible to write a fool proof parsing algorithm, given that the AFL can change the site in any way they want at any time.

But I’ve already taken a look at the AFL’s new ladder page and to their credit, they’ve made it easier to parse for the ladder data by including new unique attributes along with the ladder table data elements which they previously didn’t have. So as long they don’t change these, parsing the ladder page should be simpler and more robust, until the next time the AFL makes a major change to their website.

Does anyone know of an XML feed from the AFL which provides this kind of data without all the formatting?? That’d make my life so much simpler…

Robot 1

5/3/2006 5:38 pm

Over the last few months I’ve been working on a robotic platform. It’s been slow going and it’s still in the design stage but the plan is to create a mobile, rover type autonomous robot. I’ve spent most of the time so far thinking about how it’s all going to fit together, but have made some progress over the last couple of weeks towards getting the basic motor drive system working and tested.

Photos from the initial work I’ve completed can be found in my photo gallery.

I am no mechanical engineer, and I don’t have a decent workshop to build hardware in so I didn’t attempt to build the chassis myself. Instead I purchased it, along with the motors and wheels from Lynxmotion. Similarly, the motor drivers (internal to the chassis) were purchased from Pololu, another decent place for robotic parts.

I intend to design and build custom electronics for the main controller on the robot, based around the Atmel ATmega128 microcontroller, but at this stage I am using a Ethernut 2.1b board from Egnite to fill in for now. I’m also using their Ethernut RTOS to make software development simpler.

The final system will be autonomous, meaning it won’t require any connection to a computer to operate, it will just do its own thing. But for now I am using a Bluetooth serial adapter from Brainboxes for debugging and control - this thing is in the very, very early stages of development!

The robot as shown in the gallery has no collision sensors, no motor speed control sensors or any of the other things I want to add to the final platform like a digital compass or video camera on a pan/tilt platform. All this will come at some time later.

Below is a short clip (requires Quicktime) of the robot driving around under my control via a Bluetooth connection to my Mac.

It's alive!

AFL Ladder Widget v1.4

1/2/2006 9:02 pm

Here’s the latest update to my AFL Ladder Widget for OS X Tiger Dashboard.

It looks basically the same as the last version except for a few new graphics, most of the changes are beneath the skin - I had to re-write a lot of the Javascript to make it work properly with 10.4.4 and the changes to the AFL website.

It loads and displays the current Australian Rules Football season ladder and provides a link to each team’s website, that’s about the long and the short of it.

According to the information from Apple this widget should work on both PowerPC-based and Intel-based Macs, ie it is universal, but let me know if you have any problems with it!

Here’s how it looks when it’s running:

AFL Ladder Widget v1.4 - Front

AFL Ladder Widget v1.4 - Reverse

Get the widget for free here or click on the icon below to start downloading.

AFL Ladder Widget v1.4

The widget actually rated a mention in the Sydney Morning Herald last year!

Instructions for use:

Mac OS X v.10.4 Tiger is required. If you’re using Safari, click the download link. When the widget download is complete, show Dashboard, click the Plus sign to display the Widget Bar and click the widget’s icon in the Widget Bar to open it.

If you’re using a browser other than Safari, click the download link. When the widget download is complete, unarchive it and place it in /Library/Widgets/ in your home folder. Show Dashboard, click the Plus sign to display the Widget Bar and click the widget’s icon in the Widget Bar to open it.

Feel free to contact me if you have any comments, questions or requests!

Change log:

  • v1.4 - Major rewrite to adjust for 10.4.4 and AFL website changes plus add better error handling and new graphics
  • v1.3 - Added favoutire team highlight, plus many code revisions, and a new look
  • v1.2 - Fixed a formatting bug for the Sydney Swans
  • v1.1 - Fixed an update bug and tidied up the code
  • v1.0 - Initial release

AFL Ladder Widget v1.3

31/5/2005 1:03 am

Here’s my first attempt at an OS X Tiger Dashboard widget. It loads and displays the current Australian Rules Football season ladder and provides a link to each team’s website, that’s about the long and the short of it.

Here’s how it looks when it’s running:

AFL Ladder Widget v1.3

Get the widget for free here or click on the icon below to start downloading.

AFL Ladder Widget v1.3

Instructions for use:

Mac OS X v.10.4 Tiger is required. If you’re using Safari, click the download link. When the widget download is complete, show Dashboard, click the Plus sign to display the Widget Bar and click the widget’s icon in the Widget Bar to open it.

If you’re using a browser other than Safari, click the download link. When the widget download is complete, unarchive it and place it in /Library/Widgets/ in your home folder. Show Dashboard, click the Plus sign to display the Widget Bar and click the widget’s icon in the Widget Bar to open it.

Feel free to contact me if you have any comments, questions or requests!

Change log:

v1.3 - Added favoutire team highlight, plus many code revisions, and a new look
v1.2 - Fixed a formatting bug for the Sydney Swans
v1.1 - Fixed an update bug and tidied up the code
v1.0 - Initial release

Mac Mini How-tos

20/5/2005 10:57 pm

After all the effort I went to set up my web server and documenting the process I recently found a fantastic resource which describes in detail almost everything I went through to set up my server, and then some. Nerd Vittles is its name and it can be found here, along with its more up to date sister site Tiger Vittles. Both these sites have excellent guides on many different web-based applications and services you can easily enable on a Mac, they’d make a pretty useful reference for Linux too.

How and why I built this new site

17/2/2005 12:33 am

Here’s a quick rundown on how I built this website and the reasons behind changing it all around. I’ll not go into much detail on exactly how I did everything, all that detail can be found on the internet - Google is your friend. This run down is also for my own benefit, as a record of how I went about the whole process - the old memory isn’t what it used to be!

Firstly I previously hosted my old website on an old Pentium II Dell desktop I picked up second-hand. It was old, slow and had a small hard drive. I put a bigger drive in and rather than spend a lot of time setting up a server by hand I cobbled one together with using a Redhat Linux 7.2 based distribution called ClarkConnect. This worked ok for a while, it was simple to set up but a bit inflexible in a few ways, ran an old kernel and the old PII was loud, slow, ran hot and was hard to upgrade.

Still, it served me well for a while but eventually (and after being constantly hassled by Rebecca that the old website looked so bad!) I decided to change it. I’d been putting it off for a while, knowing what a pain it would be to change it all but the recent release of the Mac Mini gave me the excuse to retire the old Linux server. I’ve become a Mac and OS X convert over the last 2 years and I this gave me a good excuse to update my server.

The server runs on OS X 10.3, which being Unix based, has a rich volume of software available to it - and a lot of it is free and open source. The Mac Mini is an overkill for a small home server, but it’s small, fast, quiet and low power - all the things the old Linux server wasn’t. To cut to the chase, to replace the old server I needed to implement the following systems/services:

  • Mailserver - OS X comes with Postfix already installed but not turned on, I used Postfix Enabler to turn it on and set up a IMAP server. All very easy done, it practically runs out of the box. All I had to do was move my mailbox to the new server.
  • Web server - OS X has the Apache web server preinstalled. You turn it on under the System Preferences -> Sharing and enable “Personal Web Sharing”. That’s about it. I didn’t have to do much else to get it running, except enable PHP, SSL and the mod_rewrite packages for some of the later packages I installed. Only PHP required installing the other changes are configuration options.
  • Webmail interface - this enables me to check my email on the server from any computer on the internet. I had previously used Squirrelmail and I discovered that OS X Server comes preinstalled with it too. I only have OS X Client, so I needed to install this package too - another simple exercise, all the instructions are on the Squirrelmail site.
  • Photo Gallery - other software I have used previously is Gallery, a package for generating and managing photo galleries. I had to install a couple of extra graphics manipulation packages to get this to work, but you can find install packages for the Mac to do this for you.
  • DHCP server - my old server handed out IP addresses to the other computers at home using DHCP, I needed the same thing for my new one. I found a DHCP installer package here.
  • Spam filtering - it seems everyone these days is using SpamAssassin to check for spam. It’s relatively easy to install since OS X has Perl pre-installed. Setting it up to work in the mail delivery system is a bit of a pain though. I eventually worked out a simple method of doing it with Procmail. I also set up a cron job to teach SpamAssassin to sort the spam from the ham.
  • Network Intrusion Detection System (NIDS) - a unix server with ports turned off is more secure than a Windows box, and should keep most intruders at bay. A NIDS is a bit like an alarm system for your computer - if someone breaks in at least you’ll know about it. Snort is a free NIDS, and there’s an installer for OS X here.
  • Dynamic DNS updater - my site is run off a cable modem connection, with a dynamically assigned IP address. The IP address doesn’t change very often but if it does and I don’t have a way of updating the DNS record, the IP address and domain name won’t point to my server anymore and my site will simply disappear from the internet! DynDNS.org provides a free service to update the internet DNS records for my domain name and DNSUpdate is an update client for the Mac that detects when my IP address changes and notifies DynDNS.org.
  • Automated back up system - any computer is only as reliable as its backup system. After putting so much time into setting this server up I didn’t want to do it again any time soon. I connected an external Firewire drive to the server and installed Carbon Copy Cloner and configured it to clone the whole drive on a regular basis. This also backs up my email and web site content at the same time. I use this software on my PowerMac too and it has saved my skin more than once.
  • Streaming music server - I have a Slim Devices Squeezebox and I use this in conjunction with their Slimserver software to listen to my digital music library on my stereo. I can highly recommend this combination if you’re looking for a way to wirelessly interface your digital music to your stereo. The software runs on just about any platform and installs easily under OS X.
  • Home page - this step is what took most of the work! First of all I wanted to replace the boring old static home page with something a bit snazzier looking, but also something that wouldn’t need much farting around to manage or to add extra content.

    Some kind of weblog software looked like the best option, that kind of thing seemed to match all my requirements, despite weblogs being a bit geeky. There are many packages out there but after a short search I found this site with a comparison of all the packages available. I came down on the side of Wordpress - it’s free, has customisable themes and plugins and is simple to install and use, and it’s what the bloke who came created the comparison site decided to use. His reasons why he chose Wordpress seemed to match my requirements pretty well.

    The Wordpress requires a database, MySQL, another simple install. I also installed phpMyAdmin to help manage the database. There’s a trick required with the MySQL passwords for both Wordpress and phpMyAdmin to get them to work with newer versions of MySQL, look for it on Google. I then searched around the internet for a suitable theme to install to customise the look of my new web page.

At his point the site was “complete” and I removed my old front page and bought the new one online. The hardest part of the whole set up process was getting both Squirrelmail and Gallery integrated into the look and feel of the new site. Luckily I found a how-to for Gallery here and after a bit of frigging around, I got that to work. I then adapted the method described in the Galley how-to to Squirrelmail. I modified a couple of scripts and with a little trial and error eventually got the log in page looking right too! A bit more messing about with a custom Squirrelmail theme got the rest of the colours on the site matching the home page - remember, aesthetics are everything!

This run through has been very, very brief and glossed over many, many small and frustrating details I encountered along the way. It would be a miracle if this post is of any assistance to anyone else but me as a reminder to myself, but I’d be happy to answer any questions about it if anyone has any!