Sunday, April 6, 2008

back to the rails

my escapades into the world of ruby and its brilliant child hpricot have been a tremendous success. turns out using hpricot was much easier than i first thought. with it, i've collected enough data to have a decent data pool in my database (all nba players (with bio info) and all nba teams). it was only after my extensive usage of ruby that i finally understand how to use rails (at least enough to get a basic website going). one shouldn't attempt to learn rails without first having a solid foundation in ruby; the way i did it, the learning curve was so steep it literally took about half a year.
the next step is to get the statistics portion of the project working. this is the real meat of my thesis, where the unified schema will hopefully come to life. i started mentally fiddling with the tables i'll need.

1. the stats table doesn't/shouldn't need a name, but rather serve as a join between a player and a statconcept item. the stat should only hold the value, dates, anything else?
2. to get statistics to be truly unique, the date field needs to be extremely accurate. it wont be hard to find two different games where kobe bryant scores 27 points.

now that i'm developing on ubuntu, the webrick server does not start the same as the windows variation. i was only able to access the site from the localhost, but after some research i found that i can bind the server to an ip mask, so binding to 0.0.0.0 allows any computer to access the server.

i've written so many scripts it isnt even funny. data doesnt just jump from espn to my database automatically. funny story, there was a point this weekend where espn was seemingly limiting bandwidth to my machine. a certain page was taking forever to load, and my scripts subsequently were failing. i accessed the same page on a different computer and it loaded instantly. hmm...