oai and sru gems updated

By reeset / On / In rails, ruby

In wrapping up the Libraryfind update, I’ve had to make some modifications to a few gem packages.  These are the ones updated:

  1. oai: http://rubyforge.org/projects/oai/
    Prior versions of the oai component only supported the ruby libxml gem 0.3.8-.  In order to support the newer versions of the ruby-libxml (which does better memory management), I’ve updated the oai gem that will support both the older and new ruby-libxml apis.  The primary changes are related to how it handles properties/attributes and the way that the oai provider class handles dates (to support OAI 2.0 validation).
  2. sru-ruby: http://rubyforge.org/projects/sru/
    Added libxml support.  For queries that return one or two records, the different between using REXML or Libxml as your parser will be hardly noticable.  However, when queries result in larger datasets, the difference will be measured in terms of seconds.  For example, in some tests, recordsets returning 50 records in MARCXML format could run close to 10 seconds using REXML.  On the other hand, the same search using libxml processes in 0.8 seconds.  For tools, like LibraryFind, which deal with larger datasets, this is a welcome change.



100 foods

By reeset / On / In Travel, Uncategorized

Not library related but fun, I guess.  My wife sent me a list because she wondered what kinds of crazy things on this list I could say I’ve eaten.  Some of the things on this list, I honestly don’t even know what they are.  But, I’ll play the game.  I’ve bolded the items of things that I’ve eaten in various forms.

The VGT Omnivore’s Hundred:

1. Venison: (Growing up, deer and Elk were regular things on our table.  I actually prefer it to most other meat, though it’s not something that I’ve had in a while.)
2. Nettle tea
3. Huevos rancheros: (Not my favorite.  I love eggs, but tomatos, salsa, etc. should never be on them.  It’s just wrong.  Pure, de, wrong.)
4. Steak tartare (I love raw meat — most of the time)
5. Crocodile (Actually, Alligator — bbq’d.  I actually like it — though the meat is a little salty for some reason [though, I’ve found that’s the case with most reptile meat).
6. Black pudding
7. Cheese fondue: (I prefer chocolate, but in San Jose, Kyle Banerjee and his wife took me to a nifty fondue place which was my first, and so far only experience.)
8. Carp: (I actually like to catch them.)
9. Borscht
10. Baba ghanoush: yum\
11. Calamari
12. Pho
13. PB&J sandwich
14. Aloo gobi
15. Hot dog from a street cart (I love street vendor food.  In fact, I’ve eaten some pretty interesting things from street vendors in the past and while sometimes an adventure — almost always my favorite food from my trips.)
16. Epoisses
17. Black truffle
18. Fruit wine made from something other than grapes
19. Steamed pork buns
20. Pistachio ice cream
21. Heirloom tomatoes
22. Fresh wild berries
23. Foie gras: (I’ve never eaten anything that almost made me thow up when I ate it, and then almost throw up for hours after while I suffered the after taste.)
24. Rice and beans
25. Brawn, or head cheese (It’s kindof like ham and alright if you don’t know what it is.)
26. Raw Scotch Bonnet pepper
27. Dulce de leche
28. Oysters: (I love them raw — or as close to raw as possible.)
29. Baklava
30. Bagna cauda
31. Wasabi peas
32. Clam chowder in a sourdough bowl: (Thank goodness I don’t live in New England, because I’d eat this just about every day.)
33. Salted lassi
34. Sauerkraut (As Nathan, my youngest would say — Boogusting!)
35. Root beer float
36. Cognac with a fat cigar
37. Clotted cream tea\
38. Vodka jelly/Jell-O
39. Gumbo
40. Oxtail
41. Curried goat (I’m not sure if it was curried, but it was goat.)
42. Whole insects (Honey ants and chocolate grasshoppers)
43. Phaal
44. Goat’s milk
45. Malt whisky from a bottle worth £60/$120 or more
46. Fugu (I’d love too — but I’ve never had the opportunity)
47. Chicken tikka masala
48. Eel
49. Krispy Kreme original glazed doughnut
50. Sea urchin
51. Prickly pear
52. Umeboshi
53. Abalone
54. Paneer
55. McDonald’s Big Mac Meal: (This must be for the people that have a death wish)
56. Spaetzle
57. Dirty gin martini
58. Beer above 8% ABV: yes, but I don’t like beer.
59. Poutine
60. Carob chips
61. S’mores
62. Sweetbreads (Yuk)
63. Kaolin
64. Currywurst
65. Durian
66. Frogs’ legs
67. Beignets, churros, elephant ears or funnel cake (Can you believe all of these)
68. Haggis (I’ll try anything once — thankfully, there isn’t a lot of chance that I’ll have an opportunity to have this in Corvallis)
69. Fried plantain (Not a fan favorite)
70. Chitterlings, or andouillette
71. Gazpacho
72. Caviar and blini
73. Louche absinthe
74. Gjetost, or brunost
75. Roadkill
76. Baijiu
77. Hostess Fruit Pie (Somehow, I find the thought of eating beef lard unappetizing — but I’ve had it)
78. Snail (In maple syrup — yum)
79. Lapsang souchong
80. Bellini\
81. Tom yum
82. Eggs Benedict
83. Pocky
84. Tasting menu at a three-Michelin-star restaurant.
85. Kobe beef
86. Hare
87. Goulash
88. Flowers: pansies, on salad.
89. Horse
90. Criollo chocolate
91. Spam (ewwww!)
92. Soft shell crab
93. Rose harissa
94. Catfish
95. Mole poblano
96. Bagel and lox
97. Lobster Thermidor
98. Polenta
99. Jamaican Blue Mountain coffee
100. Snake (I prefer the kind that rattles — again — the meat is kind of salty)

So that is their 100 (where is pretty euro-centric).  Were I to add to the list, I’d add a few more favorites:

1) Buffalo — lean and tasty
2) Pacific Salmon (any other salmon basically tastes like spit)
3) Fish and Chips (cod and vingar)
4) Avacodos (fresh off the tree)
5) Turtle soup
6) Sturgeon (has a very, non-fishy taste)
7) Hot dog from a baseball game

I’m sure there are others, but that’s what jumps off the top of my head.

So there you have it. Now here’s the rules:
1) Copy this list into your blog or journal, including these instructions.
2) Bold all the items you’ve eaten.
3) Cross out any items that you would never consider eating.
4) Optional extra: Post a comment here at www.verygoodtaste.co.uk linking to your results.



How Delta screwed me…again, and again, and again…..

By reeset / On / In Travel

I just got back home from without a doubt the most horrendous travel experience I’ve ever had dealing with an airline.  And to be honest, it wasn’t until this weekend that I never really realized how little help travelers have when something goes wrong.  For me, my story started back in January of this year.  Oregon State University and Penn State University had agreed to play one game at Beaver Stadium in Happy Valley.  I’ve always wanted to attend a game in a Big 10 stadium — to be in a crowd of some 100,000+ fans, so my friend and I got tickets to the game and immediately started making plans. 

I was pretty much responsible for making our arrangements — partly because I fly more and have status on the two primary airlines that fly into State College, Delta and United.  I probably fly close to 20 times a year, so I do a fair amount of travel on each one of these airlines and have never had any trouble with either of these companies.  So, I had no problem booking a flight on Delta in January for travel between Portland and State College.  My original itinerary had my flying from PDX to Cincinnati and then to State College which sounded great.  However, the problems started in June.  While I was at ALA, Delta called to inform me that their regional carrier into State College no longer would be serving that area — so they would need to rebook my flights.  Fine — so long as they could be me to State College around the same times, I was happy — and after talking to the ticketing agent, they were able to accommodate me.  At that point, I had confirmed flights on Delta a flight that would take me on Alaska Air and Northwest so at this point, I’m thinking that everything is taken care of.  I was wrong…so very, very, very wrong.

Sept.4th — travel day

My friend and I got up early Thursday morning excited that we were finally starting our trip to Penn State to see our mighty Beavers take down the Penn State Lions (oye, the game — that’s another painful story).  We got to PDX about 2 hours early and made our way to the Alaska ticket counter and entered our Delta confirmation number (the Delta ticketing agents had assured me numerous time over the past three weeks that this was all I’d need because I’d been calling them making sure everything was ok for our trip — I was just a little paranoid about traveling on so many partner airlines) — nothing.  So, we went to the ticketing agent — a wonderfully nice lady that pulled up our boarding passes and printed them out.  Just one problem — it said that a coupon from Delta was required.  Huh?  Apparently, when Delta rescheduled our flights, they didn’t let Alaska know what they were doing, I guess — so the nice lady spent close to an hour and a half with us working with Delta getting this resolved.  After a lot of back and forth, the Delta agent told her that our tickets had never been re-issued after the change — hence the problem.  They apologized for the mistake and said it was corrected.  The Alaska ticket agent was able to print out our boarding passes to Seattle and told us that we’d need to get boarding passed from Northwest at the gate.  Fine — we thanked the nice lady from Alaska, walked over to the Delta counter to get our confirmed itinerary from him (which we had and still have) and then went to quickly catch our flight to Seattle.  Again, happy that we’d arrived early and was able to get this issue fixed. 

So, we caught the flight from PDX to Seattle, arrived at the Northwest gate for the next leg of our flight and walked up to the gate agent.  Now, I don’t know what the life of a gate agent must be, because I don’t think I met a single one that was helpful throughout this trip.  Maybe it’s because they are so busy trying to get people through the doors of the planes — I’m not sure, but the Northwest gate agent in Seattle, Mandi, basically looked at our itinerary and said that it was a Delta ticket — we weren’t getting on the plane.  Huh?  We asked for a little explanation.  Apparently, within the Northwest system, there were two Delta tickets reserved for the flight.  These tickets were controlled by Delta for Delta passengers (like ourselves), but Delta never issued the tickets to Northwest.  So, while I quickly called the Delta custom support to get this worked out, Northwest promptly gave away our seats because the plane was over booked anyway.  After watching our flight fly away, stranding us in Seattle, a Northwest agent spent a little time with us to explain that it appeared that Delta never released any information to Northwest about us — and that we would need to go talk to someone at Delta to get this fixed.  At this point, I’m mad.  I also know at this point, we won’t be flying to State College.  It’s a small airport and the flights are booked solid.  But we are also stranded in Seattle.  Soooo, we leave the security area and go to the ticket counters at SeaTac to talk directly with a Delta ticketing agent.  This was around 11:30 am. 

We are able to quickly talk to a Delta ticketing agent.  Now, for as unhelpful as every gate agent was, the ticketing agents, both Delta and Northwest (yes, we talked too many) really tried to make this work for us.  What seemed to be the biggest impediment was the policies that each airline follows.  For airlines that are suppose to be merging, getting each airline to talk to the other was next to impossible.  Anyway, we talk to the Delta ticketing agent.  She punches up our ticket confirmation number and says everything looks great.  Well, if everything was great, I certainly would have been standing there talking to her.  So, I explained what had happened and we asked what she could to for us.  Well, she started looking for flights into State College and was able to offer us a flight the day after the football game.  Obviously, that wasn’t going to work for me.  So, we asked how close she could get use to State College — at which point she told us that it was Delta policy to charge for changes in flight destinations.  At which point, my friend called BS — these are tickets that we have had since Jan. 2008 and if Delta couldn’t get us to our destination, they at least had an obligation to get us as close as possible to our destination.  She started looking — the closest Delta could get us was Pittsburg, but to get there, we would have to take a red eye flight from Seattle at 10:40 pm into Atlanta and then fly from Atlanta to Pittsburg, where we would arrive around 9:30 am on Sept. 5th.  Fine — if that’s the best they could do, we’d take it.  At the same time, we asked the agent if she could confirm that our tickets home, tickets issued by Delta to fly on Northwest, were confirmed and ok.  She checked and said we were good to go.  Great — so we left the Delta counter and walked over to Northwest to confirm that indeed, when we got to State College, that indeed, we’d have a ticket back.  It was now 1 pm.

At the Northwest ticketing gate, we found the nicest lady.  We explained our plight and she agreed that it would best to make sure everything was good prior to making the trip to Pennsylvania.  Plus, we had almost 10 more hours at SeaTac before our new flight to Atlanta, so we certainly had the time now to make sure that this was all taken care of.  The gate agent started looking up our information.  Nothing.  Just like at the Northwest gate, the clowns at Delta had neglected to issue us a ticket through Northwest.  On the Delta end, everything looked peachy — unfortunately, we didn’t have any records in the Northwest system.  At this point, the nice lady could tell that we were frustrated and tired.  So she told us to go sit in the lobby and she would talk to Delta and try to get this straightened out.  A miracle — I thought.  Because when we were at the Northwest gate, I asked the Delta support to talk to the Northwest gate agent and got some asinine excuse that they don’t talk to anyone but customers.  Thanks for the help.  So, the Northwest agent disappears into the back for about an hour, and when she comes out, she’s not looking happy.  Delta apparently gave her the run around as well.  Her advice to us — call Delta support and ask to speak directly to a supervisor.  So, back we went to the Delta ticket counter.  My friend called Delta and asked for supervisor and I got in line.  My friend got Delta on the line first and got on the phone with a supervisor.  He explained the situation and the supervisor called Delta’s representative at Northwest.  Fifteen minutes later, the supervisor comes back on the phone and tells us that he’s identified the problem.  Apparently, indeed, Delta screwed the pooch and now, they can get us one seat on the flight from State College to PDX, but not a second — but that he would see what he could work out.  More silence.  Another fifteen minutes pass and the supervisor gets back on the line to tell us that we have confirmed seats, gives us a Northwest confirmation number, and tells us that the flight from State College is 20% overbooked, so arrive early.  We thanked him and then walked right back to Northwest.  This time, armed with a Northwest confirmation number, they found our itinerary and printed us out Northwest flight information — with seat numbers and everything.  This was around 4 pm. when we finally wrapped this up. 

With our new flights and Northwest itineraries in hand, we had to now make sure that the hotel in Altoona would hold our rooms (since we weren’t going to be checking in on the 4th) and make a reservation for a rental car from Pittsburg to State College.  The hotel was easy — they said we’d have to pay for the night we were going to miss, but that they’d certainly hold our room.  That was $108 down the drain.  Thank you Delta.  Then we called Alamo to change our reservation.  Our local rental for 3 days was going to cost about $120.  Now, since it was a one-way from Pittsburg to State College, the reservation would cost close to $400.  So, that’s another $280 down the drain.  Thank you Delta.  And my friend, who use to live in Pennsylvania and planned to visit his 90 year old grandma that Friday, had to call her and tell her that we wouldn’t be able to drive to see her because we were going to have to be driving from Pittsburg to State College airport (because my bags had no trouble making the trip) to pick up my luggage and then down to Altoona where we were staying.  Thank you Delta. 

Sept 5th

The flights from Seattle to Atlanta and Atlanta to Pittsburg went without a hitch.  However, we were tired.  I can sleep on a plane, but it’s not a restful sleep so by the time we reached Pittsburg, we were already tired.  However, what could we do?  We had to get to Altoona because the game was the next day.  So we went down to the Alamo rental desk and chatted with a nice guy.  He felt for us and ended up suggesting that we rent the one way from Pittsburg to State College for one day, then make a second reservation and rent a car at the State College airport locally for two.  When we did the math, we saved a little more than $50 bucks, so that’s the route that we took.  And off we went to State College.  Five hours on the road, up I-60 to I-80 to State College.  I swear, every road in Pennsylvania must be under construction right now because the drive took forever.  But we got to the airport, got my bags, got an upgraded rental and were finally set to watch the big game.  So after putting our Beaver flags on the car, we drove to Altoona and finally got a chance to get some sleep.

Sept. 6th

I’m not going to say much about the game because I’m selectively blocked those memories — but I will say that I left Penn State with two impressions.  First, the fans there are fantastic.  I’ve never felt more welcome as a visiting fan.  When we got there, everyone offered to let us tailgate with them, everyone was telling us how impressed they were with how well OSU fans traveled and everyone was thanking us for making the trip.  The stadium is impressive.  The attendance for the game was over 108,000 — and the student support was impressive.  When we went into the stadium, the 5000 orange shirts supporting our OSU Beavers was impressive.  Then, Penn State kicked off the ball and went about kicking our butts.  The final score was 45-14 — but it easily could have been 60+-14 had they wanted to run up the score.  I’ll admit, that was a very impressive Penn State team that I saw — and I wish them the best of luck the rest of the season. 

Sept. 7th

2:30 am — we’re up.  Remember, the Delta agent told us that our flight home was overbooked and we wanted to make sure that we go there in time to ensure that we claimed our seat.  Who knew how important it would be that we showed up so early.  At 4:30 am, we were first in line and tried to check in.  The machine found our confirmation number.  Great.  Knows who we are.  Great.  Then the machine tells us that we need to speak to the gate agent.  Uh, oh.  We talk to the gate agent and he pulled out the passenger list.  There we were.  So, he started typing on his computer and uh, oh — Delta still hasn’t done something.  Basically, he can see our reservation, see our Delta ticket, but something that needs to be linked between the two systems isn’t.  At which point, he tells us that we aren’t getting on the plane.  It’s over booked and unless we can get someone from Delta to fix it, we won’t be leaving State College till Monday (if at all — meaning that we may have to drive back to Pittsburg).  My friend calls Delta, talks to a supervisor and I kid you not, the supervisor tells him that it’s fine on their end, that they don’t feel that there is anything more that they can do so good luck.  I called Northwest and Thank God I did.  I got a nice Northwest agent on the phone, gave them my confirmation number and explained the situation.  She said she’d look into it and put me on hold.  5 AM — I’m getting nervous because the flight boards at 5:30 am.  Finally, she comes back and tells me that she has no idea what Delta has done to us — but that she can see that we have valid tickets so she has issued us two Northwest tickets.  I went back to the gate and asked the gentleman to look up our reservations again and he was really surprised because our reservations were completely different.  Now, they were Northwest tickets, with Northwest ticket numbers.  Finally, everything was OK.  I checked my bag, got our boarding passes for State College and our connecting flight into PDX and got out of there.  I don’t know what that Northwest customer service agent did for us — but I am really grateful to her and her willingness to fix this problem for us because Delta pretty much had been sitting on their thumbs for the past three days jerking us around.

And so now I’m home.  But I’ve learned a few things.  First, if ever I have a schedule changed like I did for this flight — I’m going to contact all airlines involved and ensure that all tickets have been reissued between the various airlines and get ticket and confirmation numbers for each airline.  You wouldn’t think you’d need to, but apparently this is the traveler’s responsibility because no one at Delta was doing this for us.  Second, I’ve learned that when you have a problem, ask to talk to the supervisor.  They were the only ones that seemed to be able to talk to another airline’s representatives.  No idea why — but that’s just how it seemed to work.  And finally, that if you buy tickets and something goes wrong — be ready to fix it yourself because the people at the airline may want to help you, but in reality — they probably can’t.  Oh, and one more thing.  I won’t be flying Delta again — at least not by choice.  At least, that’s how I feel right now.  I’ll be writing them a letter to let them know how unsatisfying this experience was — I don’t expect anything to come out of it.  I just can not believe how unhelpful this company was — and how many times they failed to make things right. 


Technorati Tags:

LibraryFind notes & stuff

By reeset / On / In LibraryFind

So, I just wanted to update folks on some LibraryFind work. is pretty much ready to go.  The only things that I’ve been waiting on are changes to two core components — the oai.gem and the sru gem.  So, I added libxml support to the sru gem (both support for the current and past libxml branches).  This has been done.  This change should allow ruby sru processing to be done much faster (especially large sets).  When I added libxml support to the oai gem, performance went up by 4-800%.  I’m expecting that parsing large datasets will see similar speed increases.  The beauty of the changes is that they should be transparent to the user.  Prior to the change, this is how you would make a search_retrieve request:

#Example search_retrieve request.
require ‘rubygems’
require ‘sru’

#An iterator for search results which allows you to do stuff like:

client = SRU::Client.new ‘http://z3950.loc.gov:7090/voyager’
for record in client.search_retrieve(‘”title=building digital libraries”‘)
   puts record

puts “\n\n”
puts “finished”

For users wanting to continue to use rexml as your processor, this syntax will still work.  For users wanting to use the libxml parser, all you need to do is add an optional parameter to the client object:

#Example search_retrieve request.
require ‘rubygems’
require ‘sru’

#An iterator for search results which allows you to do stuff like:

client = SRU::Client.new ‘http://z3950.loc.gov:7090/voyager’,:parser=>’libxml’
for record in client.search_retrieve(‘”title=building digital libraries”‘)
   puts record

puts “\n\n”
puts “finished”

That’s it.  Now, rather than returning a REXML::Document reference for each record, the program will return a LibXML::XML::Node reference. 

Internally, I removed the protected xpath processing functions and borrowed the xpath module I created for the oai gem.  Now, all xpath processing is pushed through this module, allowing the gem to use the appropriate parsing calls based on the document.class value.  Within LibraryFind, I’m adding metadata handlers to work with MARCXML and Dublin Core data.  At some point, I might migrate this code into the sru gem to include two predefined metadata handlers so that you can retrieve metadata either as the raw data object or as a formatted object.

I’ve also finished work on the oai gem.  I checked in some changes about a week ago (adding support for the current version of libxml), but will be checking in an additional update this weekend (after a little testing).  The changes add some additional unit tests, as well as corrects the oai gems providers functionality to fix the dates generated by the oai output.  The dates needed to be updated to use the utc.xmlschema format (rather than the localtime format).  This has been done and now oai data generated by the provider class is validating again.  It’s currently passing all unit tests and once I confirm it’s functionality is some real world applications here at OSU, I’ll update the code and push the changes for download. 

Once these components are downloaded, LibraryFind should will be ready to package and ship.  This will be an intermediate release, as 0.9.0 is also finished needing only formal testing.  So, once is put to bed, I’m hoping to have only about a month, month and a half between the 0.9.0 release, which will bring with it a much more interactive UI.