Like I said, I’m working on getting my Ruby chops up to snuff. I thought it might be fun to do that by porting all of the code in Joseph Adler’s fantastic Baseball Hacks from Perl to Ruby.
I’m coming back to this project after letting it go for a while, and sure enough, the problem I was having when I put it down is still vexing 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 snippet below is a simplified version 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
However, it doesn’t do that. It only generates the urls for the AL files, and I can’t get my brain around why.
I’ll be sure to add the solution when I figure it out, but for now I wanted to just document some of the struggles of a Ruby n00b.
This entry was posted on January 9th, 2008. It was tagged as code, ruby, and has no comments.
Dang. This isn’t how I was planning to get things going here at the new blog. Nonetheless, I’ve been kind of living in a hole for the last little while trying to get my Ruby/Rails chops in shape, and that’s taken most of my time and focus. Hopefully I’ll have something Earth-shattering to say in the next little while.
In the meantime, I am keeping up with Twitter okay.
This entry was posted on December 27th, 2007. It was tagged as , and has no comments.
The other day, my XP install prompted me to update to IE7. I’m curious about whether this is happening to other Windows users out there. Does anyone else have a Windows box that’s forcing them to make the switch? What about you folks in the big shiny buildings? Are your corporate IT overseers deploying IE7 on your work machines?
At the lumbering behemoth of a company where I’m currently doing some contract work, all of the machines run IE6, and I can’t imagine that the IT group here is going to push an upgrade any time soon. Further, I don’t think it’s a stretch to say that there are scores of companies out there, from the very big to the very small, that are similarly unlikely to upgrade anytime soon.
As you can probably guess, the point of these queries & speculations is that I’m really starting to wonder if the web development community will ever be able to stop supporting 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 guessing that there are still more folks out there using IE6 than IE7. Although I can’t find any numbers about the IE6 vs IE7 market share, W3schools has a breakdown of their site’s users that shows more people using IE6 than IE7, and if the web savvy still skew that way, it seems safe to assume that the general population does as well.
I don’t have a good answer for that question (if you do, I’m all ears), but it’s worth thinking about. I’m all for pushing ahead and creating new standards (CSS 3? ECMAScript 4? HTML 5? w00t!), but if there’s never going be a widely used browser that’s going to implement them (to say nothing of implementing them correctly), then isn’t it all just navelgazing?
Of course, as I type this, I can hear one of the formerly devout IE people near my cube explain to someone how the Firefox Wed Developer Toolbar “can really make your life easier.” Maybe there’s hope after all.
Postscript: The Wiki page about the history of IE mentions a rumor that a pre-alpha IE8 has been circulating on P2P networks. That pretty much has to be false, right? I’m sure the IE team will try their darndest to ship IE8 sometime before 2013, but I’m willing to bet they’re more focused on coming up with new and different ways to mangle web-standards bug-fixes than getting another version out the door.
This entry was posted on November 16th, 2007. It was tagged as , and has no comments.
It looks like I’m blogging again. Who knew? After a good three-year absence from the blogosphere (do people still say that?), here I am again. Back in the good old days, I would generally post about whatever the hell I wanted. That’s still going to be the case, but this time around, I’ll try to emphasize more techie things, but you can rest assured that I’ll still be writing about music, food, baseball, and gory movies.
Onward and upward then.
This entry was posted on October 17th, 2007. It was tagged as , and has no comments.