Интервью /

Interview with Olaf Alders (December 2014)

How and when did you learn to program?

For some reason when I was in elementary school, I took a very introductory computer course at the public library. That was my first hands-on programming experience.

I first properly learned to program while in high school. Our class worked in Waterloo BASIC on a network of Commodore 64s. My family didn't have a computer at home, so I didn't apply my skills outside of school. It was fun, but I don't think I ever suspected I'd write code for a living.

In university I started out in science program. My lone computer course was in Fortran 77. I hated it. I eventually switched from Science to the Humanities. That's where I got back into computers and picked up on Perl.

What editor do you use?

For a few years now, I've been using Vim. I'm not a power user, but I get by. https://github.com/oalders/dot-files/blob/master/vim/vimrc. I've happily used various GUI editors over the years, but after a junior programmer at a previous job showed me a few vim tricks, I was hooked.

When and how have you been introduced to Perl?

I was introduced to Perl while in University. I was studying Greek and Latin and created a web site for the Classics Club. I ended up writing a hit counter cgi script for the web site. That was fun, so then I built a service based on that counter script and emailed a bunch of friends to tell them about it. Word got out and eventually I had thousands of users. It got to the point where I had to start charging money to cover my hosting costs. Soon I had a proper business on my hands and the whole thing was written in Perl.

What are other programming languages you enjoy working with?

I did a fair bit of Objective-C when writing iCPAN. I dabble a bit in shell scripts and JavaScript when I need to. I've just started reading a book on Go.

What do you think is the strongest Perl advantage?

I don't know if I have a strong argument about what makes Perl better or worse than other languages, but for me it's a comfortable fit. I like the way I can express myself with it.

I'd also have to say that I really like the people of Perl. I've had really great experiences getting help when I've needed it. I've made some good friends in the "community" and it's a comfortable place for me to be. YAPC::NA is always a lot of fun. I've also had the chance to be at the QA Hackathons in Paris and Lyon and I'm planning to attend the 2015 hackathon in Berlin. When I'm able to attend these events, they're real highlights for me.

What do you think is the most important feature of the languages of the future?

I'm no language designer, but as there are more and more portable computing devices, I'd say the languages which make it easy to run embedded software will have a real advantage.

How was MetaCPAN started, what was your role?

It's kind of a roundabout story. At some point I wanted to teach myself how write an iPhone app. I thought of having a copy of CPAN docs on your phone because I like browsing random modules. I was commuting to work on the subway and there was no cellular signal underground, so I couldn't explore CPAN while on the move. I convinced a friend to work with me on this app.

My focus was on extracting the Pod from a minicpan and inserting it into an SQLite db. As I dug deeper and deeper into the problem, I realized that it wasn't easy and that there was no existing solution in place. It seemed like a problem that many people before me had already dealt with. And, since the modules on CPAN are constantly being updated, it felt like a problem that was best solved by a web service.

We talked it over at PerlMongers in Toronto one evening. A fellow PerlMonger mentioned using Elasticsearch, which I had never heard of. A bunch of people also passed me $20 bills. Over the next 6 weeks, I spent my evenings writing code to extract data from the iCPAN database and put it into Elasticsearch. I hosted it in the Rackspace cloud with the money I had collected. Since Elasticsearch gives you a RESTish API out of the box for free, I had a working web service at the end of this time.

Mark Jubenville (who had been working with me on iCPAN) wrote http://search.metacpan.org as a proof of concept in pure JavaScript. We used this to test the API.

Around this time Moritz Onken came along. As part of his Google Summer of Code he created metacpan.org Since then MetaCPAN has become much more popular than I would have imagined. We've gone from a tiny cloud-based account to 6 servers in 2 data centres. We have a group of core developers and many committers. It's a busy project and it has a lot of moving parts, but it's fun.

Did you expect that MetaCPAN would practically replace the SCO?

No, and it hasn't really done that on a global scale. In some circles MetaCPAN is the more popular choice, but we have maybe 20% of the traffic that search.cpan.org has. Gabor Szabo could confirm or deny that. This is partly because the top results for more Google searches will lead you directly to search.cpan.org. There are still many people who swear that search.cpan.org is just better. Gabor even started work on an SCO clone which uses MetaCPAN as the back end: https://github.com/szabgab/MetaCPAN-SCO.

We're working on improving search this winter, so I have high hopes that we'll have an even better user experience quite soon.

I should note that MetaCPAN is not meant to be an SCO replacement. It's good to have choices.

What was the biggest obstacle in MetaCPAN development?

The biggest obstacle continues to be finding developers who know or are willing to learn Elasticsearch. It was an amazing tool to get up and running with. It can do very complex and amazing things, but it does require a fair amount of skill to really get to shine in some cases. Also, you have to install and configure a lot of different things to mimic our production environment. We've mostly solved the environment now, though. Leo Lapworth spent a lot of time moving our deployment to Puppet and creating a developer VM using Vagrant. So, now you can spin up your own MetaCPAN front end + back end in a very short time https://github.com/CPAN-API/metacpan-developer.

How to start contributing to MetaCPAN?

First off, I should mention that you can get lots of help on #metacpan on irc.perl.org. It's a very friendly channel with very few experts, so you can feel comfortable asking any questions at all. We're all trying to figure things out together.

If you just want to work on the web site, it's quite simple:

git clone https://github.com/CPAN-API/metacpan-web.git

cd metacpan-web

carton install
./bin/prove t
carton exec plackup -p 5001 -r

If you want to work on the api, then starting with the VM is the best option. https://github.com/CPAN-API/metacpan-developer.

How is iCPAN doing these days? Can you explain what it is?

iCPAN is a universal iOS app, meaning that it runs on both iPhones and iPads but with slightly different interfaces. It has almost all of the Pod from the recent CPAN uploads in it. It's meant to be something you can use on an airplane, in the subway or in line at the bank. No connection necessary. It also allows you to bookmark your favourite modules (on the iPhone, at least). However, iCPAN hasn't been in the app store for many months now. If you don't pay your developer fees to Apple, they pull your apps from the store and that's what happened to me. Lately I've been thinking about reviving it. If enough people upvote this ticket, I'll get the app back online https://github.com/oalders/iCPAN/issues/19.

Where do you work now? How much of your time are you writing Perl code?

I work at MaxMind.com. Most days, apart from our standup meetings, I actually spend almost all of my time writing Perl code and I'm able to contribute to open source projects as part of my work. I feel quite fortunate in that regard.

Should we encourage young people to learn Perl right now?

I think so. I don't think we should push young people into learning just one language, but Perl is a good language for young people to have in their toolbox. I've been involved with the Google Summer of Code and GNOME's Outreach Program for Women for a couple of years and I've seen some very bright young people doing interesting things with Perl.

I'm not sure if the number of working Perl developers is dwindling but our demographic does seem to be getting older. We could solve that by encouraging young people to learn some Perl. "Girls Who Code" seems to have the right idea. http://girlswhocode.com/.

My girls are 3 and 5 years old now, so they're not ready to start with Perl. If they do express some interest in programming, I'll start them with something like Scratch, but I'd certainly introduce them to Perl at the right time.

Questions from our readers

How do you combine working as developer, doing open source and playing in a band?! Does making music help in programming?

I combine all of those things very badly. I don't spend nearly as much time playing music as I'd like to. Basically I try to spend most of my free time with my kids, but I'm fortunate to be able to contribute to open source projects as part of my day to day work. Everything else has to get squeezed in whenever I have a little bit of free time.

I don't know that music helps at all with my programming. I actually studied Ancient Greek and Latin in University and that helped me immensely. If you can read Ancient Greek, you're well equipped to decipher someone else's code.

Why does http://wundersolutions.com return default nginx page?

Oops! I just fixed that. :)

Dancer or Mojolicious?

Mojolicious. We had a long discussion on frameworks at $work recently. I spent a lot of time researching the various options and I presented what I found. As a group we then decided to move to Mojolicious for our next project. I'm also using it for a personal project and I'm very happy with how easy it is to get up and running with.

Aside from the painless start, the quality of the documentation is what really sold me. I don't have to look hard to find what I need and that's very valuable to me.

Will you start blogging again?

I actually did just start blogging again. I've got a backlog of things I need to write about, so there are lots of articles on the way.

Interviewed by Viacheslav Tykhanovskyi (vti)