Sunday, November 29, 2009

Star Wars In Concert

I've been a Star Wars fan ever since I first saw the first movie during the summer of 1977. When Gail and I started dating in early 1992, I found that she too was a big Star Wars fan, and immediately decided to marry her. Well, maybe not that second, and that may not have been the primary reason, but it was a significant contributing factor. Consequently, our kids are now big Star Wars fans as well, so when my friend Lisa sent me a link to a stage show called Star Wars In Concert [warning: web site plays music with no warning], I was immediately interested. When I showed Gail and the boys the trailer on the web site, they were excited as well. The show was this past Thursday night at the Air Canada Centre in Toronto, and we were definitely not disappointed.

Star Wars In Concert The show is a montage of clips from all six Star Wars films on a three-storey crystal clear hi-def screen, behind a full live orchestra performing the music from the films. For some of the music from The Phantom Menace, there was also a full choir behind the orchestra. What's more, Anthony Daniels, the actor who played C-3P0 in all six films, introduced each segment, and James Earl Jones, the voice of Darth Vader, provided some voice-overs. When I read that Anthony Daniels would be narrating, I expected that he had recorded some stuff that would be part of the show, but was surprised that he was actually there. He only broke into the C-3P0 voice once, though his natural voice is similar enough anyway.

The music of Star Wars is not just pleasant sounds in the background of the movie; it is an integral part of the whole experience. The "Imperial march", Luke staring out at the twin suns of Tatooine, the Jawa theme, the slow acoustic guitar when Vader/Anakin dies, Darth Maul's haunting choir, even the cantina band songs are all so powerful, so meaningful, as part of the film experience that Star Wars without the music would be just another pretty decent sci-fi movie. My whole review of this show can be summed up in one sentence: Watching the movies on that screen with the music being performed live, right in front of you, was just unbelievable. The orchestra was amazing, and there were a couple of cameras on them as well, so we got to see close-ups of some of the performers in between movie clips. As a music fan and a sort-of musician myself, I love watching world-class musicians play, and these are some of the best. Daniels was very good with his introductions as well, even coming out at the end in a Leafs jersey with his name on the back. I'm sure he wore a Habs jersey in Montreal and a Flyers jersey in Philadelphia, but the crowd still loved it.

Gail is still kicking herself for not bringing our camera, but luckily Lisa brought hers so she and Gail took a bunch of pictures, one of which you can see above. Before the show, there were some memorabilia booths set up around the ACC, containing props from the films. We saw a Naboo backdrop next to a Queen Amidala costume, though the crowds around them were so thick that we couldn't get close enough to take a picture – and since we hadn't seen Lisa yet, all we had was my silly little camera phone. As expected, there were also little booths selling trinkets and shirts and stuff. I don't usually go for the souvenirs at these shows since they're way overpriced ($10 for a tiny little lightsaber thing that glows – you can probably also buy them at the dollar store), but we got the boys a $40 t-shirt each because we figured the show was so unique that they are unlikely to get the chance to see anything like it again. Plus the designs were cool – one is Darth Vader's head made out of musical instruments, the other is Boba Fett's head made out of musical notes and symbols.

Tickets were kind of expensive but it was a very unique show, and the boys loved it as much as we did. If you're a Star Wars fan, and you get the chance to see this, do it.

Sunday, November 22, 2009

Chrome vs. Firefox revisited

Attention Facebook readers: You might want to click the "View Original Post" link at the bottom of this note. Facebook sometimes messes up the formatting.

Back in May 2009, I wrote an article comparing the Chrome and Firefox browsers. Since then, it has been by far the most viewed page on my blog. From the day it was posted until today (almost six months), that particular article has accounted for about 80% of all pageviews on my blog. I've had days where 110 people visit my blog and 103 of them view that page and that page alone. I use mybloglog.com to track which pages are viewed the most and how people find my blog, and here's a piece of the results for one day. Note that this is a fairly typical day. I don't know why mybloglog can't collapse all of the "chrome vs firefox" entries into one.

bloglog

Anyway, after about six months of using Chrome pretty much exclusively, I decided to revisit this comparison and see how much of it is still valid. To that end, I reset my default browser back to Firefox for a week.

Note that I am comparing the "generally available" versions of Chrome (3.0.195.27) and Firefox (3.5.5), not development or beta builds.

Advantages of Chrome

  1. Chrome starts up almost instantly, while Firefox takes several seconds before it's ready to go. Both are still faster than IE for me.
  2. Chrome updates itself completely silently. Firefox tells you there's an update available and asks if you want to install it. Actually doing the install is pretty painless, but it asks you if you want to install the update when you start the browser, which is usually when you are trying to do something with it. Frequently I don't want to wait while it installs an upgrade and then restarts itself, so I end up trying to remember to do it when I'm done. I have no idea when Chrome updates itself, because it does it silently in the background and then the changes take effect the next time you shut it down and start it again.
  3. Chrome searches your bookmarks and previously visited sites extremely quickly, so when I start to type a URL, it comes up with probable matches really fast. For example, I don't have twitter.com bookmarked, but I can get there using <CTRL-L>tw<ENTER> because by the time I hit enter, Chrome has searched my previously visited sites and autocompleted "tw" to "twitter.com". Until I started using Firefox again, I did not realize how cool this feature was and how quickly I came to depend on it. I would visit a site and not bookmark it, and then the next day if I wanted to find it again, I could type whatever part of the URL I could remember into the address bar and it would just find it for me.

Advantages of Firefox

  1. Chrome still doesn't have plug-in support. If this isn't number one on the "must get this done" list for Chrome, someone needs to be fired. Yes, I know this is at least mostly working in the dev builds.
  2. When Chrome isn't going really fast, it seems to be going really really slow. I had a situation on my computer recently where everything seemed to be taking forever – compiling was taking 20-30 seconds per file (rather than the <1 it should take), and a test that was running at the same time was taking minutes rather than seconds. I looked at the task manager, and the two processes taking up the most CPU were Chrome and our stupid virus scanner that grinds my machine to a halt and IT won't let me configure it despite the fact that it prevents me from doing my job efficiently (but that's a rant for another day). I shut down Chrome, and within a few seconds everything sped up noticeably (though not as much as it should have because of the stupid virus scanner). I am going to keep an eye on this, but it may be a showstopper.
  3. Perhaps related to the previous problem - every now and again, usually when my machine is very busy, I enter a URL in the address bar, hit enter, and nothing happens. I have seen pauses of 30+ seconds before it even changes the status to "resolving whateverhost.com". Firefox doesn't have these complete blackouts, but just goes really slow in those situations. I rarely see this or the problem above (#2) at work, but it happens a lot at home – I think it may actually be related to the VPN I use.

Dead Heat

  1. When I first started using Chrome, it was quite a bit faster than Firefox, especially on javascript-heavy web sites. But when I switched back to Firefox for this comparison, I didn't notice much of a difference in speed, certainly not enough of a difference to consider it a Chrome advantage.
  2. Bookmark support has been improved in Chrome to the point where this is no longer an advantage of Firefox. Firefox supports keymarks which Chrome does not, but Chrome's searching of bookmarks is so fast this is hardly necessary, other than the magic %s searching thing that Firefox supports. XMarks support is still missing though (it's in beta).
  3. On a site with lots of Flash (i.e. games), sometimes everything seems to slow down to a crawl after 10-15 minutes or so. Sometimes it speeds up again after a while, but other times I have to just give up on the game. This happens in both Chrome and Firefox. Don't know about IE.

The Result

For now, I'm going to stick with Chrome, but as I said above, I'm going to keep an eye out for machine slowdowns and see if closing Chrome fixes them. If that continues to happen, I will have to go back to Firefox.

I kind of miss the plug-in support from Firefox, but Chrome is still pretty peppy and quite honestly, I feel like Firefox is starting to pick up the bloat that IE has had for years. Chrome still feels small and sleek.

I'm surprised that adding plug-in support is taking as long as it is, but I also understand that this basically amounts to allowing the general public to add executable code to your application on the fly. Getting this right and making it usable and flexible while remaining robust is difficult.

Wednesday, November 18, 2009

Best. Workout music. Ever.

I went for a run this morning, and my iPod played an amazing selection of music for my listening and distracting-me-from-thinking-about-the-pain-in-my-legs pleasure. It started with Alanis Morissette's Thank U, which is not a bad song, but I skipped it because at least half of my runs start with that song. It seems like the randomization of either the Nano or the Nike+ software really sucks for the first song – the first song is always one of about five, and it's mostly Thank U. The rest, however, was great:

  • Neon Crossing, Our Lady Peace
  • Load Me Up, Matthew Good Band
  • Down to the Waterline, Dire Straits
  • Coming Home, The Tea Party
  • Beautiful People, Marilyn Manson
  • Gravity, Max Webster
  • The Trooper, Iron Maiden

Beautiful People is a pretty good song, but I don't know much Marilyn Manson, so you can take them out of the equation. Other than that, each and every song is among my top 3 favourite songs by that artist.

Monday, November 16, 2009

C/C++: Five Things I Hate About You

Jeff Attwood said recently in a StackOverflow podcast that if you can't think of five things you hate about your favourite programming language, then you don't know it well enough. I started writing C code in about 1988 and C++ in about 1992, so I think I can say I'm familiar with them. I know that C and C++ are different languages, but there's enough overlap that I'm going to group them together. Here are five things I hate about C and C++.

  1. Lack of portability. Pure C or C++ code is generally portable, but we continually run into thing like "standard" libraries that aren't standard. Libraries for things like file I/O and threading can be vastly different on different platforms so if your application has to run on multiple platforms, you have to write the same code several times in slightly different ways. There are functions that are defined in a different header file on one platform than another. Preprocessor macros that have a leading underscore on one platform and not on another. There are functions that exist on one platform that don't exist – or work differently - on another. The C language has been around almost forty years, and we still have to have #defines in our code to cover stricmp on one platform and strcasecmp on another. We don't use exceptions in our code because different compilers deal with them differently, and we just started using templates because all the compilers we use finally support them in a similar enough way that they're usable. I suppose technically these are problems with the implementations rather than the language itself.
  2. Undetectable number errors. How many times have you done x-- on an unsigned type only to find that you "decremented" it from 0 to 4294967295, and everything went haywire? Doing this is completely legal and the only way to prevent it is to manually check for 0 before you decrement, and make sure you do it in a thread-safe way. PITA.
  3. Lack of memory checking. If you allocate fifty bytes and then access fifty-one of them, that's totally fine. Accessing that fifty-first byte may work, giving you random data, or it may crash. Writing that byte may work, overwriting some other variable and creating a terribly hard-to-find bug, or it may crash. Or even worse: it may overwrite some unused piece of memory, thus having no effect, most of the time (i.e. during development and testing) but then crash or overwrite memory occasionally (i.e. in customer deployments).
  4. Braces aren't required for if statements. (and while statements, and for statements) This is just asking for trouble. I've trained myself to see and fix things like this:
    if( condition )
    statement 1;
    statement 2;
    statement 3;

    and some editors and IDEs will automatically re-indent, making the problem obvious, but you can still miss them sometimes. In my code, I almost always put braces anyway, except for the occasional thing like this:
    if( condition1 ) continue;
    if( condition2 ) break;

  5. Named structures and typedefs are different. This has confused me for years. You can have a structure with a name, and also typedef it to another name, or you can typedef a structure without a name. For example, all of these are legal:

    // defines a structure called myStruct. You have to type "struct myStruct"
    // to use it
    struct myStruct {
    int a;
    int b;
    };

    // also defines a structure called myStruct, but you can use "myStruct"
    // as a type now. Or you can continue using "struct myStruct". The two
    // names do not have to be the same.
    typedef struct myStruct {
    int a;
    int b;
    } myStruct;

    // No different from the second example
    typedef struct {
    int a;
    int b;
    } myStruct;

    The second and third examples are exactly the same, though I remember having to go through a bunch of code and change typedefs of the third type to have a name after struct because the debugger (CodeWarrior, if I remember correctly) didn't understand them unless the struct had a name.

Monday, November 02, 2009

Halloween at Fern

Fern Resort is one of our favourite vacation spots. Is it as luxurious as a Carribbean all-inclusive or a Las Vegas casino resort? Well no, but the food is always great, the people are nice, there's lots to do, and most of all it's comfortable. We all know the place well enough and we feel safe enough there that we can give the kids more freedom than they're used to, which makes them happy. It also means that Gail and I have some more freedom as well. We've been there every summer but one in the last ten years, and our week at Fern is something we all look forward to all year. We also went once during the winter, which was also a lot of fun.

This past weekend we tried something new – Fern in the fall. They had a special deal on for Halloween weekend where both kids were free, and they were also discounting the prices by 10% or so, and because we've been there so often in the past, we get an "alumni" discount as well, so it ended up being quite reasonable. They also had some special Halloween things happening, including a costume contest, so Gail got quite excited about that and spent part of a couple of weeks making costumes for the four of us.

The middle of summer is obviously their busiest time, and that's when we generally go. When we were there in February a couple of years ago, we were amazed at how different it was when there were only about 70 guests instead of the usual 370 or so. This time, we arrived on Friday just in time for dinner and when we walked into the dining room, we were stunned by the number of tables set – maybe ten. We found out later that the actual count of guests for the weekend was 35. We asked how that compares to a normal Halloween weekend, and Mike the sports director said that they usually get around 100-120 people. He figures that the economic downturn is responsible for some of it, plus the fact that Halloween was on the Saturday night caused some people to stay home so they didn't miss trick-or-treating. The lack of people made things much quieter than we're used to at Fern. I think we might have been the only guests staying in the Main Inn - although that had its advantages too. We asked on arrival if one of the big suites was available and one was (I suspect that they both were), so they upgraded us. The fact that it was a suite was very nice, and while the balcony overlooking the pool would be great in the summer, we didn't spend much time (read: zero) there this time. There were a few programs that ended up being cancelled because nobody showed up, so the sports director and youth director had more idle time than they are used to. It seemed that our family and one other family were involved in the programs, but I don't know what the rest of the guests did all weekend. Other than bingo, the dance on Saturday night, and meals, we didn't see them at all.

One of the neat ideas they had was a pumpkin carving contest – there was a pumpkin on our table when we arrived, and we had all day Saturday to carve it in whatever way we wanted. They awarded three prizes: most humorous, most creative, and scariest. We brought a bunch of templates and idea books and such, but we ended up just drawing a face freehand. We alsoOur pumpkin checking out the kids menu forgot to bring all of our pumpkin carving equipment, so we had to borrow a steak knife and a couple of spoons from the kitchen. Gail had the idea of painting the pumpkin black so that the face would really glow when lit, so we brought some spray paint and after cutting out the face, we went outside and painted it on the grass (we'll have to check next August to see if there's still a black spot there). The small crowd worked to our advantage, as we won the scariest pumpkin award, which was announced at dinner on Saturday night. We were happy enough with bragging rights (though bragging rights among people you don't know aren't worth much), but the dining room manager came around and told us that our prize was a bottle of wine plus a chocolate monkey (an ice cream drink with chocolate and banana) for each of the kids. When we told them we didn't drink wine, they brought us a cocktail each – a Caesar for me (thanks for introducing me to those Jeff!) and a Smirnoff Ice for Gail.

The most popular non-food-related event was bingo, which happened a couple of times on Saturday and once on Sunday. Gail won a $5 gift shop voucher at one game, and Nicky won twice – his prizes were vouchers for Fern t-shirts.

We began brainstorming costume ideas a month or two ago, and the boys kept returning to Harry Potter. I half-jokingly said that one kid could go as Harry and one as Ron, I could be Dumbledore and Gail could be McGonagall. Gail thought about it for a minute and decided that it wouldn't be all that hard to make robes for us, so over the three weeks before Halloween, that's what she did (though she lost a week of that with a nasty cold). Saturday night after dinner we all got dressed and went over to Fireside (the building next to the Main Inn), where they had set up a haunted house / trick-or-treating area. About half of the rooms on the second floor had ghouls, goblins, or witches in them, scaring kids (and me in one case) and handing out goodies. Some of the goodies were your standard mini chocolate bars and such, but there was also some stuff from the bakery – some really good iced shortbread cookies and a big cupcake. Obviously the kids ended up with far less candy than on a typical Halloween, but they didn't seem disappointed. We were also fine with it, since we normally end up throwing out at least half of what they bring home because they forget about it by mid-November. Our wizarding family

After the trick-or-treating, they had a costume party and dance over at Mary Lou's, where Gail and I danced (I was very warm in the Dumbledore beard and hair, so I didn't dance much – and had to pull the beard down off my face to drink my beer), Nicky danced a little, and Ryan stood off to the side - he kind of wanted to dance but was just not able to pluck up enough courage to actually do it. He never actually said any of this, but I know that's how he felt because that's exactly how I would have felt when I was ten. The time came to hand out the costume award and once again, they had prizes for different categories. This time it was most creative, scariest, and overall best costume. Most creative went to "Mother Nature", a young girl who had stuck little paper butterflies and birds and (real) branches and leaves all over herself; a very clever costume. "Scariest" wasn't that scary but was also creative – a boy of about twelve who made himself into RoboCop with lots of cardboard, duct tape, and flashing lights. The award for best overall costume went to a strikingly handsome man dressed as Professor Dumbledore. (sigh) No, there wasn't another Dumbledore there, I am talking about myself. My prize was another Fern t-shirt voucher. I got the t-shirt (actually upgraded to a long-sleeved shirt) but Gail really deserves all the credit – she made my robes and hat (as well as the robes she wore), bought the hair, beard, and glasses, and even coloured my eyebrows – all I did was wear it. And as cool as my costume was, I think Gail as McGonagall was even better because she looked the part (though much younger) more than I did, and didn't hide behind a fake beard.

So we were at Fern from Friday dinner until Sunday lunch and won three t-shirts, $5, and a round of drinks. And we had great food all weekend, and stayed in the nicest suite in the place, and played some games (throwing eggs at the archery targets was particularly fun), and for all that we paid about 25% less than the normal price and the kids were free. A great weekend all around.