Category Archives: Tech

Toy review


I did eventually get my iPod the other day. Actually, within about 20 minutes of posting this entry, I noticed a car in my neighbour’s driveway, and wandered over to get my package, which was no longer hypothetical. I ran home and opened the box like a kid on Christmas morning. Is niiiiiiice. But holy crap, is that thing ever small. My wife has a little 512MB MP3 player that she uses for early morning walks, and it holds lots of songs, but she still has to refill it occasionally because she’s bored of the music on it. The iPod, which is not much bigger (and when it’s strapped to your arm is probably insignificantly bigger), holds 160 times as much stuff.

I’d ripped a bunch of my CDs to MP3 because of the MP3 player in my car, but they used various ripping programs (some of which are better quality than others), and use different (probably fairly low) bitrates and such, so I decided to start from scratch and just rip everything with iTunes. I’ve only done maybe 10 albums so far, so there’s not much on there yet. I found a cable that I can use to attach to my car stereo, and this morning on my way to work, I listened to a podcast of yesterday’s Prime Time Sports, “the nation’s most listened-to sports talk presentation”. I generally like listening to this show (live) on my way home, but because it’s over AM radio (ugh), the reception isn’t always the clearest, and I can’t listen to AM radio and charge my cell phone in the car at the same time because of all the interference from the charger. Now I’ll be listening a day behind, but the sound is crystal clear, there’s no interference, I can skip bits if they start talking about football or something else I’m not interested in, I don’t miss anything if I stop to get gas or if I get home right in the middle of an interesting topic, it’s awesome. This is not even mentioning the fact that now I’ll be able to listen to programs from radio stations that I can’t even get, or (gasp) actual podcasts that are not simply recordings of radio programs. And soon (well, probably several weeks from now once I get everything ripped), I’ll have my entire music collection with me as well.

I haven’t even had the thing a week and already I’m wondering how I lived without it.

Responsibility


This entry is about responsibility. When you have a job to do, it is critical that you make every effort to make sure that job is done to the best of your ability, even if that means making sacrifices. By way of example, let’s just say, hypothetically, that I was expecting a package today, coming by FedEx from, oh let’s say Shanghai via Anchorage and Indianapolis. Let’s also say, hypothetically, that I was at work when this hypothetical package was delivered and the FedEx guy brought it over to my neighbour’s house, and he signed for it. Now the hypothetical package is in his hands, so he has taken on the responsibility of getting it to me, since I was the intended recipient. If you have this reponsibility, do you go out for the evening? NO! You stay at home and make sure that the intended recipient gets his hypothetical package as soon as humanly possible.

As I said, you may have to make sacrifices. You can go grocery shopping tomorrow. There will be other soccer tournaments that your kids can play in. You had an anniversary last year, you’ll have another one next year. I’m sure she’ll get married again.

So, Mr. Harrison, get the hell home, and get me my frackin’ iPod hypothetical package!

New Toys!


Somewhere out there, there’s an iPod with my name on it. And I mean that literally. I ordered an 80 GB iPod from apple.ca yesterday (with free engraving), and got an email this morning saying that it had shipped. I feel like rushing home and checking the mailbox every, oh, fifteen seconds or so. Maybe I’ll just bring my laptop and sit next to the mailbox. OK, I’ll have to cool the jets just a bit — I just checked the FedEx site, and the package left the point of origin in Shanghai, China a few hours ago, so perhaps sitting by the mailbox today would not prove useful. Tomorrow maybe.

The one I bought is priced at $349 US at apple.com, but $399 Cdn at apple.ca. Since apple.com won’t let you ship to a Canadian address, I had to buy from the Canadian site, which is a total scam — the Canadian dollar is so high right now that $349 US would only cost $378 Cdn, plus the sales tax would be less. I suppose I could have bought it through apple.com and had it shipped to my friend in California, and then paid him to ship it to me, but then you have extra customs stuff to worry about, and extra shipping costs, not to mention the hassle, so I guess I’ll just eat the $20 or so and complain about it in my blog. There, that’s done.

I am really looking forward to getting this new toy piece of equipment. My buddy Kurt has one, and he can’t stop raving about how great it is. Once I’ve ripped all of my CDs (450+) and put them on the iPod, I can store the actual CDs in the basement, freeing up space in the CD/DVD rack for more DVDs, which are starting to get piled in various places since we’re out of room. If I wanted, I could also remove the CD player from the stereo cabinet and replace it with the iPod dock I intend to buy. My car stereo already has an iPod input jack so I’m OK there, but I might need to buy one for the van. Kurt says that you can even rip DVDs to the iPod, so if I can hook it into the DVD player in the van, that would be even better.

Update: I saw 80 GB iPods at Costco yesterday for $369. Crap.
Friday update: It went through Anchorage yesterday, and is in Indianapolis today! Estimated delivery is Monday!

Even more Law & Order spinoffs


See on MSNBC today:

Alicia Witt arrives for the Weinstein Company party in this Monday, Jan. 15, 2007 file photo, in Beverly Hills, Calif. The 31-year-old actress, whose previous TV credits include “Cybill,” has joined the cast of “Law Error processing field:Caption An error occurred while parsing EntityName. Line 1, position 2

Deterministic non-determinism


A colleague pointed me to a blog entry on a blog by the VP of VMWare. It talks about a new “replay” feature in the next version of VMWare — you can record the execution of your VM to a file, and then replay that file later. This will reproduce the VM’s execution exactly as it happened the first time. This is an unbelievably cool feature for debugging things like memory stomps and race conditions.

When trying to find a bug, the easiest way is to run it in the debugger, put breakpoints near where you think the problem is happening, and then run it, hoping that it fails the same way that it did before. If it doesn’t, well, try again, or tweak some part of the test case to try to cause it to be more reproducible. If it’s a race condition, it’s highly possible that attaching the debugger or tweaking the test changes the timing enough that the problem never shows up. With this thing, once you’ve reproduced a problem, you could then replay it (in the debugger!) and step through the code, knowing that the problem will reproduce. You can step “back in time” to just before the problem occurred, and then step through the problem as it happens. According to the web site, the recording process has no effect on the speed of the VM. This is not possible according to the Heisenburg Uncertainty Principle, which, strangely, is specifically referenced in the article. Ah, what did he know, anyway?

Apparently it doesn’t have SMP support, so if your problem is SMP-related, this won’t help you. But it looks like a very nice piece of software engineering, so kudos to the VMWare people!

Thunderbird


I made the big email switch this week, going from Outlook to the brand-spankin’ new Thunderbird 2.0. My company actually uses Lotus Notes as the “standard” email client, but after a few years of using that, I found that it sucked rocks, so I took a week and switched to Outlook. First I politely asked IT to set me up with an IMAP account, which let me access my network-stored email folders from Outlook. They did that, and I used that to suck down all my archived mail. Then I abandonded IMAP and went to straight POP, and life was good… for a while.

I think it was when I upgraded to Office 2003 that things started to go bad again. Every now and again, I’d go for several hours without receiving any email, and discover that Outlook simply stopped checking, or something. I would shut down Outlook and start it up again, and then it would download all kinds of stuff from the previous few hours. It also took forever to start up Outlook (as much as several minutes sometimes), and the search capabilities were terrible, although I found a tool called LookOut that solved that problem. However, Microsoft bought the company that made Lookout, and changed the product into something called “Windows Desktop
Search”. Apparently Lookout itself is no longer available. I still have an install though – email me if you want it.

I started using Firefox as my default browser several years ago, and I love it, so when I found out that the same team made an email client called Thunderbird, I immediately downloaded it. I tried using it for a couple of days, but I could never get the LDAP stuff working, so searching the company address book for a name would not work. This was a big pain, so I decided to wait until that bug was fixed, and I went back to Outlook. A year or two later, I tried it again, and ran into the same problem. I asked another guy in my department how he got his to work, and he had no idea, it just did. Then we looked at mine, and it just didn’t. We even went so far as to use a packet sniffer and point Thunderbird at a perl script that my boss wrote that acted as a proxy to the real LDAP server, and got nowhere with that either. After more searching, I found that this was a known bug in Thunderbird — the LDAP stuff did not work if IPv6 was installed on the machine. Since I was working on IPv6 for SQL Anywhere, I had it installed, which explained why it didn’t work for me. I followed the progress of the bug for a while, and found that it was not going to be fixed until Thunderbird 2.0, so I had to shelve my plans to switch to Thunderbird yet again, though I did switch to using it as my newsreader at that time, and have been pretty happy with it in that capacity.

When I heard last week that Thunderbird 2.0 was being released, I got all excited, and downloaded it immediately. I tested the LDAP support and it worked, and it (relatively) seamlessly imported all my Outlook contacts and mail, and I’ve been using it for a week now. Honestly though, other than being faster than Outlook, I can’t say I’m noticing much of a difference. It’s better at dealing with junk mail, but I prefer Outlook’s addressing — the To and CC lists consist of a single (expanding) text box where you can enter names separated by semicolons. The names are then expanded, and if more than one match is found, Outlook underlines it and you can right-click to choose the correct one. With Thunderbird, each address is listed on a separate line (so if you’re sending an email to 20 people, you have this huge list of names, rather than one text box). When you enter a short form, it searches your address books until it finds one that matches, and then replaces the name with that address and stops searching. If I type “Kurt” to send an email to the guy in my department named Kurt (who wasn’t in my personal address book), it searched the company directory, found someone named Kurt (probably the first one alphabetically), and used that address. There is no indication that the name wasn’t unique. However, you can click “Contacts”, which opens up a little sidebar that gives you similar functionality. I’m sure I’ll get used to it and it’ll be good enough — I’m just used to the way Outlook did it, not requiring the extra sidebar.

I should probably have waited until 2.0.1, or at least until a patch or two was released, since it crashes now and again, and I’ve even seen the same behaviour that I saw with Outlook — no email downloaded for a long time, but no error messages to say why, or even to indicate that there was a problem. But updates to Outlook were few and far between, while I’m sure there will be fairly regular updates to Thunderbird, so I’m going to continue with Thunderbird on the assumption that these irritations are a bit of short term pain that will eventually result in long-term gain. At least I’m supporting the open source community! That’s good, right?

Open Source


Maybe I’m naïve, but I just don’t get the big deal with open source software. I think it’s great that people are willing to put their time and effort into writing it, documenting it, and supporting it, but there are people out there that believe that all software should be open source, and that commercial closed source software is generally a Bad Thing. While I can certainly see the advantages of open source software, I make my living writing closed source software. It’s fairly simple: if Sybase didn’t make revenue selling SQL Anywhere, I’d be out of a job.

Thinking about it a little more, I’m quite sure that I am naïve when it comes to open source, because I don’t think I understand how it works. The extent of my knowledge about the process is this: there is a code repository somewhere on the web, and anyone can sync up to it and make changes to the code. But are there regular code reviews? Are there people checking every code submission to see if someone is adding bad code or trojans or anything like that? Who checks all the different platforms? Who runs regression tests to make sure that new features aren’t breaking old features, or that performance isn’t being affected? Who decides which
new features go in and which ones don’t? Surely there must be a full-time team of developers and managers that oversee all of these things, but how do they get paid? Who can afford to take on a full-time job that pays nothing? Is the open source world entirely populated by rich developers who don’t need an income? I doubt it. Is it enough to have advertising on the web site and a “Please donate” button with a link to PayPal?

I just checked the OpenSSL web site, and it says specifically that the project is volunteer-driven. The Apache Software Foundation is a non-profit charitable organization, and their annual reports (complete with financial information) are listed on their website. However, according to the 2006 report, every officer of the company received $0 compensation, and the total revenue of the entire organization was under $150,000. Total compensation, wages, and benefits were $0. Again, are they all rich and don’t need incomes? How do you squeeze in being a director or VP of such an organization if you already have a full-time job elsewhere?

I’ve been a professional software developer for over 15 years, so I probably should know the answers to these questions, and I’m feeling rather stupid that I don’t. If you do, please leave a comment and let me know how this works. Maybe I should stick to blogging about my kids or sports.

Wii!


I have been looking for a Wii for several Wiiks (everyone reading this is thinking “Oh, please don’t start with the Wii jokes, they are Wii-lly annoying”) months now, and have had no luck. I’ve called numerous stores numerous times, and they’re always sold out, and nobody knows when they’re getting any more. The other day, a guy at work, aListair (he always capitalizes the L) emailed me that the EB Games near him had a couple of consoles, and would I like for him to grab me one. Rather than asking where it was and getting off my lazy ass and going there myself, I just said sure and let him do my legwork for me. He went on his way to work, and came by my office yesterday morning with a Wii console. You da man aListair!

I set it up last night (no internet yet, maybe this weekend), and played a few games after the kids went to bed (by the time I got it set up, it was bedtime; it’s not like I waited until they were in bed). I bought Wii Play on the way home, which is $59, but comes with a free controller! Well, it turns out that a more accurate description would be that it’s a $49 controller that comes with a $10 game. The game itself is pretty good for practicing using the remote, but not much else. Wii Sports is much better — it turns out that I’m a bowling expert. Who knew? I figured out quickly that because of the way I throw it, the ball always spins to the left, so I managed to compensate for that, and did pretty well. I didn’t manage to figure out why it goes to the left in the first place, but as long as you can compensate for it, it doesn’t much matter. Hey, that’s the same as my golf game!

We also rented some games from Blockbuster — Cars and Super Paper Mario. I never managed to figure Cars out, but I thought about it later, and I think you have to turn the remote sideways. I looked at Super Paper Mario as well, but the opening sequence (telling you the story) is, as aListair put it “very very very very very very verbose”, so after a while I just went back to Wii Sports.

This morning, I read an article on how the Wii shortage “could last months”. Thanks again aListair!

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:

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).