Friday, March 23, 2007

Trouble with the mixtlflap?

My car's in the shop right now — it started hesitating and even stalling every now and again (while driving) last weekend, and yesterday morning, I couldn't keep the engine running for more than a few seconds. Earlier this week, I had it into Canadian Tire three times — the first time, they guessed at something and replaced it ($90), this has no effect. The second time it sat in the parking lot all day because their scope wasn't working, and the third time they tried to hook it up to their newly-fixed scope, but it still wasn't working. On Thursday when I couldn't start it, I had it towed to the garage across the street (Al's Auto Service).

At the end of the day, I still hadn't heard back from Al, so I called to check on the status. He said that he had had it out earlier, and it ran fine, so he didn't yet know. I had to come into work today for a conference call, and Gail's away, so I had to rent a car (more on that later). I didn't know when I would be able to return the rental, so I asked Al if they were open on Saturday, and he actually laughed out loud at the thought of coming in to work on my car on a Saturday.

When I got home from work today, I finally heard back. They have no idea what the problem was, but it seems to be fixed now. He said they unplugged a bunch of things and plugged them back in, so it's possible that one of those connections was loose and is now OK. It's also possible that the problem has simply gone away temporarily, and it will stall on the way to work on Monday. Time will tell.

This is when I hate the fact that I know jack about cars. I can change my own air filter and windshield wipers, but that's about it. I have a vague idea on how the things work, but there are so many parts that I don't understand that I am always afraid I'm going to get taken to the cleaners when I go to the garage. I'm worried that I'll hear "We found the problem — your mixtlflap is burnt out. It'll be $850 to replace, plus two hours of labour. Replacing the mixtlflap is a serious thing, since you have to remove the flurbnarg first, and you know how hard that is." Sure I do, that's the thing that's right next to the flux capacitor, isn't it?

The car I rented is a Kia Rio. I'm actually more impressed with it than I thought I'd be. It's reasonably comfortable (at least as comfortable as my Sunfire), handles pretty well (it's quite small), and goes pretty fast. I looked at the speedometer at one point today and was surprised to find that I was doing 130 — I normally keep it around 110-115. It doesn't accelerate as fast as my Sunfire (which isn't all that fast itself), and acceleration is very loud, but once you're at cruising speed (or above!), it's very quiet. I haven't even looked at the trunk, but I suspect it doesn't hold very much, and the space in the back is fine for the kids, but I think that adults would find it rather cramped back there. But it has heated seats (or as I told Gail yesterday "seated heats"), a CD/MP3 player, power locks and windows, and remote keyless entry. Not bad for a car that starts at only $13,595.

Music quiz

Here's a little music quiz. See if you can name the band:

  • They were very big in the 70's and early 80's
  • Many of their songs are staples on classic rock radio
  • Three-piece band, based in the UK
  • The lead singer quit the band in the 80's and went on to a solo career
  • Originally his music was fairly similar to that of the band, but he gradually went more and more towards soft rock (to the point where classic rock stations that play the band's music won't play his solo stuff)
  • He worked on at least one movie soundtrack
  • One other member of the band had some success on his own, the third one vanished
  • The band recently reformed, and is now touring again

Obviously the answer is The Police, right? Wrong. Well, they fit all the criteria above, but the answer is Genesis. Phil Collins and Sting both went soft and started making some pretty lame music, Mike Rutherford of Genesis had some success with Mike and the Mechanics, and Stewart Copeland did quite well doing music for numerous movies and TV shows. Tony Banks and Andy Summers did nothing that I know of.

Weird how two completely different bands have so many similarities. I'd love to see the Police (though I'm not willing to pay the insane prices for tickets), though seeing Genesis doesn't really have that much appeal for me.

I was going to make a joke at the end of this posting, something like "Man, if only <band> would reform, that would be great!" where <band> was some band that was big in the 70's or 80's but then broke up, but I can't make such a joke, because I think all of the bands from that era already have reformed. Max Webster? April Wine? The Doobie Brothers? Styx? The Eagles? Yup, all within the last few years. REO Speedwagon? The Police? Genesis? Yup, they're touring now. Journey? Duran Duran? The Bay City Rollers? KC and the Sunshine Band? The Village People? Yup, according to Wikipedia, they're all touring now. Hmmmmmm... running out of bands.... hey, I know one!

Man, if only the Beatles would reform, that would be great!

Thursday, March 22, 2007

Weirdest spam ever

I just got the weirdest spam message ever:

Subject: anti-spammers are lamers
From: Marilyn Rice [weirdingdweller']


regards, spammer.

The hell?

Belak and Janssen

So the Leafs have been saying for days that they were not looking for revenge against Cam Janssen for his late cheap-shot hit against Tomas Kaberle a couple of weeks ago. I heard interviews with numerous players, including Kaberle (who got a concussion on the hit and hasn't played since), and they all said the same thing - they're not thinking about revenge at all, they just want to worry about winning — the two points are more important than getting back at Cam Janssen. So what happens? Less than ten minutes into the game, Wade Belak goes after Janssen and fights him, and then all the players congratulate him after the fight, and after the game, they talk about what a great thing he did. What happened to "we're not thinking about revenge?"

And they wonder why people who don't follow hockey all that closely think that hockey players are a bunch of thugs, and that hockey is a violent game.

Wednesday, March 21, 2007

NetWare hell

Novell announced the other day that their next version of SuSE Linux (called Open Enterprise Server) will be able to run NetWare 6.5 as, essentially, a virtual machine. It also says that "This release of OES also spells the end of NetWare as a separate operating system", so that you will only be able to run NetWare as a VM.

SQL Anywhere has been supported on NetWare since the beginning, and I have been the sole NetWare developer on the engine team for most of the last ten years. With this change, I don't know if it makes sense to continue supporting NetWare, so it's possible that management will consider dropping NetWare as a supported platform. This would be fine with me, since NetWare is a difficult operating system to work with — the compiler is old and unsupported, the debugger is flaky and slow, and there are lots of idiosyncrasies specific to NetWare that I have to deal with.

The title of the above linked article is "Good-bye NetWare, hello, OES 2", so when viewing that page in Firefox, that's what the title bar says. When I minimized the Firefox window, I got this, which I thought was kind of appropriate:

Saturday, March 10, 2007

Perl vs. Python

I'm not one to generally get involved in technical "religious" wars — vi vs. emacs, perl vs. python, Windows vs. Mac, etc. Each one has its advantages and disadvantages, and I have my preferences, but arguing about them is rarely productive. Having said that, there were a few comments on my previous (and completely unrelated) entry that raised the perl vs. python argument. I don't think perl is inherently unreadable, and it's certainly possible to write easy-to-read, coherent perl code, but in general, I tend to agree with Tom.

I am a professional software developer, and have been since my first co-op work term in 1988. (Aside: so is MC, and he's been doing this longer than I have.) I have written code in many different languages, including C, C++, Objective-C, perl, python, Java, REXX, Basic, PHP, Tcl, Lua, plus a few at university that I barely remember: Fortran, COBOL, Ada, Lisp, Prolog. Of these, the ones I use regularly in my job are C, C++, perl, and python. I know C and C++ inside out and backwards, but when I am writing any significant code in perl (i.e. more than a handful of lines), I almost always have the perl online documentation open in another window — that's not always true for python, and I've been writing perl code years longer than I've been writing python. I don't think that the perl code that I write is more complex than the python code, but the python syntax just seems more intuitive.

Say I have a list of filenames to process. In python:

files = [ 'file1', 'file2', 'file3', 'file4' ]
for i in files:
    # do something with i
Fairly straightforward. In perl:
my @files = qw( file1 file2 file3 file4 );
my $i;
for $i ( @files ) {
    # do something with $i
A little weird (what the heck does "qw" mean?), but not too bad. You could also use
my @files = ( 'file1', 'file2', 'file3', 'file4' );
which is a little more intuitive, though I had to check the perl docs to see whether to use parens or curly brackets.

A note before I go any further — in perl, there are a zillion ways of doing anything, so the code examples I'm listing here may not be the simplest way to do things. This, in itself, is part of my problem with perl — after ten years of writing perl, I should know how to do a lot of these relatively basic things, but without checking the documentation or an existing perl script, I frequently find that I don't. I've only been writing python for about 5 years, and I seem to remember its syntax and the majority of the language weirdnesses a lot more easily than perl.

OK, now, what if you want to add something to the list later? Python:

files.append( 'file5' )

Obviously, if you want to add to the end of a list, you "append" to it. Very intuitive. In perl? Well, I'm not sure. I'm currently looking through the perl documentation, and it's not obvious how to add an element to a list. I'm sure there's a way — maybe $foo += 'file5'; or $foo .= 'file5';. Maybe it's a documentation issue and not a language issue, but whatever way it is, it ain't obvious.

Another thing that confuses me about perl is there are a number of different "types" (scalars, arrays, and hashes), and you can seemingly convert one to the other whenever you want, and sometimes when you don't want. First of all, is a "list" the same as an array, or is it a special type of scalar? I don't know. Here's how to set up an array in perl:

@foo = ( 'a', 'b', 'c' );

Now, given that @foo = ( 'a', 'b', 'c' );, it would seem logical to me that the following two lines do the same thing:

$foo = ( 'a', 'b', 'c' );
$foo = @foo;

However, they don't. The first one takes the last element of the array and assigns it to $foo. (What happens to the rest of the array? And why would you do this?). The second, incredibly, assigns the length of @foo to $foo. If I want the length of an array, wouldn't it be more logical to say something like "foo = length( array )" (which, coincidentally, is the proper python syntax)?

This posting was not meant as a "perl sucks, python rules" rant. In fact, I don't think that at all. Perl is an exceptionally powerful language, and I do enjoy writing perl code. In particular, if I'm doing anything involving regular expressions or string manipulation, perl kicks python's ass all over the place. However, perl does not have the most intuitive syntax, and you can write completely unintelligible "Martian code" very easily in perl. There's even an online contest called Perl Golf to see who can write the smallest possible perl program to do a particular task — entries to this contest sometimes contain less than 50 bytes. Good luck writing anything remotely useful in python in less than 50 bytes. In addition, python requires correct use of whitespace to control program flow. Now, when I first learned this, my initial thought was "How stupid is that?", but I've since found that as long as you have a python-aware editor (emacs works nicely for me), this is not a big deal. The only drawback is that if you want to remove an entire section of code, you can't just put if( 0 ) { at the top and } at the bottom like you can in perl, C, or C++. Well, you can add if 0: at the top, but then you have to re-indent the entire block you want to remove. Again, with the right editor, this isn't a huge deal.

Bottom line: perl and python are both great languages, but I have found that the perl syntax is less intuitive and therefore harder to remember than python. Thus, I have more trouble reading old perl code than old python code.

Note: I'm going away on vacation tomorrow for a week, so if you add a comment to this post and I don't respond, I'm not ignoring you. I won't be back online until at least next Sunday (the 18th).

Wednesday, March 07, 2007

Channelling Andy Rooney

Have you ever noticed that when you make a phone call to a local number but dial a 1 first (as if it were a long-distance call), you get a message saying that you don't need to dial the 1, but then you have to hang up and dial again? Similarly, if you dial a number without a 1 that is long distance, you get a message saying that it's long distance and you need to dial a 1. But in both cases, your call does not go through. Why the hell not? If they want to give me a nastygram telling me what I should or should not have done, fine, but then put the damn call through. The technology exists. It's not rocket science. That's what happens on a cell phone, so why can't they do it on a land line?

The other day, I was making some phone calls at work to local businesses in the K-W area. Since I don't live in K-W, I don't know where I can call locally and where is long-distance, so in a few cases, I added a 1 when I didn't need to. Every time, I got the "You don't need to dial a 1" message, so I had to hang up and re-dial the number without the 1. Very frustrating.

When I call home with my cell phone, the call display stores the number with a 1 for some reason. If I then display the number, click the "dial" button, and then pick up the receiver, it dials "1-905-...", and then I get the message saying I didn't need to dial the 1. At that point, I need to hang up and dial the number manually. For our cell phone numbers, that's no big deal, but if it was a different number that I don't have memorized, I have to write the number down on a piece of paper and then pick up the phone and dial it. So much for modern technology.

This posting is yet another example of the hard-hitting hold-no-punches journablogalism that you'll find on Cut The Chatter. See, Whimsley, I can invent words too! Though yours kind of rolls off the tongue better than mine does.

Aside: Can you "channel" someone who's not dead?

Update: Just to prove that I invented this word myself:

Sunday, March 04, 2007

"Best Buy" may not be

Best Buy has admitted having an intranet web site that is identical to the public web site, except that the prices aren't always the same. Apparently the idea is that customers would come into the store asking about an item at a certain price, and the employees would then check the "web site", showing the customer that the price has gone up. I have heard numerous complaints about Best Buy — not just that their salespeople are pushy (that's true at a lot of places), but that they try to cheat customers and dupe them into paying higher prices. I've only been in Best Buy once, looking for something specific (don't even remember what it was), and I didn't buy whatever it was there, but because of all these stories I've heard in the past, I have been hesitant to shop there. After this latest one, they're on my "boycott" list. Not that I really had a boycott list before (I can't think of any other stores that I absolutely refuse to go to), but I have one now, and Best Buy's on it. This is a little unfortunate, since I'm in the market for a Wii, and they're rather hard to find. Removing one store from my list of possibilities will make it even harder to find, but, you know, standing up for your principles and all that.

Yappa Ding Ding wrote the other day about problems she had recently with Dell's website. This is unfortunate, since we're considering buying a new computer in the near future, and I was going to check out I probably still will, but I will be much more defensive if I end up having to speak with a salescritter.

Friday, March 02, 2007

The Observer Effect

We had a "parent observation day" in Nicholas' kindergarten class today. This is when a few parents sit in on the class for a while (90 minutes), and just observe (a) how the class runs, and (b) how their child behaves while in class. We were not supposed to assist him at all, we were just supposed to sit and watch. Of course, Nicky was an angel while we were there. We sat and watched him sit and read with two other kids with minimal incident — one of the kids wouldn't let Nicky hold the book, and rather than yelling and hitting (which he would do with Ryan), he calmly told the teacher what was happening. Nicky loves to throw stuff — I doubt he could go an hour and a half at home without throwing something, unless he's asleep or watching Scooby-Doo on TV, but he didn't throw anything the entire time we were there. Just before we left, his teacher came over and told us that Nicky was having "a stellar day".

This would seem to me to be a prime example of the Observer Effect, where the act of observing something changes it. (I have referred to this in the past as the "Heisenberg Uncertainty Principle", but according to Wikipedia, this is incorrect.) Nicky knew we were in the corner watching, so he behaved better than he might have otherwise. The only way around this would be to install a video camera somewhere where the kids wouldn't see it, don't tell them about it, and watch the whole thing from another room. But then some parents would go all "civil rights" and "Big Brother" on us and sue the school for mental anguish or some bullshit like that.

Of course, it's possible that I'm not giving Nicky enough credit — we all have our good and bad days, and perhaps he's just having a good day. He did get a lot of sleep last night, and ate a fair-sized breakfast, and we did get to watch in the morning before he gets tired, so maybe our presence didn't have that much of an effect.