Archive for January, 2007

Nostalgia: Time Bandits

“What is it that you like about this movie?” Denise asked, and I believe that she meant that in the most loving way.

She was patiently waiting as I finished watching the last few minutes of “Time Bandits”. After having it sit on my Amazon.com wish list for several years with no hope of rescue, I finally went out and bought myself a copy. Had to use up that Madison Square Mall gift card somehow.

I was seriously into this movie as a pre-teen, and I’ve wanted to own a copy of it for awhile now. It’s a little disturbing to see the movie’s somewhat dark ending (no spoilers!) and have no memory of finding it disturbing when I was a kid. But other than that, it was a lot of fun to see it again and see how much of I still remember after 20+ years. I guess “Time Bandits” was a kind of gateway to Monty Python for me, because I don’t remember knowing about the Pythons before seeing this movie. It was also the first Terry Gilliam movie I ever saw, and although he’s one of my favorite directors now, I don’t think that the fact that he directed “Time Bandits” meant anything to me at the time.

If you didn’t see it then, well, you’re probably not going to get much out of it now. I’ll readily admit that a big part of my enjoyment is the whole nostalgia factor. But if you saw this movie as a kid and loved it like I did, do yourself a favor and rent it sometime.

Mini-Review: The Queen

We just got back from seeing the 4:30 show of “The Queen” at the Carmike Cinemas (which, by the way, seems to have become increasingly ghetto since the Rave opened up in South Huntsville last year.) So that makes two Oscar-nominated films that I’ve seen, which I believe is two more than last year.

We thought for awhile that we were going to be the youngest people there, but a group of teenaged girls showed up at the last minute during previews.

I had not read anything about the movie beforehand and so I didn’t know what to expect, but I highly recommend it, even if you aren’t particularly interested in the comings and goings of the British Royal Family. The movie covers the week following the death of Princess Diana and presents what I thought was a very sympathetic portrayal of the Queen. Helen Mirren deserves her Oscar nomination, but I’m surprised that there hasn’t been more buzz about Michael Sheen, the fellow who played Prime Minister Tony Blair. They (whoever they are) also did a great job of mixing news footage from the time with the action in the movie — it was really seamless and made the whole thing more believable. Of course, a lot of the private conversations that the movie shows have to have been fictionalized, and so you wonder how accurate it really is.

Anyways. Good movie, go see it if you can.

Don’t Know Much About History

The other night our oldest niece, Julien, called to ask Denise what she thought were the ten most important historical events in her (Julien’s) lifetime. Julien was born in 1992 — how can she be almost fifteen years old? — so you’d think we’d be able to come up with ten significant world events for that period of time, but it was kinda difficult to do on the spot. Here’s what Denise came up with (in no particular order):

  1. 9/11
  2. The Oklahoma City Bombing
  3. War in Iraq
  4. Election and re-election of George W. Bush
  5. Execution of Saddam Hussein
  6. Death of Mother Teresa (she is dead, right?)
  7. Death of Princess Diana
  8. Hurricane Katrina
  9. Space Shuttle Discovery explodes shortly after takeoff
  10. The Y2K panic

Yes, we now know that it was the Columbia that blew up, not Discovery. It’s hard to keep those names straight. And the list is pretty US-centric, and some of those events are clearly more historically significant than others. What do you think you would have added to the list? No fair looking up sources on the web — see what you can come up with off the top of your head.

Fun side note: Julien told us that her father’s Y2K preparations consisted of going to the grocery store and buying a can of beans and a can of carrots, and then coming home and filling up one of the bathtubs with water. He was angry because he felt like none of his other family members were taking the threat as seriously as he was.

The Battle Against Comment Spam

I’ve just installed James McKay’s Comment Timeout plugin for WordPress in an effort to thwart the occasional spammer that slips past Akismet. I’m a little concerned because a few comments on James’ blog suggest that it may not be working properly for some WordPress and/or PHP versions, but I guess I’ll just wait and see.

ActiveState Announces Free Komodo Editor

ActiveState has just announced the release of Komodo Edit 4.0, a free editor based on their Komodo IDE. I have been a little disappointed that ActiveState never chose to provide a commercially-supported version of Ruby (similar to their ActivePerl and ActivePython products), but I am glad that they added Ruby support to Komodo. David Ascher and his team at ActiveState are a really smart bunch of guys and I believe this is going to fill a significant gap in the Ruby development world (namely, the lack of a decent cross-platform IDE).

I’m still in the honeymoon phase with TextMate and so I’m not really looking for a new editor at the moment, but I’m going to download Komodo Edit anyways to take a look. Also note that Komodo Edit is available for Mac OS X, Linux and Windows.

Live Comment Previews Now Enabled

At the request of loyal reader Dan, I went in search of an option to turn on previews for comments. It looks like I have a few options to choose from, so the first one I’ve decided to experiment with is the “Live Comment Preview” plug-in. This one required almost no configuration (which is great), but it wasn’t immediately obvious to me that it was in fact working (which is bad). It turns out that the “live preview” doesn’t actually appear until you start typing in the comment text area. Once you do start typing, however, the preview area magically appears immediately below the comment text box and updates itself as you type. It’s a nifty little trick, but I’m going to need to get used to it. Or, rather, my readers will.

Now I just need to figure out how to correct the placement of the “Add your comment” button on Safari.

Knives Ahead

I really need to start carrying a digital camera around with me, or at least learn how to download pictures from my cell phone to my computer. For example, if I had been more prepared, I could have captured for you an image of the sign outside the Billiard Street Cafe, advertising their upcoming “Huntsville Hottys” competition. ( I didn’t stop to inform them that the proper spelling would be “Hotties.”)

But I am specifically thinking of a sign we saw on the side of the road on Highway 280, down near my in-laws’ house in Sterrett. It was a small white sign, low to the ground, and the sign-maker had used black spray paint against a stencil to apply the ominous message: “KNIVES AHEAD.” Man, I wish I’d taken a picture.

Keyword Arguments in FXRuby

FXRuby 1.6.5 (coming real soon now) will introduce preliminary, experimental support for using keyword-style arguments in FXRuby method calls. The initial implementation of this feature will only work for class constructors (i.e. the “new” class methods), but the intent is to gradually extend this feature so that it covers all FXRuby methods.

What this means in practice is that for calls to methods that have one or more optional arguments, you can replace all of the optional arguments with a hash that sets only the values for which the default isn’t appropriate. So, for example, consider a typical call to FXMainWindow.new:

main = FXMainWindow.new(app, "Title Goes Here", nil, nil,                         DECOR_ALL, 0, 0, 800, 600)
In this case, the programmer wants to set the initial window width and height to 800 and 600. In order to do that (with the current release of FXRuby), however, she’s required to fill in all of the optional arguments in between the window title string and the width and height values. As anyone who’s worked with FXRuby for any amount of time will tell you, it’s easy to accidentally leave out one of those intermediate arguments and it can be difficult to figure out what’s wrong afterwards.

Now consider how this method call could be written using the new keyword arguments support. First, the programmer would need to require the keyword arguments library:

require 'fox16/kwargs'
Then she would look up the API documentation for the FXMainWindow#initialize method (e.g. here) and see that the names of the width and height arguments are, in fact, “width” and “height”. Armed with that information, she would be able to rewrite the previous code as:
main = FXMainWindow.new(app,                         "Title Goes Here",                         :width => 800,                         :height => 600)
Here, the programmer has omitted the intermediate optional arguments (thus accepting their default values) and specified only the width and height values. This code is obviously a lot more readable and maintainable.

It is important to observe the difference between required and optional arguments when using this feature. If the API documentation for a particular method doesn’t indicate that an argument has a default value, then it is by definition not an optional argument. So one could not write the previous example as, e.g.

main = FXMainWindow.new(app,                         :width => 800,                         :title => "Title Goes Here",                         :height => 600)
This example is incorrect because the title argument is required, and it must be the second argument in the call. Obviously, this means that the optional arguments in a method call (if they’re specified) will always follow all of the required arguments.

Finally, note that the keyword arguments feature has been implemented so that it’s backwards-compatible with the current positional arguments (or it’s intended to be, at any rate). What that means is that you can immediately start making use of this feature in your existing code, even if you don’t have time to update all of the method calls to use keyword arguments.

I expect to release FXRuby 1.6.5 with this feature very soon, possibly as soon as this weekend. As stated in the opening paragraph, the initial release of this feature will only work for class constructors (i.e. the “new” class methods), but the intent is to gradually extend this feature so that it covers all FXRuby methods. All feedback/questions/comments are welcome and appreciated.

Everybody Say Hoe

I’ve been meaning to check out Hoe since it was first announced and I finally got around to it today. Hoe is, basically, a library of useful Rake tasks. It’s especially useful for projects hosted on RubyForge, as it provides tasks for uploading your project package and gem files to RubyForge, making announcements, and so forth.

There are at least a few gotchas that you need to be aware of, especially if you’re trying to integrate Hoe into an existing project (as I did). The first thing I discovered is that Hoe expects to find a file named Manifest.txt in the top-level directory. This file should (as you might expect) contain a listing of all the files to be included in the package or gem for a release.

Another gotcha is that Hoe tasks want to have complete control over the doc and pkg directories. For example, the clean task will remove these directories (in addition to any other files that you specify in the clean_globs parameter). This was a problem in my case since I already have a doc directory. There’s at least one change request on file to give developers more control over these directory names, and I hope that the Hoe powers-that-be will take that under consideration.

I haven’t had an opportunity to try out some of the more release-oriented features, like automatically posting announcement messages and uploading packages to RubyForge, so I’ll reserve comment on them for the moment. These are definitely tedious tasks to perform manually, and I’m anxious to see how well Hoe does at automating them when it’s time for a new FXRuby release.

To sum up, if you’re starting out a new project from scratch and haven’t yet committed yourself to a particular directory structure, I can strongly recommend that you take advantage of Hoe to simplify things. If on the other hand you have an existing project that could benefit from some extra automation, I think Hoe will be beneficial to you as well — just be aware that there are some sharp edges that you’ll want to look out for.

Mini-Review: Eleanor Rigby

I somehow missed Eleanor Rigby when it was first published, which is unfortunate because it meant that the last two Douglas Coupland novels I read were Hey, Nostradamus! (published just prior to Eleanor Rigby) and JPod (published a couple of years after). I didn’t enjoy either one very much, and I was worried that Mr. Coupland had lost whatever it was that I liked about his writing. I just didn’t care about the characters in either of those books, like I had cared about Daniel and his friends from Microserfs, or the characters in Girlfriend in a Coma (whose names I can’t recall at the moment,) or even the bizarre cast of All Families Are Psychotic (bless their hearts!).

This book is about Liz Dunn, a lady who’s lonely, overweight and more or less resigned to a nothing-special kind of life. Things start to change for Liz when Jeremy, the son she placed for adoption when she was a teenager, unexpectedly re-enters her life as an adult. To tell you much more than that would ruin the surprise for you, and after all, this is a mini-review so I’m honor-bound to keep things brief. Suffice it to say that it’s an easy and enjoyable read, and one I’d recommend to someone who hasn’t read any of Douglas Coupland’s novels before. So there, go read it.