Footy's back
The Graphical AFL Ladder is back for 2008. This is my (not so secret) weapon in the office tipping competition. I wonder how I'd go if I based my tips each week purely on percentage or ladder position.
The Graphical AFL Ladder is back for 2008. This is my (not so secret) weapon in the office tipping competition. I wonder how I'd go if I based my tips each week purely on percentage or ladder position.
Today's unusual summer downpour in Perth was certainly welcome respite from the oppressive heat of the past week. It also triggered an unusual situation in my WeatherChart, which simultaneously shows temperature and rainfall for the past 3 days, of the rainfall completely overwhelming the temperature display. To ensure that temperatures are always visible in future I have made the rainfall bars slightly transparent.
The Bureau of Meteorology also seems to be in the process of adjusting their data feeds, by adding extra pressure information. For some stations this causes the pressure to register as rainfall, leading to some rather extreme floods. If the change looks permanent then I shall adjust the WeatherChart code accordingly.
Update 9 Feb 2008: I've updated the chart to cope with the occasional extra column of pressure. I also refreshed the list of weather stations, so if your station was missing then now is the time to check again.
I've updated the Country Bumpkin quiz to work better with very large countries.
If you haven't tried it yet then now's a good time to brush up on your geographical knowledge whilst admiring some stunning satellite images of the Earth.
The latest Chaucery quiz has been released. Country Bumpkin asks you to identify a country based on a satellite image of it and its surroundings. If nothing else, you get to view some nice scenery.
It's quite a lot more browser-intensive than my usual offerings, but I think the end result is worth it.
If you fancy pitting your wits against the mind of the Chaucery on questions like:
"Who was on the throne during the Great Fire of London?"
then you may enjoy the Monarchy Quiz. Be warned, though, that it's quite difficult.
I've updated my Weather Chart to fix the occasionally spurious oldest rainfall figures. Now, go analyse your weather...
The Dialecticon is now available in the Chaucery fun section of this site. It was inspired by an old blog entry on Americanisms, and allows anyone to easily see how synonyms vary according to location. For example, how much more common is the term 'sidewalk' in the US compared to the British term 'pavement', and what about in Canada and Australia? Now, go play...
Updated 12 May 2007: I've added some more examples to the dialecticon, including some which demonstrate how to use it to compare the spelling skills of various countries. Did you know that almost half of British web pages containing the word 'dumbbell' spell it incorrectly?
I've added some very simple podcast support to my Real audio downloading script, realToMp3. It just downloads the first mp3 content that it finds in the given podcast feed, which works fine for weekly shows where you also have realToMp3.py running weekly too. I thought it'd be nice to have the same script doing the Real stream and the podcast, where the download type is determined automatically. As always, the script is uncompiled Python, so you can read and modify to suit your needs.
Update 10-Apr-2007: I've added an optional second parameter that lets you specify a filename to save to, which is useful if the stream you are downloading doesn't have a very good title to start with (which is what the script usually uses).
I've made two updates to the Australian Weather Chart.
Firstly, I've added day separators to the chart, so the 72 hours of readings is split into more human-comprehensible sections.
Secondly, I've added the ability to easily select non-capital city observations. Prior this this, those stations could only be found by manually entering their BoM urls, which was an excessively tedious task. Now you can select state, region, and station from respective drop-down lists. I've used the region ordering which the BoM use, which may seem rather haphazard but is actually geographical order, from north to south. Since region names aren't in very common usage, this ordering system is more comprehensible than alphabetical.
The .php pages on chaucery.com are now processed by PHP5 instead of PHP4. This is a beta service offered by my host, but I don't expect that'll lead to any problems. The first PHP5 beta came out in June 2003, but it's good to let software settle down with a few bugfix releases before switching.
My main incentive to update was to be able to use SQLite 3, which offers smaller, faster databases than SQLite 2. My Crossword Tools database has indeed shrunk from 8MB to 5MB, but it seems a trifle slower. I had to rewrite some of the database access code to use PDO instead of SQLite specific calls, and I hope that further tweaking may bring the speed back. (PDO lets you use SQLite 2 as well as SQLite 3. Thus I can use identical code to compare the databases, and I find the SQLite 2 is 3 times faster than SQLite 3. This is certainly not expected, and I shall have to explore further.)
The only other problem with the upgrade was that my Asciifier page went blank. This was relating to the page compression, which was necessary on such a potentially large page. To fix it I replaced:
header('Content-Encoding: gzip');withob_start("ob_gzhandler");
It seems to work okay now.
Update 18 Feb: After some tweaking of the order and composition of the statements in the WHERE clause of my crossword tools SQL code I have got the speed of the SQLite3 database to within cooee of the SQLite2 database. It's now faster than it used to be, so that's a good result.
I have put my Weather Chart page live, amongst the assorted other online knick-knacks in the fun section of this site. It displays the last 72 hours of temperature and rainfall data for the weather station of your choice in Australia.
The data is made freely available by the Australian Bureau of Meteorology, but as their XML feeds are not expected until after the middle of 2007 I had to screen-scrape HTML for the particular aspects I required. I cache this data for 15 minutes, so the charts won't refresh faster than that.
Currently only the capital city weather is easily selectable. For other locations you have to wander through the BOM site and find the URL for the station you want. For example, to find all the stations in Western Australia, you could go via:
Weather Chart was designed with manual entry of URLs because I'm not sure how permanent the URLs are, and because there is no good long list of them for the program to grab. When the XML feeds come into effect I'll look at making this more user-friendly.
Update 16 Feb: Moved programming description to earlier post.
I've updated Fleace with a couple of small improvements.
When I tested the original release on my brother's computer I found that it always popped up an error saying that it couldn't connect to Flickr. That happened because Fleace was running before his network had a chance to get going. I've added an extra 30 seconds of silent retries before the program will question whether you want to try again manually.
In addition, I had a request for some way of only downloading high-resolution wallpapers. Although I couldn't add that to this version, I did add an optional note beneath the thumbnail image in the preview window stating the dimensions of the full size image. This can be turned on in the options dialog.
I've just set my latest software production free into the world. It's called Fleace, which stands for the Flickr-Enabled Automatic Changer for Everyone.
It's a small, easy-to-use wallpaper changer for Windows which retrieves pictures in areas of interest that you select from Flickr. As you browse through Flickr you may notice that many photographs have descriptive tags attached. For example, a picture of a cute puppy may be tagged 'cute' and 'puppy'. Just enter these tags into Fleace and it will select the most interesting pictures that match your selection.
I've based the design of Fleace on my successful offline wallpaper changer, WimpWall, which is still a popular download from this site. The two crucial elements that I maintained were
Although there are a number of Flickr wallpaper changers around already, many are based on the .Net framework, and thus require an onerously large download onto the user's computer. In contrast, Fleace runs happily on any version of Windows from Windows 95 to Windows XP.
I've also worked hard on making it easy to use, and part of this is removing unneccessary options from the program. I hope you try it and enjoy it.
I've expanded the map of Australian Football League grounds to included all grounds ever used to stage official AFL matches. Current grounds are indicated by a large red marker, and old grounds have a small yellow marker. I've also set the map to start up in hybrid mode, so you can more easily appreciate the views of the grounds from above.
An noted on the page, there are a few grounds missing. I shall add them if I become aware of their exact latitudes and longitudes, though I fear this may be difficult if some grounds have been built over.
Every computer on the internet has an IP address, which is a set of numbers that uniquely identify that computer. For example, google.com is 64.233.167.99. Each of the four number segments goes up to 255 (or 28-1).
The Acorn Electron let the user define characters, such as letters or sprites, using 8 numbers each up to 255, giving an 8x8 pixel square.
As an example, 56, 64, 128, 255, 255, 128, 64, 56 denotes an arrow. The most significant bit of the first number gives the bottom left pixel, the least significant bit gives the top left pixel, and the rest followed similarly. So, 56 = 0 * 128 + 0 * 64 + 1 * 32 + 1 * 16 + 1 * 8 + 0 * 4 + 0 * 2 + 0 * 1, which gives a first column of 00111000.
Combining these two facts I present the IP Visualiser, which displays a given IP address as a 4x8 pixel square. As you might suspect, this is quite limiting in artistic terms. However, there are probably some simple company logos that can be represented faithfully. I wonder if those companies would value "their" IP addresses.
An IPv6 version would give much more scope for creative pictures, as its greater range of numbers would allow for an 8x16 pixel area. I'll extend the IP Visualiser when IPv6 becomes more widespread.
After doing all the hard work in setting up the WAFL Grounds interactive map, I decided to go the whole hog and expand it to cover AFL grounds too. All of the current playing arenas for the Australian Football League are indicated, as well as a few of the recently vacated grounds.
Changing demographics and generally lower crowd support have forced West Australian Football League (Aussie Rules) clubs to relocate to remain financially viable. In the last few years various clubs have moved some kilometres from their original bases, but their location-based names have remained.
This has resulted in the current odd situation of East Perth's home ground being in West Perth, and West Perth now playing out of Joondalup, over 20km North of Perth. In addition, home grounds are being renamed after commercial sponsors instead of their locations. To assist confused supporters I have created a WAFL grounds map, showing current and recent WAFL home grounds, the names of stadiums and the clubs that are based there.
Update 1-July-2006: Changed map location.
The second round of the Australian Football League has just been completed, which means that the first Graphical AFL Ladder of the season has been created. It's a bit plain at the moment, but as the season progresses it becomes pleasantly squiggly. I find it by far the easiest way to follow the progress of teams throughout the season, rather than just seeing their current position.
The ever expanding Chaucery fun area is proud to announce its newest addition, the Weather Guesser. Unlike most online weather tools, this does not ask where you are located, but attempts to work it out itself.
For most people, this means a tradeoff between accuracy (of getting the location 100% right) and convenience (of having to specify your location). However, occasionally the location may be unknown, for which this tool is a more useful proposition. Memory-impaired backpackers of the world, here's your new homepage.
This is also a good demonstration of the frailties of geolocating computers. I believe that cities are guessed correctly 60% of the time, and countries 95%. Where only the country is known, the weather from a random city in that country is chosen. Specifically, the weather from the nearest major airport to that chosen city is used, as this data is easily and freely available.
If you belong to a large multi-city internet service provider that uses Dynamic IP or a proxy server, then there may be only a weak correlation between IP address and location. In those cases, the Weather Guesser becomes more of a vicarious window on the world.
I've added an image asciifier tool to the Chaucery fun area of this site. It converts given images into text only representations, and can work on uploaded files, direct URLs to images, or even convert the images on a web page in situ.
The coloured asciified images are created using HTML colour codes, but the black and white ones are more oldskool, using different characters to represent different intensities.
There is also a limit on the number of images within a single page that will be converted, with the remaining images left blank. If there is a particular image that you wish to convert that the asciifier does not reach then input the URL to that image directly.
Images containing colons (excluding any initial http://) are not converted - it's a feature, not a bug.
The size and width specified in the img tag are currently ignored, so when these don't match the actual image dimensions the latter wins out.
I've just added the Google Collator Search Collator to the Chaucery Fun section of this site. It uses the Google API to retrieve an assortment of what people are saying on a given topic. These results are then collated and presented.
For example, Philipp Lenssen, the mind behind Google Blogoscoped is most associated with the terms:
Finally the Chaucery site has its first authentic AJAX application, Instant Crossword Tools. There are other sites that provide anagrams and complete words with missing letters, but in testing I've found it quicker, easier and more fun to use my instant version.
The two main differentiators between different online crossword tools are (a) their ease of use, and (b) their wordlists. I'm pretty sure that I have the first one covered, with the instant results to the users' queries a vast improvement on the button clicking and page loading that people used to have to suffer.
For my word list I originally used a combination from Grady Ward's Moby lexicon project. In particular, I merged the two scrabble word lists with the common dictionary word list, and got a pretty comprehensive result. However, in testing I found that certain plurals were missing. As adding plurals algorithmically is not feasible, I instead switched to Ross Beresford's UK Advanced Cryptics Dictionary, which seemed eminently suitable.
The end result is a tool that I hope will be useful to anyone interested in words, but especially to those setting or solving word puzzles.
I used to have trouble remembering rarely used, yet important, security codes. With a bit of effort I conjured up an image in my mind of four words representing the four numbers in the PIN, and as the human mind is much better at remembering images than digits, I have not forgotten that security code since.
To make this process easier I created an online mnemonic generator, which in its initial form works purely for 4 digit codes. In theory it should produce some sensible and memorable combinations. Usually the key is that the number of letters in the word corresponds to the particular digit, but I had to take liberties with the '0' and '1' digits. For example, of and nought may mean '0'. Fortunately, it's easy to remember these particulars.
In the future I may extend this to longer codes.
Inspired by the pithy charts appearing in UK satirical magazine Private Eye I have started adding some simple charts to my blog. Whereas they have an army of moles, whistleblowers and hawk-eyed readers to provide their information, I just have myself to find some interesting titbits that are hopefully not too well known.
All of my public web sites have now been moved over to the Chaucery domain, with my blog in its own subdomain. Previously, everything was squeezed into my ISP's free, low-functionality webspace. Now with a new host there is room to grow, and the facilities to build more interesting products.
It'll be interesting to see how Google likes the change. Because this blog does not have a cohesive theme, most of my visitors arrive via search engines. So, I'll be monitoring my traffic statistics closely for the next few weeks to see if a bunch of .htaccess redirects on my old site will help my new site to retain its Google's rankings.
Yesterday I unleashed FractalPeaks, my 3D fractal explorer, on to the world. Unfortunately, it appears that the world is not ready. The trouble is that I wrote it using Microsoft's latest technology, the .NET Framework and Managed DirectX 9c. Whilst it has been great for the developer, it appears that non-developers will have a hard time getting their machines capable of running it.
I assumed that it would just be a matter of installing the .Net Framework and DirectX, but it seems that DirectX does not by default install the managed extensions required by .NET.
Once I've found out more about this whole topic I'll update my instuctions on installing FractalPeaks. I know that it's possible because the delightful MediaPortal has no problem; they don't even require the installation of DirectX with managed extensions. I might have to peek into their source code (one of the many benefits of open source).
After that's all sorted I'll do some more interesting blog articles about FractalPeaks itself.
I've just added Dr Who to my television timelines project. It only includes the major characters (basically the Doctors and his companions), and is accurate to within a year. I may add more people and more accuracy later, as the details are readily available from a multitude of sites.
I may also get more motivation after watching further episodes. The ABC are currently showing mid 1975, the start of Tom Baker's tenure. There are still a number of upcoming episodes that I was too young to see when I was growing up in England.
I've just put out an unexpected new version of WimpWall, my freeware wallpaper changer. It's unexpected because I had thought that my last release was feature complete, but after a number of requests from users I decided to add one little option.
It is now possible to turn off the countdown dialog preceding wallpaper changes. I won't use this option myself, because I prefer the ability to cancel a change if I particularly like the current wallpaper, but I appreciate that some people prefer the silent approach.
Although adding this to WimpWall was pleasantly straightforward, it did necessiate rewriting the settings parsing code. This is because I had assumed that, as mentioned before, v0.2 was feature complete, and the settings would never change. In v0.3 I had to add the countdown setting. Related to this, to cater for people upgrading from v0.2, I had to change from a hard-coded to a modular method of parsing. Fortunately, this means that any future unexpected changes will be easy to accommodate.
With this new release I also added polish to a couple of items, which you'd never notice, but make me feel better.
I've just put WimpWall, the wimpiest way to change your Windows wallpaper, out into the world.
There's a remarkable number of wallpaper changers already out there, basically because it's so simple to code. The actual work to tell Windows to set its desktop to use this_nice_picture.bmp is one simple well-documented line. Where the fun comes in is automating this process, and making it a little more functional. For example, unless you use the resource-hog of Active Desktop you can only use BMP format pictures. So you'd probably want your wallpaper changer to cope with JPEGs, by doing a conversion.
Another thing that I wanted, but couldn't find in one package with my other wants, was the ability to run once, such as at startup, then exit, so as not to use memory all the time. Also, I have my wallpapers categorised into different folders within a wallpaper folder, so I wanted to be able to just specify that main folder, and have the changer recurse down into the others.
I actually found some software that did both of these things. It was tiny, and had a minimal GUI interface. However, it offered no options on how to display the image (eg. tile, stretch or centre), and it sometimes chose the ugliest possiblity.
So, I installed Borland Delphi 6 Personal, from a magazine CD, and spent a few days writing the changer of my dreams. After finishing the major functionality, and polishing the GUI, I added a final convenience option. I gave a little 5 second warning before the picture is changed, allowing it to be cancelled. This was for those times when I'd set a wallpaper that I was particularly fond of, and I wasn't ready for it to be changed.
To finish my work on it today, I set up its web page, created a program icon for it (by changing the colour of my Mandelbrot Explorer program icon - I decided to keep the fractal theme), and finished documenting the code.
So, I installed Delphi 6 last Thursday, started WimpWall on Friday, and put it on the net today, Thursday of the following week. I guess it really is RAD.
I have extended the Heartbreak High Timelines concept to cover a few other shows. The backend code was converted from Perl to PHP, whilst the frontend did not change much.
The main impediment was finding the source data - lists of shows' cast members and when they were on. The Internet Movie Database proved to contain some useful, though by no means complete, information. I then put the project on hold while I worked out whether I was actually allowed to use their data.
After some emails to their licensing bots I eventually got directed to their Can I use IMDb data in my software? page. This says, in essence:
1. Obey their conditions of use
2. Don't grab the data dynamically
3. "The data can only be used for personal and non-commercial use and must not be altered/republished/resold/repurposed to create any kind of online/offline database of movie information (except for individual personal use)."
4. Acknowledge the IMDB as your source
OK, so did my site of television soapie stars' appearances qualify? Well, points 1,2 and 4 were fine, but I needed to check point 3 in more detail.
"personal and non-commercial use": yes, I'm just doing this for fun, not profit
"must not be altered/republished/resold/repurposed to create any kind of online/offline database of movie information (except for individual personal use)": hmm, this is something I created for other people to have fun with, so it's not individual personal use, so I'd better not be creating a database of movie information. Since my site is not a database, or about movie information, it's all clear.
Yay! At the top of all the pages on my sites, you will now see that the "Heartbreak High TImelines" tab has been replaced by "Television Timelines".
Proving that (a) I never get close to players during games, and (b) my TV is quite small, I have only just realised that Geelong wear white and navy blue guernseys, rather than white and black. I checked the other teams, and found a similar affliction with Adelaide and Melbourne. All this is good news, because it means that I can update my footy charts with unique colours for every team. Collingwood and Geelong are no longer twins, and neither are Essendon and Melbourne.
When I get a chance I'll update my historical charts with these corrected colours too.
I've now added graphs for AFL seasons back to 1995, which is when the competition was expanded from 14 to 16 teams. Fitzroy was still rumbling along back then, and it's good to be reminded of them by seeing their colours in the graphs.
Just as I finished my many hours of work on this update, I found a new much better source for verifying my data, which would have saved me a lot of time if I'd found it earlier. Does that mean the discovery was bad luck rather than serendipitous, purely because of its lateness?
I am considering doing a summary chart, showing the positions of the clubs at the end of each season, showing 1995 to 2003 on one chart. However, I'm afraid this'll have to be postponed until I can think of a way of doing this that does not involve too much work.
I have made preparations for using a new source for my footy data, one that should hopefully be a bit quicker than the old one, thus allowing me to post new graphs sooner. In doing this, I was able to compare the graphs from my two sources, and I managed to find an error in both sources. It looks like the error has only caused a minor defect on the percentage graphs, and had no effect on the ladder graph.
After the recent site redesign, there's still one element that needs fixing. Depending on what browser you are using it may be obvious that my choice in font sizes is not perfect. I am currently using the easy option of setting specific font sizes that look good in the browser that I use, Mozilla Firefox. However, this results in text that is too large in Internet Explorer for Windows, and I've no idea how bad it looks in other browsers.
What I should be doing is following the recommendations made on A List Apart, particularly in their Elastic Design article. Perhaps this would entail a move to using font-size keywords such as x-large. Their site looks the same to me in both Mozilla Firefox and Internet Explorer, so they must be doing something right.
I am also gradually validating and fixing the pages on my site. I would like to have everything conforming to XHTML 1.0, but I have been stymied by some link counters that provide their own non-conforming code to do the counting.
Perfection cannot be far away...
As mentioned previously, I have been rewriting my graphical AFL footy ladder in Python. This is now complete, and lessons have been learnt.
The initial work was on a direct conversion of the PHP code to Python. This was straightforward, as the syntax and functionality of the two languages was similar. I had also done the original code in a highly modular way, so it was easy to do testing on the way. The biggest change was the need to initalise multidimensional arrays in Python prior to use. PHP will automatically do the initialisation on first use, which is somewhat more convenient, especially when you don't know the size in advance. I ended up setting up a larger array than necessary, then slicing it to the correct size later.
The second step was to "pythonise" the code. In this case, this mostly meant redoing the loops without loop counters. For example:
for i in range(len(rounds)):
print("%d" % (rounds[i]))
for round in rounds:
print("%d" % (round))
Thirdly, using the libraries available in Python, I worked on smartening up the graph. The first thing I tried was antialiasing, which had a major improvement. I did this by increasing the graph size, then reducing it using the antialiasing filter in the Python Imaging Library. The rest of the graphics work was done in wxWindows (wxPython), but it was surprisingly easy to transfer images between the two.
Finally, I thought I'd have a play with splines, to see if that gave a better result than staight lines. Surprisingly enough, to do this took just the addition of a 'p' and the movement of an 's', changing a function call from drawLines() to drawSpline()!
The only problem with all these image improvements has been an increase in image size. To cope with this, I changed the images from the lossless png to the lossy jpeg. You can see the difference in quality, but it's a good tradeoff, with the size reduced from about 250kB to 65kB.
With the start of the AFL season last weekend the time has come to get the graphical AFL ladder up and running again. My current ISP doesn't provide the tools to generate these graphs as I used to, so I am rewriting the generating script to create the graphs offline. Instead of PHP I'll now try using Python, with wxWindows for the graphics.
I have redesigned this blog, and all of my sites, to give a consistent user experience. Last week I installed some user-tracking software, which has told me that most people are visiting the pages that I spend least time working on. This probably is related to the lack of navigation cues between my sites, and the widely-varying designs of each site.
So, I now have one style sheet in use by all of my sites (even the blog). It should make future redesigns much easier.
The new look was created by combining the "Boxed" blog style from Movable Style with the colours that I was already using for my most recent pages, plus one background image that I was using in my About page, to break up the big swathes of pure colour. Finally, I added some much needed navigation to each page, in the form of tabs. These were from the wonderful sample provided at Unraveled, where all the hard stuff is done once in the style sheet, and the main page just has some list items.
I made three main types of page. A 2-column one, such as for this blog, a single column page of a specific width, such as the genealogy front page, and a single column of variable width, which is used in genealogy sub-pages. These three types cover all of my pages at the moment.
Update (1 day later): I finally got around to checking how well the sites worked in Internet Explorer, and it was a little alarming. I had designed everything using Mozilla Firefox, and I found a couple of minor text sizing issues where IE had decided on a different default. These were easily remedied, with Firefox's DOM Inspector being decidedly useful.
Of more concern was a whopping bug in IE's CSS support, such that many areas of my pages were left blank. I'm still fiddling with various workarounds, but it's appalling that such a destructive bug could be in a released product.
I've been updating some of the pages on my conglomeration of web sites:
This weblog has been blessed by the arrival of comment spam. Much as I enjoy reading the futile attempts of avaricious technowannabes to improve their google ranking I feel it is prudent to stop all commenting until further notice.
The graphical AFL ladder showing the relative positions of the Australian Football League teams throughout 2003 is now online. For this final update I've changed the colours for the Brisbane Lions, who were hard to distinguish from Hawthorn.
After a fortnight's hiatus, my source for footy results has reawoken, so my graphical display of the team position's is now up to date. Yay.
Inspired by the unprecedented success of the Fremantle Dockers I have just finished setting up a site that shows the performance of the Australian Football League teams from round to round graphically. I think the innovative title of Graphical AFL Ladder says it all really. Currently the info is automatically parsed from a results page manually snaffled from the Internet, but I may automate this last part too, if interest holds.