Taking it from the top, yet again

This blog has been offline for several months; I rebuilt my server, and have been spending more time coding than writing.

I know I’ve said it before, but I hope to post more frequently again – we’ll see how long it lasts this time.

Posted in Geekery, Meta | Leave a comment

A Christmas Tradition, from 1979

79_yuwepContinuing the tradition started four years ago, here’s my Dad’s seventh “obscure” Christmas card, from 1979. I “got” this one in 30 seconds.

Previously: 1978 1977 1976 1975 1974 1973

Posted in General | Leave a comment

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

Posted in General | Leave a comment

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.

Posted in Meta | Leave a comment

A Christmas Tradition, from 1977

77_xrugnContinuing the tradition started four years ago, here’s my Dad’s fifth “obscure” Christmas card, from 1977:

Previously: 1976 1975 1974 1973

Posted in General | Leave a comment

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,
…stearno

Posted in General | 1 Comment

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

Posted in General | Leave a comment

A Christmas Tradition, from 1976

76_pimruContinuing the tradition started three years ago, here’s my Dad’s fourth “obscure” Christmas card, from 1976:

(The small image is a little blurry – click on it for the full-size image.)

Previously: 1975 1974 1973

Posted in General | Leave a comment

A Christmas Tradition, from 1975

75_yowwuContinuing the tradition started two years ago, here’s my Dad’s third “obscure” Christmas card, from 1975:

Previously: 1974 1973

Posted in General | Leave a comment

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:

Posted in Geekery | Leave a comment