Wednesday, September 21, 2005

Occam's Razor

I listened to two colleagues working on a problem for 40 minutes or so yesterday. Normally I wouldn't have payed them any attention but my ears were perked because my fellow system administrator had suggested to them that they get my help as he was off for the day. It took a while but eventually one of them stuck his head around the partition and asked me to take a look at the problem which they characterised as "this user/script is not reading the environment settings".

Once I had established the nature of the problem, they were running a script on two different hosts which worked on one and failed on the other, my first question was "are the scripts identical?". They were absolutely certain the scripts were identical and quickly went back to the discussion about reading the environment settings. I asked again a couple of times in different ways with no success so I inserted myself on the keyboard and typed "more script_name" and then alt+tabbed to the other host and
typed the same thing. Alt+tabbing between the two showed right up the top of the script one had java /some/stuff and the other had ${some_var}/java /some/stuff

Sherlock Holmes said "When you have eliminated all which is impossible, then whatever remains, however improbable, must be the truth." Which is good advice but you have to take the time and do the work to eliminate all the other possibilities first. I prefer Occam's Razor
myself, "The simplest explanation is the best."

Wednesday, September 14, 2005

Star Kits

I've recently become obsessed by starkit and starkit applications. Let me tell you why. I have a linux desktop at work. I have a windows laptop for work use. I sometimes sit at other peoples windows boxes. Where-ever I happen to be sitting there are some things I want access to. Starkits let me do that. The datafile is the same, the application code is the same, I just need one starkit (one file) per architecture. And it just works. I use gorilla for passwords and wikit (a wiki in a file) for general notes. It's very cool.

The only problem is that some applications I want don't exist yet as starkits. I want a general purpose address book which can import and export data to my nokia phone and to evolution email and possibly in the future to Thunderbird. I want a notetaker database the same as I had on my hp200lx, in fact I want to import all that old hp200lx data into it. So I could go off and refine my tcl and learn the starkit and database API's and write my little applications and at the end of the day all the pleasure would be stolen from me because I don't like programming in TCL. I like programming in Perl.

Why can't I do this in Perl? There is no equivalent of a starkit for Perl. A starkit is one executable here that contains everything you need to run your GUI application and database.

I recently came across which covers the database side of it. But it still requires a complete perl install, a complete install of some GUI and then installing SQLite and then my app code.

I have to admit that I do have a bias against the Perl Tk library. Not because there is anything wrong with it in and of itself. Its just that under Linux the resulting applications look pretty ordinary and 1980's. I keep waiting for another GUI toolkit for Perl to develop a userbase so I could go with it, preferably one that is so popular it becomes ubiquitously installed where-ever Perl is, part of the core even. So far it hasn't happened. GTK seemed like it might be a contender for a while but I am still waiting.

I don't want to have to install anything. Not just out of laziness either. It might not be my machine. The tclkit for windows is about 930k. The application kits are about 200k each. Nicely sized for my thumb drive.

I can already here people wondering if I want write once run everywhere why don't I write in Java (or language x), and it's mostly because I like Perl. And Perl already runs OK everywhere I want to work. It just needs to be made easier.

Saturday, September 10, 2005

Take Back The Web

I have been an iiNet customer since 1994. They send out a regular newsletter, which this month has a theme of security. Here is a letter I sent to iiNet explaining why I was dissapointed with their security recommendations.
I read through your newsletter eager to see what security recommendations you made. No mention of Linux (nearly 10 years on my desktop and not one virus!), OK I can guess at why you might not have mentioned Linux. But I was shocked you didn't mention Firefox. The standalone Mozilla web browser. The one that blocks the spyware which arrives on users computers through Internet Explorer. The web browser which won all these awards.

You didn't make the one recommendation which would have made a real difference for users. Get Firefox now!

Take back the web. Pass it on to your clients, they will thank-you for it.

Update: I got a nice email from iiNet support saying that the newsletter was written by marketing and that iiNet do indeed recomend Firefox to their users- mostly in response to queries on how to block pop-ups. Any-way I wasn't the only one to write in about Firefox and they are going to address it in the next newsletter.

Update 2: The September newletter quotes me :) The writer/editor omits that the Mozilla based browsers are more secure by design and because they are not implemented as part of the OS and instead say that they are more secure because they are "often overlooked by virus and spyware creators" bleh!

VNC Server patch

A quick and dirty patch I wrote for the vncserver because it wasn't telling me why it was failing.

$ diff -c vncserver /usr/local/bin/vncserver
*** vncserver Tue Jul 5 14:41:27 2005
--- /usr/local/bin/vncserver Tue Jul 5 14:39:15 2005
*** 264,271 ****
socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
if (!bind(S, pack('S n x12', $AF_INET, 6000 + $n))) {
- my $port = 6000 + $n;
- warn "Could not setsockopt on port $port\n";
return 0;
--- 264,269 ----
*** 274,281 ****
socket(S, $AF_INET, $SOCK_STREAM, 0) || die "$prog: socket failed: $!\n";
eval 'setsockopt(S, &SOL_SOCKET, &SO_REUSEADDR, pack("l", 1))';
if (!bind(S, pack('S n x12', $AF_INET, 5900 + $n))) {
- my $port = 5900 + $n;
- warn "Could not setsockopt on port $port\n";
return 0;
--- 272,277 ----

Thursday, September 8, 2005

Values Statement

These are the values I am committed to in my life and for the world.

  • Peace Relating from the soul. Harmony and empowerment.
  • Family Love at the source. Family as the hearth stone. Youth as the future. Return of the elders.
  • Environment Everything is entitled to its place. Sustainable development and preservation of the wild places. Partnership with the land.
  • Spirit Acknowledging and honouring the spirit in all things. Life as a spiritual journey. The expression of spirit through creativity.
  • Service Joy, laughter and play. Life as service, work as service. Seeking my contribution.

Saturday, September 3, 2005

Fedora Core 4

My desktop got an Linux upgrade last night. I installed a shiny new (as shiny as beige gets any-way) dual layer DVD burner and then popped in a Fedora Core 4 DVD from Everything Linux. The install went without a hitch and I was up and running in fairly short order. I followed these instructions to get sound and video stuff working. Fedora Core 4 was able to recognise my motherboards on board sound card which is great because FC3 didn't. DVD playback through Xine even works.

The only thing I haven't tested is CD/DVD burning- I didn't have any blank media last night. FC2 burnt CD's fine but it stopped working in FC3 so I am hoping it is working again in FC4.

Update: CD burning works fine. I generally prefer Gnome to KDE but when it comes to creating CD's K3b rocks! I tried using Nautilus first since Fedora helpfully auto-ran it when I popped in the blank CD, it seemed straight forward but hitting the burn button did nothing and didn't give me any errors. I then started up X-CD-Roast but gave up fairly quickly in the face of the completely non intuitive interface (I shouldn't have to look at a manual for this stuff). With K3b I had a backup of my home directory burning away within a few seconds. That's how an application should work.