jump to navigation

ARIEL: A Mentor’s Mini-Review
Thursday, 24 August 2006

Posted by austin in: Ruby, comments closed

As some of you may or may not know (all three readers of my blog, I’m sure), I was the mentor of Alex Bradbury’s ARIEL project, which was submitted as “Automated Wrapper Generation for Information Extraction” and was dubbed ARIEL (A Ruby Information Extraction Library) after some discussion.

Alex was great. The program was great. The result he’s produced is great—and I’m not the only one that thinks so. Justin Baily said:

Very impressive library! I remember when you posted about this at the beginning of the summer. I took the library and pointed it at the USCCBs online version of the Bible and got some very impressive results! It was able to identify book, chapter and verse with only[…]3 sample pages[…] [ruby-talk:210002]

My biggest regret is that I have been so insanely busy that I don’t think that I’ve been able to give Alex the amount of time he deserved as a mentor. I only hope that the bits I was able to give him truly helped and didn’t just come across as koans because I was too busy to do much more than I did.

But Alex created something useful, and something that I believe he will continue to work on—ultimately I hope that he will be able to attract others to help him build on ARIEL. It’s just a very cool technology that I think will help people make sense of the static web in the transition toward a Semantic Web.

Three Paragraphs on Duck Typing
Tuesday, 22 August 2006

Posted by austin in: Ruby, comments closed

Not counting my paragraphs, of course. In the course of the thread “Static typing ain’t so bad, after all…” on ruby-talk, David Vallner and Francis Cianfrocca came up with three great paragraphs on duck typing and why it makes so much sense:

David Vallner:

David Vallner: In dynamically typed languages, the type of an object isn’t its “class” or any other predictable concept, it’s just the protocol it adheres to during its lifetime. Most such languages also make no presumption that this protocol, or the behaviour of an object remains the same during its lifetime – which makes compile-time checks rather pointless.

Of course, you rarely use even this aspect of dynamic typing – in fact, I can’t come up with a single noncontrived example for it, these things just don’t occur in daily coding. But dynamic languages sure a heck faster to type, and the fact the compiler rarely bitches at all is very, very appealing to people that know what they’re doing most of the time.

Francis Cianfrocca:

That was a perceptive comment. The fact that there are so few true cases of objects that metamorphose in flight also accounts for the observed “magical” behavior that “duck-typing” seems to “just work” almost all of the time. (By magical, I mean unexpected for people like me with too many years of experience programming in statically-typed languages.) The intention of a well thought-out code path is generally easy to express without typing all the types along the way. It doesn’t break often, and when it does break, it doesn’t make a big mess.

This matters because when I write an API, I write it with an interface (protocol, to use David’s term) in mind. That interface might have the name of a class, say File. But if someone gives me something that acts like the portions of File that I use,(and I use sensible alternatives when possible, such as #<< instead of #write, then someone can give me something entirely different and I won’t care. But I don’t restrict the consumer of my library to only using File, and I handle it as best as I can because I expect that things will work the way that they should.

Holiday Rubyist Meet Wrapup
Monday, 7 August 2006

Posted by austin in: Ruby, comments closed

So while I was in Europe, I gave a talk to the London Ruby Users Group for which I ran out of time (I was just warming up!). Someone, and I knew I should have pulled out a pad and written down his name, was kind enough to buy me a Scotch after my talk when the group went to the pub. Thank you again, kind sir. I met with Hagen in Potsdam, and after some changed schedules that caused me to miss the München.rb meeting, I ended up meeting with Urban Hafner. I had really wanted to meet with Armin Roehrl while in München, but the aforementioned scheduling mishaps and a lack of reliable Internet access prevented that from happening. Maybe next time, because I do want to go back to München. I didn’t get to see quite enough.

Well, on the afternoon of the 27th of July for my only day in Amsteram, I checked my email and I had an email from the indomitable Erik Veenstra of RubyScript2Exe fame. The scheduling was a bit tight, but we ate at what I consider the best pannekoeken (a Dutch pancake that is the size of a small pizza and often topped similarly) restaurant in all of Amsterdam, the Pancake House. Like the other European Rubyists we met, Erik is a pleasant person with a great sense of humour and well-informed. My fiancée was charmed by all of them that she met (Hagen, Urban, and Erik) and we had a lot of fun. Anne-Marie and I were supposed to meet her sister at 9:30, but it was closer to 9:45 when we managed it because we were enjoying our discussion with Erik so much. Thanks for emailing, Erik. It was a lovely evening. Sorry it’s taken so long to write about it.

And a general thank-you to the European Rubyists that I met. I really enjoyed meeting you guys and hearing how you use Ruby. For those whom I didn’t meet, I plan on going back to Europe in a couple of years (I want to do a North American trip for holidays next year) and I hope to meet you then. Otherwise, I hope to see you at this October’s RubyConf.