Monday, December 6, 2004

Perth Trains

When I was a boy each train had a conductor who would walk through the carriages checking that the passengers all had tickets. If you didn't have a ticket then you could purchase one from the conductor. One day the Government decided that conductors were expensive and inefficient, I have memories of people protesting and complaining when it was announced that the conductors would be laid off. You had to buy your own ticket before you boarded the train and you could be fined if you were caught without one. This new strategy obviously did not work because now the trains have "transit guards" who walk through the carriages checking tickets. Except that if you don't have a ticket you can't purchase one from them, instead they fine you.

This is known as progress.

Saturday, July 24, 2004

Olympus C350 Digital Camera

I recently bought myself a digital camera. I talked to various people and the consensus seemed to be that Cannon and Olympus have better quality lenses so I narrowed my choice to one of these brands. I mainly want to to take photo's for the web so a huge megapixel rating isn't a big priority. I was told that digital zoom is pretty much useless but to get analog zoom if I could. I decided on the Olympus C350 Zoom which is a 3.2 MP 3x optical zoom camera. So far I am very happy with the results.

Digital Photography Review is a good site to look at for reviews and specs for camera's if you are looking at purchasing one.

As I was warned alkaline batteries don't last too long, I picked up two sets of digitor NiMH 2000mAh rechargeables which seem pretty good so far.

Some resources for digital camera's and Linux:

Friday, July 23, 2004

Underpants Gnomes

Call me cynical if you like but I wonder if I am the only one to put these two headlines together- Bush approves arms sales to Iraq and US 'war on terrorism' faces $US12b cost blow-out. In the tradition of Slashdot business plans we have:

  • create fictitious reason to invade country
  • invade
  • ...
  • sell them arms to quell the mess you created
  • profit!!!

Oooops looks like this time the Underpants Gnomes have a business plan after all. I concede, it wasn't *all* about the oil after all.

Tuesday, July 20, 2004

Fahrenheit 9/11 and the Free Trade Agreement

I saw Fahrenheit 9/11 on Friday night. I found it a disturbing movie. I have always held that the invasion of Iraq was all about money and oil but the degree to which the corruption, deciept and manipulation goes is scary. I hope Australian and US voters take note of this movie, it is time for regime change. Take the time to see it yourself and make up your own mind. Michael Moore is a talented story teller because the movie is remarkably watchable considering the subject manner. It is entertaining and despite the fact that at times it is sad, frightening and sickening it left me feeling hopefull, perhaps because it tells the truth.

The FTA (that's f*cked trade agreement, the only free in it is for the USA) recieved yet another bashing on Radio National's perspective last week, read the transcript. Please wander over to and sign the petition to Mr Latham. It's possibly worth noting that a similar petition to the Prime Minister is not possible because he keeps his email address secret. I have to quote this passage from Global Trade Watch:
"The Australian Government has concluded a Free Trade Agreement (FTA) with the USA that undermines fundamental social, cultural, environmental and democratic protections which we all enjoy. It gives US corporations new rights to challenge our laws, and unprecedented influence on everything from how much we pay for medicines to our quarantine regulations. It has been negotiated with almost no democratic input, and will be almost irreversible once in effect."
On the radio this morning one of the presenters pronounced café "caff". Maybe that is a result of computers spelling it "cafe" (no accent on the e), but disappointing from a professional communicator. Still she is ahead of Peter Costello (the man who would be PM) who "listens to the radio airwaves" (transcript), however you do that.

Oh and Neil Gaiman uses Firefox!

Wednesday, June 23, 2004

Debugging Perl

or "Looking For The Obvious"

I started my working life in electronics as an apprentice working on communications equipment. I spent a lot of time doing component level diagnosis and repair of communication equipment, everything from two way radio sets to analog and digital microwave bearer equipment. There was one card which we had so many spares for that nobody bothered to repair them until the spares started to run out. At which point I setup a test rack and made a start on a box of 200 or more faulty cards.

I soon knew all the common faults this card had and I had a series of notes on how to pick them- waveform diagrams and voltage measurements. One card had me stumped though, I worked on it on and off for 2 or 3 days. Eventually one of the other technicians stopped by to see how I was doing. I told him about the progress and how I was stuck with this particular card. I showed him what I had checked and the weird waveforms at various points on the circuit board. His response was "Have you checked the power supply?". I told him that the power supply was fine and to demonstrate I connected the oscilloscope and showed him various waveforms on the board. He asked again if I had checked the boards power supply. I showed him some more wave forms. When he persisted I gave in and checked the power supply only to find that the only fault this board had was a missing fuse! I could easily have spotted the fault with a visual inspection! (The waveforms I could see on the card were coming from the other connected devices in the test rack.) It was a powerful lesson and one I thought I had not forgotten.

Last week I was asked by a colleague to help with a Perl problem. The error message was for a missing module IniConf. I jumped over to CPAN and found the module and becuase it hadn't been updated since August 2000 I checked the Readme and found that Config::IniFiles is a drop in replacement. I downloaded and installed Config::IniFiles edited the script to call the new module and told my colleague it was all good.

He soon complained again though. The error messages indicated a problem with the script other than the edit I had done. I asked him if it had worked before and he said it had. I jumped in and found 3 missing quoation marks from a section of code. He then recalled having edited that code so I fixed it and gave it back to him and went back to what I was doing. Now it wasn't producing any parse or compile errors but it was still failing at run time.

The original program was written in 1998 and did not use -w or stict and didn't check return codes in many places. But it had worked prior to my colleagues edits and I had fixed them. The IniConf initialisation was in a 20 line commented subroutine which did nothing other than

$cfg = Config::IniFiles->new( -file => "/path/configfile.ini" );

so I removed the subroutine and just in case checked again. It was failing on reads from the inifile "Can't call method "val" on an undefined value". The section of code which was calling method val was a 16 line commented subroutine which did nothing other than

$val = $cfg->val( 'Section', 'Parameter' );

I replaced that code as well. It felt good but it didn't fix the problem. I checked the return value from Config::IniFiles new method. $cfg was not getting set. I then wasted some time insisting that it was the script that was at fault (even though the evidence indicated otherwise) after all I hadn't found any reason to trust it so far. Eventually I gave in and wrote a 5 line test case which demonstrated the problem. I didn't believe that Config::IniFiles would be at fault (it had passed its tests when I installed it) but I wasted some more time looking at it any-way. I read the documentation again, the new method "Returns a new configuration object (or "undef" if the configuration file has an error)."

I had had a (brief) look at the ini file and dismissed it because it was pretty simple and it had "worked before". Time to look again. I deleted all the config file apart from one section and one name value pair. This time it worked. I asked my colleague if he had edited the ini file "Nope I just added a couple of comments". Great. Delete all the comments. Worked again. Taking a closer look at the comments showed one line starting with a ":" instead of a ";" (which proves that a "#" is a far superior comment character to ";"!).

Going back to the real program with the fixed ini file and it worked. Just to be complete I replaced
$cfg = Config::IniFiles->new( -file => "/path/configfile.ini" );

$cfg_file = Config::IniFiles->new( -file => $ini_file )
|| die "Config::IniFile method new failed\nProbably error in $ini_file\n";

so that the next poor schmuck is pointed in the right direction. (It would be much better if Config::IniFiles set $! on failure, a bug report/feature request is still outstanding.)

  • use strict and -w (although fixing this 3000 line monster was out of my scope)
  • Always check return codes.
  • If someone edited something find out exactly what and where and check that first.
  • If you are a module author set $! for failures. Update: this is wrong, see here for why.

What "check the bleeding obvious" lessons have you learnt?

Crossposted to

Thursday, June 17, 2004


On Tuesday the Government released a "new" energy strategy. It has been simultaneously hailed by the mining sector and condemned by the Greens. You might dismiss the Greens opposition but coupled with the applause of petroleum industry you have to start thinking that this is not an environmentally sound policy. Now the Government is seeking to outlaw biodiesel fuels. Another move that no doubt has the mining sector rubbing their hands with glee.

Putting it all in the context of world events the method appears to be:

1. control the oil
2. ban or inhibit the competition
3. ignore the environment
x. profit?

Instead of looking after the long term interests of the people Governments are increasingly seeing only to their own re-election and short term profit. A lot of good being rich will do as the consequences of global warming and other environmental impacts of their petroleum policy take effect. One can only look with envy on Brazil where petrol/ethanol fuels are taking off.

Friday, June 11, 2004

Free Trade Agreement 2

As an update on Free Trade Agreement here is a research paper from the Parliamentary Library discussing on the impacts of the so called "Free Trade Agreement" on intellectual property rights.

Some choice quotes-
" a net importer of IPRs, Australia would lose more than it gains by strengthening IPRs. The net economic impact is thus likely to be negative."
"...copyright holders have been able to use technological measures and Australia’s laws against circumvention to discriminate against Australian consumers. For example, the prices charged for some computer games in Australia are much higher than the prices paid by consumers overseas. To a large extent the AUSFTA facilitates these practices."
"Developments in Australia and elsewhere have made it clear that technological protection measures seem to have more to do with discriminatory pricing than genuine anti-piracy measures. The AUSFTA further reinforces anti-competitive practice in those respects."

Thursday, May 20, 2004

Free Trade Agreement

I was listening to the radio on the way in to work this morning and they were talking about the so called "Free Trade Agreement" and if Australia's involvement in Iraq might have lead to it's "favourable" conditions. Lets give the FTA a bit of a look over and see who it favours-

Is it good for the environment? No, No and No.

Is it good for Australian intelectual property laws? No, No, No, and No.

OK but it must be good for the economy? A very resounding No.

So when you hear the FTA discussed remember just who it favours; Uncle Sam, there is no good for Australia in this agreement.

There is an online petition here and another coming here or write to your local MP!

Update: Academics claim FTA will push medicine costs higher.

Chaotic Good Elf Ranger Bard

Chaotic Good characters are independent types with a strong belief in the value of goodness. They have little use for governments and other forces of order, and will generally do their own things, without heed to such groups.

Elves are the eldest of all races, although they are generally a bit smaller than humans. They are generally well-cultured, artistic, easy-going, and because of their long lives, unconcerned with day-to-day activities that other races frequently concern themselves with. Elves are, effectively, immortal, although they can be killed. After a thousand years or so, they simply pass on to the next plane of existance.

Primary Class:
Rangers are the defenders of nature and the elements. They are in tune with the Earth, and work to keep it safe and healthy.

Secondary Class:
Bards are the entertainers. They sing, dance, and play instruments to make other people happy, and, frequently, make money. They also tend to dabble in magic a bit.

Solonor Thelandria is the Chaotic Good elven god of archery and the hunt. He is also known as the Keen Eye, the Great Archer, and the Forest Hunter. His followers respect nature, and only hunt when needed, but are quick to defend the forest from intruders. Their favorite weapon is the bow, and they tend to be extremely talented with it. Solonor Thelandria's symbol is an arrow with green fletchings.

Find out What D&D Character Are You?, courtesy of NeppyMan.

Monday, May 10, 2004

Google Wishlist

I like Google. A lot. At my work I am quite often heard to say "Google is your friend" :) If I could talk in CAPITALS like Terry Pratchett's Death I would say "Google" and people would hear "Google" :) So here is my quick Google wishlist:

0 In Google preference's I want to be able to exclude sites selling stuff from all searches. A sort of anti- Froogle if you like.

0 Same as 1. except for training courses, training course overviews or synopses usually contain lots of key words and no actual information. If I want to find a training course I will put that in my search query thanks :)

0 It is just a suspicion and I can't back it up at all (though I am not alone in thinking this see here for example) but I think that Google does not do so well on indexing script generated content. Specifically in relation to Wiki's I think that Google needs to add weighting to the inner links of a Wiki, an inner link in a Wiki is not like an individual or organisation pointing to themselves it is the reflection of that pages worth by that Wiki community. There is a lot of good information in Wiki's which never makes it to your search radar and I think this will only get worse as collaborative content becomes more popular.

I will drop all this into an email to Google, look out for changes soon :)

Monday, May 3, 2004


Aside from the fact that it's light, fast and has great support for W3C standards here are 10 more reasons to love Firefox:

Update 2004-05-03: I have started using SwitchProxy at work. It is a must have if you use multiple proxy servers.

Monday, April 12, 2004


Microsoft's handpuppet, SCO, have been litigating and postulating all over the place, mainly it seems to compensate for the lack of a business model or product. These are some of the funnier !SCOundrel moments. If you want serious coverage of the case see Groklaw.

Update: I found another list (with some overlap) here.

Update 2: SCO Poland have shut up shop, check out the webpage :)