The Changelog: Software Development, Open Source - Ruby 1.9, Nokogiri, Tender Lovemaking (Interview)

Episode Date: January 10, 2011

Wynn caught up with Aaron Patterson, aka @tenderlove, to talk about Ruby 1.9, Nokogiri, and muscle cars....

Transcript
Discussion (0)
Starting point is 00:00:00 Welcome to the changelog episode 0.4.4. I'm Adam Stachowiak. And I'm Winn Netherland. This is the changelog. We cover what's fresh and new in the world of open source. If you found us on iTunes, we're also on the web at thechangelog.com. We're also up on GitHub. Hey, thegithub.com slash explore. You'll find some training repos, some feature repos from our blog, as well as the audio podcasts. If you're on Twitter, follow Change Log Show. And our new Twitter handle, Change Log Jobs.
Starting point is 00:00:38 And I'm Adam Stack. And I'm Penguin, P-E-N-G-W-Y-N-N. Talked to Aaron Patterson this week, a.k.a. Tinderlove. Yeah, Tinderlovemaking.com. Did you guys talk about Tinder lovemaking? No, not in that context. We talked about committing to RubyCore, which he's a Ruby committer. His mini gems.
Starting point is 00:00:58 He's got quite the repo list out on the GitHub. And the rubycommitters.org that he's currently crowdsourcing for a design help to list all of the committers to the ruby language wow very cool sounds like fun hey you want to get buzzed at work i don't know maybe not talking about alcohol or even caffeine we're talking about buzzed.com drop the e before adding the d your city real time they're looking for go developers javascript cappuccino, Cocoa, and even PHP. And if you'd like us to feature your job on the show ahead, go to thechangelog.com slash jobs to get started.
Starting point is 00:01:31 When posting, select advertise on the changelog and we'll take care of the rest. If you're a job seeker or someone who's interested in jobs that relate to open source, we'll be posting interesting GitHub jobs that embrace open source to our new Twitter handle, changelogjobs. Special thanks to Kevin Miller, aka KevM, on Twitter for his great feedback. We really appreciate it. Let's talk to James Edward Gray about the upcoming Red Dirt RubyConf in April. Let's do it.
Starting point is 00:01:57 This week's show is sponsored by Red Dirt RubyConf, the second annual Ruby conference in Oklahoma City. Joined today by one of the organizers, James Edward Gray II. James, why don't you tell us a little bit about the conference? Render is our attempt to do Ruby conference programming in unusual ways that people have never seen it done before. So one thing we did last year and we're doing again this year is to divide the conference into pre-selected topics that we think are currently interesting to people. And this year's topics will be Ruby implementations, Rails APIs and extensions, cloud services, and JavaScript. Who's keynoting? We will have Aaron Patterson from AT&T Interactive and Dr. Nick from Engine Yard.
Starting point is 00:02:49 The conference is upcoming April 20th through the 22nd. Where can they go to find more information? The renderrubyconf.com. Be sure and check it out. We're chatting today with Aaron Patterson, aka Tenderlove on GitHub and other social networks. So Aaron, for those outside the Ruby community, why don't you introduce yourself? My name is Aaron Patterson. I go by Tender Love online pretty much everywhere. I work on many different Ruby projects. Probably I'm most famous for one that I work on with Mike D'Alessio called NokuGiri,
Starting point is 00:03:37 which is an XML and HTML parsing library. But I have a myriad of other projects too. Cool. So Tender Love, where did that come from? Um, that, so it came from my blog, um, tender love making.com. And, uh, basically the way I got that is I was hanging out with, um, my girlfriends, and they were talking about, you know. Girlfriends, plural? Friends that are women. Okay, okay.
Starting point is 00:04:18 And they were talking about, oh, what's the grossest thing a guy can ever say to you? And my one friend was like, oh, if he says, I want to make tender love to you, that would be the grossest. So I registered the domain name. I had to. I was laughing so hard. I registered the domain name and then sent it to her the next day. Well, the next question that I wanted to ask, you know, the very first time that I saw you on Twitter or GitHub was, is that your real hair? Yes. Can we edit this part out? we have to do i have to say this as with all our segments want to judge the entertainment value of it okay so so um uh that is up to the viewer to decide
Starting point is 00:05:18 but it's your own line persona nonetheless right right yes well it fits very nicely with um it seems like your taste in music you had a tweet this weekend that was uh hot linking yes to uh to hot-blooded i guess exactly absolutely cool we're getting into the ruby so nokagogiri is probably what you're most famous for. You also have Mechanize and some others out there. But you're most recently, I guess in October, you joined the RubyCore team, right? Yeah, October 2009, a little over a year ago. You know, and I read that timestamp. I can't believe it's 2011 already. So, yeah, it's been over a year now. So what's it like being a Ruby committer? Oh, it's – I mean, it's all right. It's more – I don't know.
Starting point is 00:06:14 It's probably more strict than any other project I've worked on. I mean, it's definitely the biggest open source project I've worked on before. So I don't know it's got it's own challenges compared to the other projects I work on for sure so that leads me to rubycommitters.org so here's how I think this went down you know you wanted to
Starting point is 00:06:39 tell the ladies that you're a ruby committer and they're like what's that and there's just no page to demonstrate your rub prowess, right? No, no, not at all. I came up with this because Yugui, she is the branch manager for Ruby 1.9.2. She maintains a list of all of the Ruby core committers. But apparently, like, in Japan,
Starting point is 00:07:12 it's not legal to hotlink images. And so she couldn't make a page that listed all the Ruby core committers. And I don't know, I'm honestly, I'm not sure about the legality here in the United States, but I figure if I get any cease and desist, I can just take it down. Right.
Starting point is 00:07:34 So I decided, I decided we should put together a website for it at least. Yeah. I mean, especially for folks that are so critical to getting everybody's favorite language out the door with relative speed, you know, I think that especially for folks that are so critical to getting everybody's favorite language out the door with relative speed. I think that deserves their own page. So a little light on the CSS I'm seeing.
Starting point is 00:07:53 I understand there's some sort of contest going on to style this thing. Yeah, yeah. So basically what the deal is is I might be able to code okay, but I can't style myself out of a wet paper bag. So I decided to put up the most, just give it the most basic markup possible. And then I wanted to run a contest basically to just get people excited about it and get people to you know submit designs and stuff and so far it's been i mean i've only had the contest up for a day and i've already got you know a handful of really awesome entries so what'd you build it with um it is i i am lazy and building the app with rails was very easy so i just did it so how long have you been slinging ruby um i started programming ruby in uh 2005
Starting point is 00:09:00 i think yeah around 2005 is when I started programming Ruby. My first, I just did it as a hobby at first, though. My first professional experience was probably shoot 2006 or 2007, something like that. So how did you get into the Ruby language via Rails like most of us or other avenues? Well, actually, the way I started out with it was – so I used to be a Perl programmer. No. And yes, yes, I did. And I loved being a Perl programmer.
Starting point is 00:09:39 It was really fun. I liked dynamic languages. And then I was basically forced to become a Java programmer. So I was a pro programmer before the first dot-com bubble. And the bubble collapsed. And basically it was like, okay, you need to become a Java programmer or go find a new job. So I was like, all right, need to become a Java programmer or, you know, go find a new job. So I was like, all right, I'll become a Java programmer. But I really missed, I really missed, um, dynamic languages while I was a Java programmer. And I kept waiting for Perl six and kept waiting and waiting and it didn't come well then it hadn't come and i learned about ruby and i was like this this is exactly what i was waiting for and just started programming ruby little a little
Starting point is 00:10:33 later i learned about rails so i i guess i was not introduced to ruby via rails nokagiri i think is one of those that the first time I saw it, it was just as a dependency for almost every other gem that I was installing at the time. Why don't you give folks some background on what this gem does? Sure, sure. Nokogiri is a library
Starting point is 00:10:58 for parsing XML and HTML. It's pretty fast. It's now three years old um it's built on top of libxml2 um i don't know i i can give you more history about it i don't know what were you building at the time uh you need to scrape some stats off of a fantasy football site or something like that yeah no i i was basically what what happened was is you know i was maintaining i was maintaining a mechanized gem so this actually this all leads back to um how i learned ruby pretty much is when i started learning ruby i decided to start porting libraries from Perl over to Ruby.
Starting point is 00:11:48 And one of the things that I used a lot in Perl was Mechanize. And I found somebody had already written a Mechanize gem. But I found tons of bugs in it. And that eventually just led to me taking over the jam. Unfortunately, back then, the backend for Mechanize used REXML. REXML is the XML library that ships with Ruby. It's a pure Ruby XML parsing library. But lots of people complained that that was really slow. So eventually I switched the backend to HB per cot by y and that worked that was working
Starting point is 00:12:29 really well but uh i started getting i started getting bugs people were reporting bugs against mechanize and the bugs ended up being parser bugs in h per cot and i couldn't like i had a really hard time fixing the bugs in h per cot so I ended up just submitting test cases, failing test cases and stuff. And unfortunately, those didn't get taken care of, and people kept complaining to me about the bugs. So I started taking a look at libxml2 because it contains an HTML parser. And I found that actually libxml2's HTML parser did the right thing where all these people were reporting bugs. And that's how I started working on Nokogiri. So for the uninitiated, Mechanize is pretty much if you have a website, you have an API type of setup?
Starting point is 00:13:19 Yeah, yeah. It's basically a library where if you have a website and you need an API for the website, you can use Mechanize. So it's really good for – Mechanize is really good for, let's say you have mainly like password-protected websites or some sort of website where you have to fill out forms and do navigation, things like that. So moving from Perl to Ruby, you mentioned one of the ways that you learned Ruby was to port libraries from Perl. And I think that happens in every community. It happens now with Node.js. You see a lot of guys coming from other communities, and there's, you know, a hole in the library that needs to be filled. And so they start porting their knowledge from other languages.
Starting point is 00:14:03 And sometimes that fits, and sometimes it doesn't. What differences between not just the syntax but also the culture of Perl to Ruby did you find? Well, honestly, I found testing in Ruby to be much easier than it was in Perl. I mean, I've been out of the Perl community for really a long time, so I don't know what it's in Pearl. I mean, I've been out of the Pearl community for really a long time, so I don't know what it's like today. But back then, you know,
Starting point is 00:14:32 testing was not really as encouraged as it is in the Ruby community. And now it's like a rite of passage. You're not a Ruby developer unless you fit in your own test library, right? Pretty much, yeah. What's your favorite? Right now, my favorite now is Minitest, actually.
Starting point is 00:14:54 That is my favorite testing library. Why so? Well, it's very fast. It's very fast. It's very flexible. And also I work with the author, so whenever I run into problems, I can just be like, hey, help. What's your favorite feature or two from 192? Oh, boy. My favorite feature is the speed um i i don't know i mean i guess i i really like 192 i really like 192 because of the speed obviously but then also kind of selfishly i like it because there's a couple libraries in that ship with 192 that i wrote so i like using i like using my own software. Which are those?
Starting point is 00:15:51 I wrote Psyche, which is a new YAML parsing library. And then I wrote Fiddle, which is a wrapper around libffi. So tell the listeners about Texticle. Texticle was a stupid hack that I did. And a very stupid hack that I did did and apparently people seem to use it um all it is is a rapper it's got such a fun name yeah i guess i don't know i'm kind of embarrassed about the name now a guy named tenderlove creates a library called texticle what's that yeah what what is the world coming to it's what all it is is a wrapper around um postgres's t-search apis so postgres postgres ships with um full text search on and um i was building the i was building the Nokugiri documentation website and
Starting point is 00:16:46 I wanted to put it on Heroku and I wanted people to be able to search my documentation and I found that Heroku uses Postgres for their databases on the back end and I found
Starting point is 00:17:02 that I could just use Postgres' full text search capabilities. And I wasn't too happy with the existing T-Search plugins. So I wrote my own called Textical, and it has a very similar interface to Thinking Sphinx or something. So that's all it is it's just it's i don't know i probably wrote it in like a few hours it is a very easy hack so where does tender love apply his skills for hire these days um i work for at&t interactive
Starting point is 00:17:41 um they make yellowpages.com. So that's got to be like an enthralling Thanksgiving conversation. So, Mom, I'm coding the phone book. Well, that's not actually what I do. That's not actually what I do for them. But it is difficult to explain my job. So what I do for AT&T Interactive is I work on Rails all day for them, basically.
Starting point is 00:18:08 I am an open source developer for AT&T Interactive. So do you find yourself having to contribute to or having the privilege to commit to Ruby as part of your day job, or is this just something you do on the side? No, this is my day job. So you're going to be keynoting at red dirt ruby conf coming up i guess in april yes i am picked a topic yet
Starting point is 00:18:31 no i have not do you have any do you have any suggestions how i uh just gave up and learned to love ruby uh yeah i should talk about something like that yeah i'm not i'm not the art of t Tinder lovemaking. I think that's what everybody wants to know. I should do that. That would be funny. Yeah, I don't know what to talk about. Honestly, it takes me forever to come up with talks.
Starting point is 00:19:02 I work a lot on the talks I give. So I don't know, believe me, I've been thinking about it every day. So, so do you know James Edward Gray personally? Um, personally, I guess I've met him. I've met him. How many times have you installed faster CSV? I have no idea more times than I can count. You guys are pretty tight. Yeah, exactly. Yes. Do you find it in the Ruby community?
Starting point is 00:19:33 Maybe you can shed some light on this if you've been around longer than I have. I think I joined the community in 2006, late 2006 or so. But a lot of times, you know, someone says a name of a Ruby dev and I'm like, I don't think I know them. And then they start rattling off the list of gems. Hey, I know that guy. Oh yeah. Yeah. That happens to me all the time. Absolutely. So do people approach you as the Noku Giri guy? Yeah. Either Noku Giri guy or tender love, I think, but that's probably unique to me because um nobody has a nick like that so is your family aware of your online persona i mean it wouldn't your number like if you ever did your own
Starting point is 00:20:14 consulting shop wouldn't your number have to be a 900 number um probably you can make money off people you know calling you otherwise what would be toll-free? I think so, yeah. I don't think my family knows about my online persona. If they do know, then I don't know that they know. What kind of car do you drive? I don't drive. I work at home. I just totally see you driving around in an El Camino.
Starting point is 00:20:45 Oh, I would at home. I just totally see you driving around in like an El Camino. Oh, I would love to. Either an El Camino or probably my dream car would be like an IROC Z or a Firebird with T-tops. T-tops. So what are you working on these days? What's got you excited that you just want to play with well right now right now um i've been mainly focusing on um speeding up rails uh reducing trying to refactor active record mostly um i'm not sure if that's it's it's a lot of yak shaving i i'm excited i have ideas in mind for what it will be in the future.
Starting point is 00:21:25 But, you know, right now on a day-to-day basis, it's not actually super exciting. Once I get it to be where I want it to be, then I think it'll be very exciting. Performance or syntax changes? A little bit of both. Mainly right now, I mean, mainly right now it's performance but um really what i'm really what my goals are is i want to keep i want to keep api and syntax pretty much the same but my goal is that as i refactor um as i refactor under the hood and improve the design under the hood that um new features will just fall into place right like the the new features or better syntax or whatever
Starting point is 00:22:07 will be a side effect of better architecture under the hood. So a lot of innovation went into Errol and the latest active record in Rails 3. Played with NoSQL much? Are you still a relational sort of dude? Yeah, I dabble with NoSQL. I play with NoSQL. One of my coworkers is really into graph databases and graph technology.
Starting point is 00:22:34 And so I do a lot of work with him, and it's pretty interesting. He mainly works in Java, but with things like Neo4j and graph stores rather than document stores. Old Cogity programmers used to put SQL right there in the presentation layer. That's the way it was, and we liked it. But we've got all these newfangled wrappers and indirection now for SQL. Do you think that's important for young developers to give them more of a safety scissors than a razor blade? I don't know. I think it's important.
Starting point is 00:23:11 It's important. In my opinion, it's important that people understand SQL. Some of the things that concern me are that I understand that it's nice to have a higher level wrapper, like better APIs to generate these SQL statements. But at the end of the day, that's pretty much all you're doing is generating these SQL statements that go to your database. And if you don't understand how those work, probably you can't leverage the top end as well. I would like to see people get less afraid of SQL and understand it more. I was looking at your commits,
Starting point is 00:23:52 and they're all Errol for the last, as far as the eye can see, so seeing if there's somewhere else to go with what you've been working on. Let's see, what else have I been working on? Well, I can tell you what I'm doing with Errol. ActiveRecord, currently Active Record does a lot of string generation in the backend. The problem with that, the problem with that is
Starting point is 00:24:11 one of, well, there's a few problems with that. Like one of the problems is performance. So what's happening is like, sometimes you'll have to look up, you know, it's, it's creating a, it's creating a raw string that it's just going to send a chunk of SQL that it's going to eventually concatenate together and then send to the database. But the problem is, every time you make these chunks of SQL, you'll have to go look up the database connection in order to do quoting. And looking up the database connection incurs cost, right? So basically what I'm trying to do is defer that database connection lookup until the very last possible minute so that we only have to look up the database connection once. So you gather together all the things that you want to turn into a SQL statement,
Starting point is 00:25:10 and then we just use one connection to quote all of them and then send them off to the database. So recently, that's really what I've been focusing on. So as a gem developer, and especially a developer of a very popular gem in Nokogiri, where are we in the adoption of Ruby 1.9 and production at work, but not all of our applications use 1.9. I can tell you that I'm getting a lot more, not necessarily bug reports, but support questions. And whenever people ask me for support, I say, well, what's your version number? And I can tell you that more frequently I'm getting people who are asking questions on 1.9. So adoption is definitely picking up a lot more than 1.9.1 for sure. Recently this weekend, and I need to look up the name, but the gentleman that managed the Ruby install for Debian
Starting point is 00:26:27 basically said he was no longer going to do it. Yeah, Lucas. Lucas, what's your take on Ruby installs on Unix platforms and Linux platforms as opposed to RVM and some of the other install mechanisms? Well, I don't really use RVM, but it's not because I have a problem with RVM at all. It's mainly just because of like, since I am a Ruby developer, I spent a lot of time compiling and running out of subversion. So that's just my use case case and it's a very like tiny you know tiny use case but as far
Starting point is 00:27:09 as packaging is concerned like the problem that happened here in this case is that um the debian release um the way that they do releases or the way that they release packages is just different than the way we do it on RubyCore. And the Debian folks came to us and said, you need to do your releases this way. And we said, no, we do it the way we want to do it. And so I don't know. It just depends on your opinion. It seems like Lucas also had a hang-up with a lot of the, I guess, mailing lists are still Japanese, even though we've got a worldwide adoption of Ruby now. I mean, do you have any problems keeping up to speed with the language?
Starting point is 00:28:02 I mean, I'm assuming you don't speak Japanese, but that may be presumptuous. I do speak Japanese, actually. Do you? Yes. The thing is, it's kind of interesting, because I'm on the Japanese list, too. I watch the Japanese list, and I also watch the English list.
Starting point is 00:28:22 And, I don't know, it's, there is no truth to rumors about you know decisions being made on the Japanese list that nobody knows about I mean the thing is like most of the time most of the times the conversations that I read on the Japanese list are very like I've got a bug with blah, blah, blah. You know, very mundane, mundane emails. Most of the difficult decisions are made on the English list. I think the problem is that just Japanese to Westerners is very inaccessible, right?
Starting point is 00:29:01 Like, you look at the language and you're like, oh, crap. I have no idea what's going on. So I think it's more just fear maybe or something. So being able to speak Japanese, did that have any, did you learn it after you picked up Ruby or vice versa? Um, I learned it. Well, I learned it after I picked up Ruby. Um, I, I decided to learn it because I wanted to be able to communicate better with the, um, the Rubyists in Japan. Like I knew, I knew it came from Japan. Um, I knew that, you know, there was, there was all
Starting point is 00:29:44 this documentation. I was all this documentation. I found all this documentation in Japanese, and I was just like, I wish I could read this. So I decided to start learning it. So then I'm taking you've attended RubyKaigi? Yeah, several times. Three times, I think I've been. And how's it compared to RubyConf? Well, it's kind of funny. Last year they said that, I think this is very true, that RubyKaigi isn't actually a Ruby conference.
Starting point is 00:30:10 It's a C conference disguised as a Ruby conference. I can see that. There are a lot more hacks. I see a lot more hacks on the vm um it's not you know there you see a lot more rails presentations here in the u.s at rubyconf not so much there um but i don't know i really enjoy both conferences a lot i really do so then we'll have to get your impression of Red Dirt RubyConf. Will this be your first one? Yes, it will be my first one.
Starting point is 00:30:50 Ever been to Oklahoma City at all? No, but I hear that there is good barbecue. Excellent barbecue. I am looking forward to that. Play your cards right. Might even have a tornado or two. Nice dust storm. I would enjoy that too.
Starting point is 00:31:08 Well, at least watching as long as I can do it from the comfort of indoors. Yeah. Oklahoma city has got a nice tech scene for, uh, for a Midwestern town and outside of Silicon Valley or a major population center. But, uh, Oklahoma city is growing and has its own, I guess, NBA team now. Oh, really? I did not know that. Did not know that. So it should be fun times.
Starting point is 00:31:31 Red Dirt RubyConf is in April, April 21st through the 23rd. So you mentioned Perl and Ruby. Any other languages that you've picked up or want to pick up? Lately I have been doing a lot of Scheme, but I am very interested in Haskell, too. So I think that'll probably be the next
Starting point is 00:31:54 language I'm going to play with after I get done with my Scheme bender. How's that? There you go. So Haskell, so CoffeeScript appeal to you at all? I think it's interesting, but I haven't programmed in it that much. I've been hooked on it lately.
Starting point is 00:32:15 It seems like every JavaScript project I've picked up that I'm coding on by myself has been a CoffeeScript joint. Yeah, it looks interesting. It looks like it would be a lot more fun to write than JavaScript. Who in the Ruby community would you want to pair program with? I would love to pair with... I'm trying to think of somebody I haven't paired with before that I would love to pair with. Probably I would love to pair with Jim Wyrick. That'd be a nice pair.
Starting point is 00:32:37 Yes, I think so. Maker of Rake for those that might not know. Jim would be an excellent person to pair with. That's what you need to do is start up a promiscuous pairing service at Tinder lovemaking where people can pay to pair programming with you. Yeah. Yeah. I remember what was it? I think like, was it rails conf some conference I went to where it was like you get to pair with, you know, Some conference I went to where it was like you get to pair with a famous person or something like that.
Starting point is 00:33:08 And I really wanted to enter because Jim was one of the people you could pair with. But I guess I missed the entry deadline or something. Cool. Well, let us know what topic you choose for Red Dirt Ruby Gump. We'll see you in Oklahoma City in April. All right. Thank you. Thank you. See it in my eyes
Starting point is 00:33:47 So how could I forget when I found myself for the first time Safe in your arms As the dark passion shines

There aren't comments yet for this episode. Click on any sentence in the transcript to leave a comment.