A Christmas Tradition, from 1978

78_qxluiIt’s been 40 years since my Dad started sending out Christmas cards with “obscure” messages! I’ve been posting them *almost every December for the last several years, so here’s the sixth one, from 1978:

Yup, that’s me in the back. Nice hat.

Previously (*you might have missed last year’s due to me mostly ignoring this blog for more than the last year!): 1977 1976 1975 1974 1973

Taking it from the top

As has happened before, I’ve been ignoring this blog for a while; I just rebuilt the server it runs on, so I’ve cleaned up the theme, gotten rid of plugins I don’t use, etc.

I hope to post more frequently again – we’ll see how long this lasts.

Losing the meaning of your vote

My good friend b1-66er wrote this post about how he’s decided to vote. Please go read it, then compare your thinking to his, and mine – I started this as an email to him, but I’ve decided to post it here in case any of the other four of you who read this are thinking along the same lines.

Hey sir,

I read your post about why Obama has lost your vote, and I wholeheartedly agree with all of your complaints. However, you do live in a swing state, and your vote does count for something, so I’m asking you to this about this differently.

The question you’re answering with your vote isn’t “does Obama deserve another term?” but “Who would be better to run things for the next four years?,” and Obama and Romney are the only two available choices at this point.

Please set aside your (valid! correct!) feelings about Obama’s sickening and shameful performance on this issue and vote for him anyway, because the alternative is so much worse: I truly believe that Romney would take us further back to darker ages on many issues, *including* this one, but also women’s rights, gay rights, poverty and the social safety net, strategies for the economy and job creation, taxation, foreign policy, … nearly all the issues I can think of. There’s also the matter of the two Supremes likely to be appointed next term.

Then, after the election, maybe take a stronger role with one of the groups fighting the administration over Obama’s failures: possibly even less meaningful than your specific vote, I know.

But don’t think that voting for the wrong guy (or not voting at all) out of spite would have the effect you want – that seems like a great way to have your vote mean even less.

Yer pal,

RubyMine, Firefox, and Exception Backtraces

I use RubyMine and Firefox for most of my day-to-day Ruby on Rails development, and in spite of my best efforts, I sometimes get exceptions that result in the display of Ruby backtraces instead of the web page I asked for.

While the backtrace helpfully lists the places in my code (or Rails, or the Ruby libraries, etc) that we traversed on the way to the crash site, opening the file in RubyMine to see more context requires copying the path, invoking a RubyMine keyboard shortcut for open-file, and pasting. Work.

After a lot of this copy and pasting, it occurred to me to join Firefox’s ability to invoke a program for a particular URL scheme, and the command-line wrapper that RubyMine can produce to open files in a running RubyMine instance.

This gist is the result: it’s a Rails initializer that produces “mine:” links in backtraces. It starts with instructions on setting up Firefox and the RubyMine wrapper; once you’ve followed them, you’ll get links in the backtrace that’ll take you directly to the source where an exception occurred.

(Note: I’m using this while working on a Ruby 1.8.7 / Rails 2.3.4 application, and as you can see, it monkey-patches the backtrace functions in Exception; I fully expect to have to update it for newer Ruby and Rails versions – if you find that changes are needed, or have other suggestions, please let me know in a comment. Thanks!)

Quicker WEBrick startup

Despite its popularity WEBrick has gained some notoriety since the code is completely undocumented.
Wikipedia’s WEBrick page

WEBrick is the little web server in the Ruby standard library, and I’ve used it several times when I’ve needed to embed a little server in a project. I noticed a couple of problems in my latest little program: it took a few seconds to start up, and always included a “TCPServer Error: Address already in use – bind(2)” warning in its startup messages.

After watching this happen a few dozen times, I found solutions to both these annoyances, and they’re here in the hope that someone else will Google their way here: just create your server object like this:

# This fixes the slow startup
Socket.do_not_reverse_lookup = true

# Using :BindAddress to say "bind to all interfaces" fixes the address-in-use warning
server = HTTPServer.new(:Port => my_port_number, :BindAddress => "")

Running away to the circus… for a few minutes

I surprised Gina tonight with a trip to see Cirque du Soleil’s “Kooza,” which just opened in Portland. She didn’t figure it out until she saw the tent, so that’s nice: I kept throwing her off with false answers to her questions: Her: “Is this an event where I’ll have to introduce myself?” Me: “Oh, yes, everyone will.”

To cut to the chase, this was my favorite Cirque experience; I’ve seen several of their shows over the years, starting with a private performance for Apple folks in the San Francisco Civic Auditorium, sometime in the late ’80s. This time, the music was great, and the athletic performances were stellar — especially the new “Wheel of Death,” which, even with our under-the-end view, was pretty amazing.

The clowns were great, too, and Cirque’s sense of humor is always my favorite part of the show. Funny story: y’know how they pick people from the audience, and you wonder whether those people are “plants”? I now have firsthand experience that they’re not: tonight they picked me. In the five or so minutes I was up there, I got dragged around the stage, had my leg humped by one clown, the other picked a fight with me, and the ringmaster tased all three of us. (If you get picked for this, do nothing when he tases you the first couple of times. He’ll point at the other two, twitching on the stage, then tase you again – then you fall to the floor too, twitching like the others. Twitch some more when he tases your crotch.)

All in all, an incredible evening. Go see the show – it’s a lot of fun, even without me in it. Who knows – perhaps you’ll be!

Open Source Bridge: Exciting the attentions of the Ingenious

I’m reading “The Invention of Air” by Steven Johnson, which talks a lot about Joseph Priestly’s experiments with electricity, discovery of oxygen, etc, and also about the scientific community of the time: Priestly had many interactions with (and got much encouragement from) Benjamin Franklin; Thomas Jefferson is also involved in the story, but I’m not to that spot in the tale yet.

Where I am in the book (p71), there’s a quote, the last paragraph from a September 1753 letter from Franklin to botanist Peter Collinson:

These Thoughts, my dear Friend, are many of them crude and hasty, and if I were merely ambitious of acquiring some Reputation in Philosophy, I ought to keep them by me, ’till corrected and improved by Time and farther Experience. But since even short Hints and imperfect Experiments in any new Branch of Science, being communicated, have oftentimes a good Effect, in exciting the attentions of the Ingenious to the Subject, and so become the Occasion of more exact disquisitions and more compleat Discoveries, you are at Liberty to communicate this Paper to whom you please; it being of more Importance that Knowledge should increase, than that your Friend should be thought an accurate Philosopher.

(You can read the whole letter, which details Franklin’s recent researches into electricity, here — it starts on p148, ends on p153.)

I’m inspired to post this here because I happened to have just registered to attend Portland’s Open Source Bridge conference, coming up June 1-4 — the open source movement is the next Age of Enlightenment.