Perl 1, RMagick 0

May 29th, 2009

Easy fix for bug with some uploaded files disappearing under Rails 2.0.x

May 29th, 2009

I thought I posted this, but when spinning up a new server and trying to recall how to tweak the setting, I couldn’t find it, so here we go again (maybe).

I had a problem in my workflow application for Gigantic News Co. where files uploaded via HTTP POST would sometimes just disappear. As in, the client could log a 200 response all day long but the data would just vanish on the server.

Turns out it’s due to a bug that, according to my reading of this note and this one, crops up when the total size of the POSTed data is an exact multiple of 10240 bytes.

At any rate, I wasn’t imagining things - the files really were disappearing.

It’s due to an inappropriate evaluation of whether the remaining buffer size is 0 bytes - usually it won’t be, but if your data was an exact multiple of 10240 bytes, and you process 10240 bytes out of the buffer at a time, on your last pass, the remainder will in fact be 0.

So, the easy fix is to find this file or its equivalent on your system:

/usr/local/lib/ruby/gems/1.8/gems/actionpack-2.0.2/lib/action_controller/request.rb

and then make sure this line is commented out (put the # symbol in front of it as you see below):

#break if buf.size == 0

Odd Coincidences

May 17th, 2009

In high school, I lusted after Ingrid.  Well, after her car, actually - a Saab 900 Turbo that would go much, much faster than my poor old Volvo 245, though she wasn’t as aggressive stupid a driver as I, so I could give her a run for her money.  Ingrid lived just up the street, and memories of Ingrid, her Saab 900, and our races to school have a fond place in my heart.

Yesterday, I noticed a 1989 Saab 900 Turbo convertible on Kingman Boulevard near my house with a “For Sale” sign in it - at a bargain price of $1,500.  I remember thinking to myself “Wow, that would be fun, but I need a 20 year old Saab like I need a hole in my head”.   A very nice looking car, to be sure, but still two decades old with half a zillion miles on it, not to mention being chock-full of two-decade-old Swedish parts.  Today, with various activities like biking, dog walking, and Adrienne’s bike ride, I passed by it at least three more times.

While reading the New York Times tonight I ran across the obituary for Robert Sinclair.  Mr. Sinclair was responsible for introducing the Saab 900 Turbo to the North American market in the 1980s.

I’m on Twitter now

April 16th, 2009

http://twitter.com/Capncavedan

The latest addition to the stable

April 16th, 2009

I’ve been reading a bit about fixed gear bikes, and looking at some pretty cool photos at the Fixed Gear Gallery, and I want to give it a try.

About two weeks ago I picked up a Fuji “Special Road Racer” found on Craigslist.  I probably overpaid (I usually do, I guess) at $80 but I got a bike that is fairly original, rust-free save for some small chipped spots in the paint, clean and completely rideable.

I think the Craigslist ad said it was an ‘84 - but some further research shows it is definitely a 1973, likely built in August of that year.  This is a scan of a page from the 1973 Fuji product catalog.  My bike is red, has cottered crank arms and a cheap vinyl saddle, but is otherwise a dead ringer for the bike in the photo, down to the style and placement of the striped sticker on the seat tube.

Further evidence of the age is provided by a “Doug’s Bike World” sticker on the frame - Doug’s Bike World was sold in 1975 and became just Bike World (they’re still in business under that name).

I’ve ridden it around the neighborhood a couple of times … mostly to remind myself of two things: 1, how bad 35 year old brakes are, and 2, why I fell in love with Shimano indexed finger shifters the first time I used them.

The bike has a fairly thorough stripdown in its immediate future - in fact, I removed the chain, derailleurs & cables, shifters, and bottom bracket last night.  The front wheel is pretty straight but the rear has a nice sideways hop I need to correct, and the brakes need cleaning, lubing, and new shoes.

Beyond that, the crankarms are worn, the chainrings are bashed up a bit, and the pedals are, well, original, meaning they’re shot, too.  But that’s mostly all OK as I have a shiny set of Shimano RSX crankarms and chainrings to use, if I can just find the right bottom bracket.

So, first things first - it may be a singlespeed (as opposed to a fixed gear) for a while since I can try that out with no investment in, or alteration of, the rear wheel.  The seat post is about 8 inches long, so not long enough to get the height I need - definitely will want to improve that situation.  Brakes and chain need some cash devoted to them, along with aforementioned bottom bracket.  But I should be able to have it on the road in its first iteration very soon.
But enough talk - here are some photos.

The complete bike:

dsc_0162.jpg

Suicide shifters:

dsc_0181.jpg

Nitto stem and handlebar (36 cm wide!):

dsc_0171.jpg

Old drivetrain (crankset likely not original per catalog specs):
dsc_0185.jpg

Doug’s Bike World sticker (sold in 1975):

dsc_0168.jpg

More evidence Macs are more expensive mantra is a falsehood

February 5th, 2009

Today I got a quote for a Windows XP license for use in a corporate environment, and experienced a bit of sticker shock at nearly $330.

I haven’t paid much attention to the various flavors or Windows lately, what with the Business Ultimate, Media Center, Business Basic, Home Sucky Basic, Home Functional, Home Cool, Home Ultimate, Gamer, etc., multiplied by 2 for new vs. upgrade options.  I just know that XP works well enough on basic hardware and people know how to use it, so that’s what we’ve been buying.

Well, it turns out with recent advances in the XP death march, a Vista Business license now comes in at nearly $300 and “software assurance” surcharge to allow use of XP instead adds nearly $50.

Wow.

Corporate Mac OS X licensing is still sitting at about $100 per seat regardless of what hardware you want to run it on or what cool features you want to use (or don’t want to use).

So you may be able to get a cheap-o Dell for $440 (I know because they keep emailing me) vs. a $600 Mac Mini, but the difference might just be made up with the first OS you need to buy.

“I, Barack Hussein Obama, do solemnly swear …”

January 20th, 2009

01.20.09 is here.

Unless you’ve had your head in the sand for, oh, the past 3 years, you know that today is a turning point in the modern era - our first black man inaugurated as president.  And - I don’t mean to be crass, far from it - he’s not even a black man, he’s biracial … biracial people having historically been treated as outcasts even among (and by) the outcast.

Many older people in the news have been quoted recently saying something along the lines of “I didn’t think I’d see it in my lifetime” … I’m 34, and in the last few years I’d been thinking maybe I wouldn’t see it.  The USA can be a depressing place sometimes … for the past 8 years, for example.  Hell, we elected two Bushes for three terms … that does not speak highly of our critical decision-making skills.

Obama’s speech today was inspiring and moving in a way the past several presidents have not been.  I’m old enough to remember Clinton’s victories and contrast them with the Bush I fiasco and even with the Gipper, but also to remember the cigar and Monica’s dress and the deep shame of all that.  Looking back, there is a reason that the last inaugural clips routinely played anywhere are from JFK in 1961 - the rest of them were utterly boring and uninspiring.  Obama’s call to service and responsible worldly citizenship, on the other hand, was inspiring in a way I haven’t felt inspired by a political leader.

01.20.09 is here.  At long last.  Hallelujah.

Race circuit age group winner … me. Seriously.

January 20th, 2009

Jim stopped by the house on Saturday to harass me for not showing up for the Capital Striders training run, and to give me a $20 gift card for winning the Capital Striders race circuit.

No, really!  I thought he was kidding at first, too.

Then I had to ask what the heck the race circuit actually was.

Turns out the local running club sponsors several local races throughout the year (I knew that), and if you are a club member, they keep track of your finishes and assign points (I did not know that).  The list of races and other info is here with final standings available as a PDF; I completed 6 of the 8 races and did pretty well by my standards in those.

Incredibly, improbably, for a former 260-lb man who snorted at the idea of running (but who is now hopelessly addicted), I am the 30-34 year old circuit winner for 2008.  (It’s OK; I can’t stop laughing about it either). Jim’s reaction was the same as mine - how did I win and he didn’t, since he’s just a wee bit faster?  I  have absolutely no earthly ideaReally.  Perhaps he missed a race I managed to finish.

Anyway, judging from the number of points scored in the other age ranges, I’ll have my work cut out for me to defend my title in 2009 and later, but for now, that’s Mister Circuit Race Winner to you.  :)

Blogger, blogger, where you been so long?

January 20th, 2009

With apologies to Eric Clapton, it’s been a while since I blogged regularly.

Not there is nothing going on — on the contrary, I’m the father of two young kids, so there is always plenty going on!  I feel like in 2008, especially the second half, I’ve gone off track a little bit, both personally and professionally.  I’ve put a little bit of weight back on after working so hard to lose it in 2006/2007, and I’m not enjoying my work as much.  I’m also not taking the time I should to stay in touch with friends the way I should (you know who you are).

I’m not much for New Year’s resolutions, especially three weeks after the fact, but I’m resolving to do better, starting now.

And blog a little bit more, too.

It was so cold in Iowa today that …

December 15th, 2008

Three things of note.  All related to bike commuting, too.  A healthy -1 F at departure time (7:30 AM)

- my left eye froze open on the way in this morning

- my rear brake cable stopped sliding

- the freewheel on my Trek stopped freewheeling at two intersections on the way in