3: Dave Rolsky, author of DateTime and tons of other modules
What does a vegan music composer do when he wants to send e-mails?
Dave Rolsky is one of the most prolific CPAN authors. He created DateTime, Log::Dispatch and tons of other modules. We talked about how he started with Perl and what he has been doing lately. We also discussed his work and the Moose training he runs at YAPC::NA. (19:19 min)
Transcript(work in process)
0:00 Hi, this is Gabor Szabo speaking. This is the Perl Maven TV show again, and with me is Dave Rolsky, who is the author of DateTime and tons of other modules on CPAN. He is also the author of the, or of at least a large part of the Moose tutorial and documentation. Hi Dave. How are you?
Hi. I am good how about you?
I am fine. Still a bit nervous about these tv interviews, but hopefully I get over all this.
What could go wrong with technology? Hey, we're programmers, we know it always works, it's perfect, so...
I can tell you in one of my previous interviews, the aspect ratio of the camera of the other side was changing, so you can see that his head was going up and down. Very interesting.
Yeah. Anyway. So. 1:00 Welcome to the show, and I would like to start with you from the beginning, because you have these tons of modules on CPAN, but where do we start? How did you get involved in Perl?
1:13 OK, sure. So, back in '95/'96, I think, I was in grad school for music composition, that's what my degree is in, and I was, at the time... I had recently met Matt Mackall, who people might recognize as the author of Mercurial, and he's also done Linux development, so I knew him back, way back then, actually through a local vegetarian group, and I wanted to write a web app for the composers at my school to list all of our pieces, so that performers could find what we had written and may be sort, and you know, "I want to find something that includes clarinet" or something like that, 2:00 and so I had done a little programming when I was a kid -- I got my first computer when I was young, 5 or 6, so I asked Matt, "what should I learn to do this? What's the right language?" So he pointed me at Perl. 2:15 I think I got a Perl book sometime when I was in grad school. This app never materialized. It was a good idea, but it didn't happen, like many projects, right? So this should be familiar to everybody 2:24 watching this: "Projects You Never Did". That got me started looking at Perl, which is very ironic, since Matt is totally a Python guy these days, anyway.
2:35 Back then everyone was Perl.
2:37 Exactly, exactly. When I graduated from the masters program, I was kind of burned out on the whole academic thing, and so I decided to not get a Ph.D., so I end up getting a job in support at a local insurance company in St. Paul. I lived in Minneapolis, Minnesota. 3:00 And there was kind of downtime. When things weren't crashing, there was free time, because we weren't like a support line for Dell, it was just for the company, so if things there were working, we had time. So I kind of taught myself more programming there, and I was actually working on another project that I never finished, which was a web UI for MajorDomo, if anybody remembers MajorDomo.
People still use it.
Oh wow. Oh my God. OK. So I learned more of Perl there, and then eventually after about 15 months of that job, I got my first programming job, this was during the first dot-com boom, when anybody with a, I'll be polite, a butt, could get a seat, because that's all you needed was a butt to put in the seat to be a programmer, 3:50 so I had no idea what the heck I was doing, but I managed to get a programming job. And it was a Perl place, and so that was kind of where it all started. And actually, that job I met Ken Williams, who is the person who introduced me to Mason, and we eventually wrote the Mason book together, and he introduced me to more of the Perl community stuff, 4:10 pushed me to put stuff on CPAN, told me about YAPC, things like that. So that's where it really got started.
4:16 Great. So you started, you started to learn Perl, you had this, you were involved in a lot of projects, right? I mean, if you look at the CPAN directory, then you see all kinds of diverse things.
4:33 Yeah, I've done... I think the first thing I uploaded was something that's kind of a predecessor to Log::Dispatch. It was like a logging module I had written for the company I was working at, and I got permission to release it, and it was really terrible, but I uploaded that, and then 4:49 I think I wrote, I actually wrote a small bug tracking system for our support team, and I had done my own templating system, I think for that, I don't know, this was so long ago. And then Ken was like "You should look at Mason". So then I started using Mason, and then I started contributing to Mason, 5:05 So, I mean, for some of the things I worked on its projects that other people have started, probably most notably Mason and Moose, where I got excited about the project, and, you know, 5:19 if it doesn't work the way I want it, then patches welcome, and I am kind of a sucker for that, so I end up doing the patches, and then working on docs, and all of these other things, 5:29 and then for other stuff, I mean I have lots of stuff I have uploaded to CPAN that I don't think anybody has ever used, including me. There is stuff that is up there that is just experimental, or that's long abandoned. 5:39 so even though I have tons of CPAN modules, I suspect maybe, I don't know, 25% of them, 35% of them see any use, but some of them are used pretty heavily. So it's kinda...
5:50 Yeah, I think I mean, it's like a trademark. If I know that you wrote it, then I know that then it's "it's OK". Maybe I shouldn't trust everything that you wrote.
5:59 (laugh) I sure wouldn't trust everything! I'm embarrassed by my old code. I look at Log::Dispatch, which is one of the earliest ones, and I know lots of people use it, and I still use it, but whenever I have to hack on it, I'm like "Ugh, not this again".
Oh, you don't like it anymore.
Someday I'll 6:13 [garbled] to use Moo or something.
6:17 OK. But would you for.. if you had already mentioned Moo and would you help somebody if he wanted to rewrite it in Moo or start improving it and step by step. It's not like from scratch.
6:33 Because I think that would be crazy. Probably it would be better, I don't know, class by class to turn it to Moo?
6:43 Yeah. It really wouldn't be hard. Log::Dispatch, in particular, is really not much code. It's a pretty simple module. So the big things I want to do for that are just kind of clean it up, possibly use Moo, 6:54 and also to split it up into separate distros. Right now its kind of an ugly distro where it ships all these output modules, like for Apache logs 7:04 whose using mod_perl anymore? I'm not, so I don't need it. It has a syslog output and four different ways to send email, and these should all be separate modules. 7:12 Cause right now you install it and it doesn't have any of the prereqs declared, 'cause otherwise I'd need to declare tons of prereqs, and it would be a mess. 7:21 So splitting up into different distros would be a nice thing to do too. 7:26 and we could [garbled].
7:26 [garbled] 7:28 Sorry?
7:30 It would just make it easier to manage, I think.
7:32 Yeah. Yeah, probably. So actually, I didn't think about it earlier, but this could be a 7:39 way to introduce new programmers, or people who are not new to programming, maybe, but new to Perl and would like to have some project 7:49 and they think, well, "what can we do?", and here is a module that is heavily used, probably, I know I use it, and probably a lot of other people use it, 8:00 and can be refactored to something more modern.
8:04 Yeah, definitely, and it's reasonably amenable to that since each subclass, each output class is pretty small, doesn't do much, you could convert them one at a time. I think that's definitely a reasonable project.
8:17 That's interesting. So, what are you working these days?
8:21 For paid work, or free for software stuff?
8:25 I don't know, start with free software?
8:28 Not too much. The last couple of years have been, I just have a lot of stuff going on in my life. 8:38 Some health problems for me and my wife, which have been distracting, and also I am doing a lot of activism related to animal advocacy 8:47, so last year, the group I work with, we did a big veg-fest in the Twin Cities, and I was kind of the lead organizer for that, so I spent a lot of time on that. And now we're doing it again 8:58, and I'm still the lead organizer. So, you know, things like that can be distracting. It's kind of like putting on a YAPC, basically, in terms of amount of work, to give people a sense of perspective. 9:08 Probably the biggest thing I've done recently, let's see, well, there's that module, I don't know if people have seen, called Courriel, which is a terrible pronunciation 9:16, which is the French word, official French word for email, that France uses. But I just picked it because the Email:: name space was already taken, and it's kind of an attempt to improve on the email 9:27 Email::Mime modules, which I don't like the API of much, and just try to give it a more modern, easy to use API 9:35. So, we're using that at work, and it seems to work pretty well. I think other people are using it, so that's something. There's definitely work to be done on that. 9:41 I've been working on some tools related to calling Postgres command line programs. It's the Pg::CLI distro, which actually is 8:52 turned out to be something we need a lot at work as well. We're trying to move to Postgres and for managing databases 9:59. And then I am working on something that I hope, I'm working on it slowly, very slowly, that I hope will eventually replaces Moose's built-in type system, but also be usable for Moo, and really be available standalone. It's called Specio, or actually I think it 10:15 totally I should say Specio, but I don't know how to pronounce Latin. It's kind of a standalone type system. 10:24 I think those some of the most recent things. I don't even remember. What have I done on CPAN? Who knows?
And you mentioned this event you lead-organized, right? Is there any programming involved in that?
Not too much. I hate to admit it. You know what programming there is? Working on Wordpress, and tweaking Wordpress templates, and writing PHP code, which just - it's unpleasant but necessary. Wordpress is 10:53, uh, usable. It works pretty well for what we're doing, which is a small CMS with a little bit of blogging. It's a shame there's no comparable Perl project that would 11:07 really do what we want, but writing a Perl project just to run our web site is probably out of the scope of putting on a veg-fest. [garbled] 11:19 There's sometimes little programs to do data analysis and stuff like that. I'm definitely one of the more geeky activists I know. I try to use my programming wherever I can.
11:29 The point is that, myself, I think, almost all of the programming I've done is for other programmers. It's not from the real world. It's not solving the real problems, at least not directly.
11:43 That's definitely what I put on CPAN, I think. It's like libraries for other people to use in their programming.
11:49 Yeah. Most of the CPAN is there for that, but I think it's much more interesting -- it's probably a totally different thing if you can go and solve some real world problem and use the tools that you have. That's why I was interested in that. 12:15 OK. That's your open source. What's you business or work thing?
12:20 So I work for a company called MaxMind. It's a pretty small company, I can't remember how many people right now, 15, 18. If people have heard of the GeoIP database, we produce that. And we also have a transaction fraud detection service that's built on top of that. 12:40 and GeoIP is available both as downloadable databases and web services. So those are kind of our two main things: the GeoIP stuff and then the fraud detection. 12:49 And so I work for them. We have, I think, 5 developers working on our various products. Yeah, that's what I do full time. It's pretty good. I like working there. We get to release free software. We use tons of free software internally. So yeah, I enjoy it.
13:09 Yeah, I used this module. I'd still like to use more of it, I think. But if I remember correctly, only part of the database can be downloaded freely, at least, right? Like more generic information.
13:25 There's a couple free downloads, which are kind of a subset of the full data, and then there's more stuff you can pay for to subscribe to, and then there's even more stuff if you want to subscribe to the web service. So there's kind of three tiers, basically.
13:43 But you say that this company is using Perl mostly, right?
13:46 Oh yeah. I don't know what percentage. The vast majority of our code is in Perl. We have a little bit of C code and C++ code for some of the things we needed to make fast, but yeah, the vast majority is. All of the back end stuff is basically, all the web server stuff, most of the database generation, is in Perl.
14:09 Are they located in where you live, or do you work remotely?
14:15 Pretty much the whole dev team is remote. Even the people who are at the office, there's only a couple of them, so they still have to effectively be remote. The company is located in Waltham, Massachusetts. But yeah, the whole dev team is remote. One person who is on my team besides me people might know is Olaf Alders, who is one of the guys behind metacpan, so we hired him recently. He's been great to work with. It's definitely a real Perl shop.
14:44 Interesting. So now, there is the Moose things.
14:53 Moo? Did you say Moo or Moose?
14:55 Moose. Moose. What is the Moose class? You're going to run training at YAPC. Who is it for?
15:13 Good question. The class I'm doing is Intro to Moose, and it's basically for people who already know perl -- it's not an Intro to Perl-type class -- and hopefully, at least, have some basic familiarity with object orientation principles, because I'm not going to really cover that too much either. But really, its if you want to learn how Moose works. You've seen it in other people's code, you've heard about it, you want to start using it for your stuff, I will teach you all the Moose principles, all the features it has. It's a very interactive class, so what I do is I give a lecture section, that will last 20-40 minutes, and then there is a series of exercises that the students do, and the exercises are written. You write some code, and I've written tests for your code. And you've run my test suite against your code, and once your test suite passes, you know you've done the exercise right. It tries to give you a lot of feedback in the test about what's not done yet. 16:21 I've given the class many times before. Students really seem to like that format of how the exercises work. I think it's good, because it forces you -- it's one thing to listen to me talk, but it's much more useful to be forced to actually use the things that I'm talking about.
16:37 Yeah. To do the exercises is definitely a good thing here.
16:41 I'll also mention Steven Little's class -- maybe you'll interview him too -- he's doing an advanced Moose class the next day, which will go more into depth on some of the Moose features, and also cover maybe a bit more of how to use Moose well, how to use certain features appropriately, how to mix features together, whereas my class is more of like here's the basics of what you can do, and not get too far into here's how to do it really optimally. I think the classes will compliment each other nicely, so if people want to take both I think that [garbled].
17:15 Ok, that's great. So thank you for the interview. Would you like to say some call to action or whatever?
17:25 Call to action?
17:27 How people can get involved in Perl, or your stuff, helping your stuff?
17:34 If they want to get involved in Perl, I think the Perl community really spends a lot of time on IRC, so, if you join one of the channels on irc.perl.org, that's a good way to get involved. If you're interested in Moose, the #moose channel is quite active, and you can get help with Moose, both Moose and Moo are discussed on that channel, so that's a great way, if you want to get involved. Anything Moose related, that's the place to go. 18:06 If people want to help with some of my modules, there are a lot of bug reports, sadly, for them in rt.cpan.org, so that's always a good place to start if you want to fix some bugs. I'm more than happy to look at patches. I will warn people, sometimes I'm kind of slow to respond. I tend to have a lot of stuff going on. I felt guilty about it, but it's not that I'm ignoring you. And feel free to poke me. If you send a path and I haven't looked at it in a couple weeks, if you nag me politely, (politely, that's the key), if you nag me politely, I will respond, because then I'll feel guilty. 18:40 So, absolutely feel free to do that. You can also private message me on IRC. I'm on IRC as autarch.
18:48 Don't worry, we'll put it somewhere written down. That's a bit easier.
OK. Sounds good. And email is fine too, but if you have a bug report, send it to rt.cpan.org.
18:58 That's the best. Including with tests. [garbled], right? And a patch.
19:01 That's always, nothing to encourage action than tests and patches, yes.
19:08 OK. Thank you very much. This was Dave Rolsky and Gabor Szabo on the Perl Maven tv show.
19:16 Alright. Thank you.
19:17 Thank you.
19:19 So are we all done?
- House Absolute(ly) Pointless, Dave,s blog.
- House Absolute Consulting
- Ken Williams, Mason, Mason book
- Mercurial VCS
- Matt Mackall
- IRC Check the #moose channel. Dave is known as autarch on IRC.
- Bug reports in RT
- Compassionate Action for Animals
- Twin Cities Veg Fest where Dave is the lead organizer.
Dave works for MaxMind, a Perl shop that provides GeoIP databases, web services and fraud detection. Dave works with Olaf Alders, one of the people behind MetaCPAN.
- Dave Rolsky on CPAN
- Courriel, a modern email parsing and building library.
- Pg::CLI for calling PostgreSQL command line programs.
- Specio is an attempt to replace the built-in type system for Moose, and to provide something that works with Moo as well as stand-alone.
Moose training at YAPC::NA 2013