Stupid Ruby Problem

Like I said, I’m work­ing on get­ting my Ruby chops up to snuff. I thought it might be fun to do that by port­ing all of the code in Joseph Adler’s fan­tas­tic Base­ball Hacks from Perl to Ruby.

I’m com­ing back to this project after let­ting it go for a while, and sure enough, the prob­lem I was hav­ing when I put it down is still vex­ing me.

One script is intended to grab all of the play-by-play data from retrosheet.org. The files all have urls like this:


http://www.retrosheet.org/1957/1957al.zip

http://www.retrosheet.org/1957/1957nl.zip

http://www.retrosheet.org/1957/1957ml.zip

The snip­pet below is a sim­pli­fied ver­sion of the code I’m using to build the urls. It’s intended to print the urls of each zip file for each league from 1957 to 2006:

year = 1957
leagues = ['al', 'nl', 'ml']leagues.each do |league|
  while year <= 2006
    url = "http://www.retrosheet.org/#{year}/#{year}#{league}.zip"
    puts url
    year += 1
  end
end

How­ever, it doesn’t do that. It only gen­er­ates the urls for the AL files, and I can’t get my brain around why.

I’ll be sure to add the solu­tion when I fig­ure it out, but for now I wanted to just doc­u­ment some of the strug­gles of a Ruby n00b.

Inauspicious Beginnings

Dang. This isn’t how I was plan­ning to get things going here at the new blog. Nonethe­less, I’ve been kind of liv­ing in a hole for the last lit­tle while try­ing to get my Ruby/Rails chops in shape, and that’s taken most of my time and focus. Hope­fully I’ll have some­thing Earth-shattering to say in the next lit­tle while.

In the mean­time, I am keep­ing up with Twit­ter okay.

Will IE6 Ever Die?

The other day, my XP install prompted me to update to IE7. I’m curi­ous about whether this is hap­pen­ing to other Win­dows users out there. Does any­one else have a Win­dows box that’s forc­ing them to make the switch? What about you folks in the big shiny build­ings? Are your cor­po­rate IT over­seers deploy­ing IE7 on your work machines?

At the lum­ber­ing behe­moth of a com­pany where I’m cur­rently doing some con­tract work, all of the machines run IE6, and I can’t imag­ine that the IT group here is going to push an upgrade any time soon. Fur­ther, I don’t think it’s a stretch to say that there are scores of com­pa­nies out there, from the very big to the very small, that are sim­i­larly unlikely to upgrade any­time soon.

As you can prob­a­bly guess, the point of these queries & spec­u­la­tions is that I’m really start­ing to won­der if the web devel­op­ment com­mu­nity will ever be able to stop sup­port­ing IE6. Of course the answer has to be “yes, at some point” but when? It’s only been a year since IE7 shipped, and I’m guess­ing that there are still more folks out there using IE6 than IE7. Although I can’t find any num­bers about the IE6 vs IE7 mar­ket share, W3schools has a break­down of their site’s users that shows more peo­ple using IE6 than IE7, and if the web savvy still skew that way, it seems safe to assume that the gen­eral pop­u­la­tion does as well.

I don’t have a good answer for that ques­tion (if you do, I’m all ears), but it’s worth think­ing about. I’m all for push­ing ahead and cre­at­ing new stan­dards (CSS 3? ECMAScript 4? HTML 5? w00t!), but if there’s never going be a widely used browser that’s going to imple­ment them (to say noth­ing of imple­ment­ing them cor­rectly), then isn’t it all just navelgazing?

Of course, as I type this, I can hear one of the for­merly devout IE peo­ple near my cube explain to some­one how the Fire­fox Wed Devel­oper Tool­bar “can really make your life eas­ier.” Maybe there’s hope after all.

Post­script: The Wiki page about the his­tory of IE men­tions a rumor that a pre-alpha IE8 has been cir­cu­lat­ing on P2P net­works. That pretty much has to be false, right? I’m sure the IE team will try their darn­d­est to ship IE8 some­time before 2013, but I’m will­ing to bet they’re more focused on com­ing up with new and dif­fer­ent ways to man­gle web-standards bug-fixes than get­ting another ver­sion out the door.

Like a tiger defying the laws of gravity

It looks like I’m blog­ging again. Who knew? After a good three-year absence from the blo­gos­phere (do peo­ple still say that?), here I am again. Back in the good old days, I would gen­er­ally post about what­ever the hell I wanted. That’s still going to be the case, but this time around, I’ll try to empha­size more techie things, but you can rest assured that I’ll still be writ­ing about music, food, base­ball, and gory movies.

Onward and upward then.