Интервью /

Interview with Breno G. de Oliveira (March 2014)

How and when did you learn to program?

My stepdad joined the family in 1990 when I was 8 years old, and he programmed in BASIC as a hobby. I quickly developed a taste for it and started nagging him on how to do simple and silly things like printing the user's name 100 times on the screen and then making a beeping sound. After a short while my brother and I moved to more complicated (yet still silly) things like ascii animations, making music melodies with the PC speaker, and a cool (hey, I was a kid!) "encryption" system that used a dynamic substitution cipher, enough to protect our top-secret-9-year-old stuff. Oh, we also loved hex-editing some DOS games and changing the texts, but that's more hacking and trying to figure out how programs worked than programming in itself.

What editor do you use?


I really enjoy coding in vim, and even though we had a somewhat rough start in my early Linux days, I now get confused every time I'm in front of a different editor, and I often find myself pressing the ESC key (or :w) after typing text on a computer, even on web browsers.

I've also worked a lot on Padre, the Perl IDE, and think it 's a great editor, specially (but not just) for beginners. That said, I'm not really into "editor wars" and when someone asks me for a recommendation, I usually tell them to try a few and pick whichever they feel most comfortable with.


When and how have you been introduced to Perl?

At the University in the early 2000's I developed a big interest on Information Security, and I quickly saw that Perl was a really big player in the field, so I decided I should learn it eventually if I ever wanted to link my coding skills with my soon-to-be-profession. Still, I kept postponing it until I won the Perl Cookbook as a pop quiz prize after an Information Security talk at a local Free Software conference. I started skimming through the book and getting some ideas of what sort of cool stuff I could do, and I was immediately drawn to how easy and quick it was to make programs just by connecting modules that were already there and not only did what I want, but did it well. By then I had already done some professional C work, and Perl's syntax, portability and DWIM-ness enabled me to code without worrying about memory allocation and pointers and more focused on the actual problem I wanted to solve. This was incredibly freeing, and I haven't looked back since.

What are other programming languages you enjoy working with?

I'll always have a soft spot for C in my heart, even though I haven't coded in it in a while now. Recently I have been somewhat involved in the JavaScript community as well, and I also play a little with Scala and Lisp — I even wrote a "Scala for Perl 5 Developers" manual showing the similarities and differences between those two. Ruby is not too bad either, though I hardly do anything in it, much less serious stuff.

I also attend a local "coding dojo" group, where we try different languages and paradigms, so that's fun too. Oh! And every once in a while I download a recent version of Rakudo and do a little Perl 6 as well, mostly for fun and to see if it's fast enough to consider prototyping some non-critical code at work with it. Now that we have tools like rakudobrew, it gets even easier.

What do you think is Perl's strongest advantage?

I'd have to say it's the community. But not only the community just in terms of people, but specially the culture associated with that community. As I started to participate in mailing lists and events I quickly discovered that, odd exceptions aside, most Perl developers are intelligent, respectful, know the craft and how to encourage discussions by bringing good arguments to the table instead of FUD, prejudice or fanaticism. That culture makes it very rewarding and a lot of fun to be a part of such community. It also promotes a lot of information interchange as we're always trying to help each other whenever we can, be it answering a newbie question, submitting a bug report or writing a useful module and giving it away for free.

Because of this community we are able to find 90% of whatever app we want to make already done on CPAN for us, not to mention tested on several platforms, rated and reviewed by great coders, all for free. Because of this community we can get almost real-time help whenever we bump into an issue, also for free. Because of this community we are able to use Perl 5 at its fullest and see it growing every day, with increased code quality, new features, speed improvements, evolved best practices, and much more.

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

I must confess I haven't really thought about it, but I guess there are two big fronts.

In terms of hardware, processors haven't been speeding up so much nowadays and it looks like the multi-core approach is here to stay. Still, most languages, Perl 5 included, either run on a single core or have very limited, very confusing or not really integrated coroutines and multicore programming support. To me, programming languages of the future must embrace multicores and concurrency in an elegant and intuitive way, and do so as seamlessly and transparently as possible, so their apps can take full advantage of such environments whenever possible. I heard Perl 6 is getting there, which is really exciting, but like I said I haven't been able to play with it as much as I want.

In terms of running environments, I think languages that are able to run on web browsers have a huge advantage over the rest. I am of course talking about JavaScript, though I keep wondering whether any other language will ever find its way to the browser natively as well. I also think it's funny that, while a lot of languages start on the server-side and try to move to web clients, JavaScript developers are doing the opposite and trying to move away from being just a web browser language with projects like node. Still, being able to code for the web browser means your app can run on any device that has one, and be where most of your target audience spends most of their time anyway (unless you're doing something more specific or not for the end-user).

Finally, also on running environments, the JVM has long since become the de-facto standard for virtual machines, and improved a lot in terms of speed, portability and resource consumption over the past several years. It also makes it a lot easier to be adopted by large corporations who already have the JVM homologated by IT departments in their businesses, not to mention coding for a single environment is bound to simplify the language's source code itself, delegating portability concerns to the virtual machine and not to compilation flags, making the language easier to maintain and evolve. I think languages of the future should probably aim for at least one reliable implementation running on top of the JVM.

How Data::Printer is different from Data::Dumper?

A lot! Data::Dumper is meant to serialize Perl data structures in a way that they can be parsed back into the code, which means it can print variable contents on the screen, but it's not really that readable. Data::Printer (or DDP for short), on the other hand, doesn't care about being parsed back into Perl code and is designed for human inspection. It provides colored output, sorted keys, filters and much more! For example, when you call Data::Dumper on an object, you do something like:

use Data::Dumper; warn Dumper($obj);

and it prints the internal structure of the blessed variable and the class name, which is usually not at all what you need. If you're using Data::Printer, on the other hand, you'd do something like this:

use DDP; p $obj;

which is not only shorter but will show you that it's an object of this or that class, it's inheritance (@ISA) list, public/private/inherited methods, and its internal structure, everything colored and formatted for you to easily spot what you're looking at. It also provides a lot of extra information that you just can't find on Data::Dumper, like whether the variable is tainted, readonly, or a weak reference, which also helps you debug. Finally, Data::Printer is able to display references that aren't supported (yet) by Data::Dumper, such as lvalues, and it's highly customizable to suit your viewing/debugging preferences.

So if you want to see and inspect the contents of your variables, you really should be using Data::Printer. You won't go back to Data::Dumper, I guarantee you :)

When App::Rad is going to be finished?

Hey, look! A three-headed monkey!

Oh, my. That's a very good question. I created App::Rad because I was doing a lot of command-line apps and I hated having to repeat myself every time I was working on a new project. There was already rjbs's great App::Cmd, but it felt (and sometimes still feels) like overkill for the stuff I was doing. It was as if App::Cmd was the Catalyst of CLI frameworks, and I wanted something more like Mojolicious or Dancer. Turns out a lot of developers felt the same way and it quickly got a lot of traction, and people started pulling me aside to ask for new features or bugfixes. I even heard it was being used in CERN on a couple of internal apps that integrated data from different labs to the LHC, which is very cool.

When I wrote App::Rad I did it for me, to solve my particular problems, so I made a lot of internal design decisions that I regret as they didn't make it at all as extensible as it should have been. Also, as the project got bigger and bolder, the feature requests we wanted to fulfill weren't really backwards compatible, so I got into the dilemma of either make something new or release a version that would break old code. So I decided to rewrite everything from scratch, paying special attention to make it more easily maintainable and extensible. Unfortunately, this would take time I didn't have and by then I had started to move away from CLI apps, so I never got around to it :(

I still plan on re-releasing it sometime in the future, but sadly there are other things on my plate at the moment.

What are QA Hackathons? Who is invited?

As your readers are probably aware, the Perl community cares a great deal about quality assurance (or QA for short). We encouraged testing way before it was cool. We have tons of testing modules, tools, guidelines, and the CPAN infrastructure provides a lot of ways to make sure every submitted module works as its author intended on every version and platform that Perl runs. In order to do that, we must make sure all those tools interact properly with each other. One example is the CPAN Testers service, which needs to communicate with reporting tools integrated with CPAN clients all over the world that wish to send test results for a given module on a given system, and at the same time provide data that needs to be parsed and linked by the MetaCPAN web application. That's a lot of systems that need to be in perfect sync, and it's just one example!

Even though we are able to manage online discussions, make design decisions and work on those tools throughout the year in our spare time between work, family, friends and other projects (remember this is all volunteer work!), it's never as productive as if we were all in the same room — so that's exactly what we do.

Once a year, everyone from the Perl Quality Assurance toolchain gets together for a long weekend (usually friday to sunday) somewhere in the world, and we focus day in day out solely on those kinds of projects. We have Perl core developers hacking their way to fix long-standing bugs, test module authors discussing features and releasing new versions and tools, data mungers correlating results and adding extra visualization options for developers, ops teams making sure everything stays sane and that information is sent back and forth as fast and reliably as possible, and so on. I have been fortunate enough to attend the last two QA Hackathons, in Paris and Lancaster respectively, and I can tell you it's really amazing. Everyone is really focused and productive, and we get a lot of things done in just a weekend. Also, none of us is paid to do this, we do it out of our passion for the welfare of the language and its community. Which is why it's so important that we get donations from the community and sponsoring companies to feed us and pay for our stay while we hack.

As for attendants, like I said, everyone who cares enough about Quality Assurance in the Perl ecosystem to travel to another city out of your own pocket and spend an entire weekend focused on improving it is invited, up to a limit provided by the venue where the hackathon is being held — usually around 40 people. Most attendants have already had some contact outside the hackathon with those projects, but that's not a rule per se. If anyone's interested in helping, join #qa on irc.perl.org and let other people there know. Otherwise, if you use any of those tools or modules (and believe me, you do!), please consider donating as well. We couldn't do 1/10 of the things we do for the Perl ecosystem without the QA Hackathon, and that's only possible because of our generous sponsors. Even if it's just $1, it counts. What? You have already donated this year? THANK YOU!

For what did you get the White Camel award?

Why, my sexy looks, of course!

Seriously, though, I have been doing a lot of Perl community work over the past decade, specially organizing YAPC::Brasil and other Perl events south of the equator. I also try my best to encourage and assist the exchange of information between the brazilian and international Perl communities, traveling around the world to raise awareness for all the cool stuff brazilian Perl developers are doing here, translating documentation and blog posts back and forth, and so on. Very few brazilians, even amongst developers, are fluent in english. What I try to do is lower the language barrier and be a link between those communities that have so much to gain from each other. So, in 2012, during the YAPC::NA, I was fortunate enough to be awarded with the White Camel. It was really unexpected, and I became the first person in Latin America to ever be awarded. I was really happy, and now the award sits proudly in my living room :)

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

I work as the CTO of Estante Virtual, a marketplace e-commerce for used books, written entirely in Perl. We are a very successful business in Brazil, selling one book every 3 seconds. It's really fun to work there, and even though I don't have a lot of opportunity to code at work, I am still the teams' "go-to" person whenever they bump into trouble. I also provide trainings of new features, debugging techniques, design patterns and best practices, specially for junior developers that join the company.

At home, whenever I can and work allows it, I work on my open-source projects, mostly in Perl.

Should we encourage young people to learn Perl right now?

Absolutely! Right now! Should we take my car? :D

A healthy community is always renewing, always evolving, and always getting fresh blood. Every language needs young people to fall in love with it, question old paradigms and keep pushing it forward, and Perl is no exception. I honestly think it can be a great first language for some people, and as a flexible, portable, get-things-done, multi-paradigm, general purpose language, it allows newbies to code the way they think, and not the way someone else wanted them to. It also has a very intelligent and newcomer friendly community behind it that understands this and encourages people to learn and have fun with it, without the average egotistical "rockstar" commonly found in other dynamic language communities.

Questions from our readers (some of them are jokes)

What were you doing at YAPC::Europe 2013 in Kiev? Did you like it?

I loved it! Seriously. Like I said, I like traveling around and talking to people from different Perl communities, sharing information and getting to know local projects and developers. This was my first YAPC::Europe and I had a great time. Even cooler, since I was staying with one of the organizers, I ended up helping them out as a volunteer throughout the conference and even got a "staff" badge! :)

Everyone was great and made me feel pretty much at home. I met a lot of my friends from Europe and made a bunch of new ones, specially from Ukraine, Russia, Norway, Amsterdam and Romania.

You are maintaining several modules on CPAN from other authors. Were you forced to do that?

Only the ones from this "vti" dude ;)

Not really. One of the cool things of the Perl community is that once you are known as a reliable and competent person that cares enough to see some module maintained, they usually let you do it. It happens naturally: you start submitting bug reports and patches, talking to people on the mailing lists and irc channels, and eventually, if the original author gets too busy or wants to work on something else for a change, they give you the house keys and ask you to water the plants for them.

Take Clone.pm, for example. I was having some issues with it and send patches that were never applied. After several weeks with no reply from the author, I tried contacting him through the provided email asking what was going on, and offering my help to maintain the module if he was too busy. The author promptly replied and gave me co-maintenance, so I applied my patches (and a lot of new ones afterwards) and pushed a new version to CPAN.

Is it true that you carry two coats whenever you travel despite of the weather conditions?

Of course! You never know when the ice age will return ;)

Actually, this is a funny story. I come from a very warm country, and here in Rio the temperature floats between 20C and 45C all year, so I'm not really used to cold weather (really, I was wearing a heavy coat in Orlando/USA) and get easily scared with lower temperatures. I've also spend all my life hearing stories of how Ukraine was really cold.

So when I was on my way to Kiev in 2013 for the YAPC::Europe, I naturally asked my local friend Slava how cold it was and he said it was snowing a lot and that I should make sure to bring two coats with me. Instead of actually firing up my web browser and checking the bloody weather, I trusted my friend's "insider tip" and blindly packed two heavy coats in my bag. It was summer in Kiev, 30C, and he is probably still laughing at me. I was such a suka. But I'll get him :P

Do you like onions?

Hahhahahaha not really :P

I called my blog "the onion stand" because of Perl's onion logo, and also because of the (bad) pun of "stand' being both a place where you showcase stuff and also a statement of resilience ("making a stand").

But truth be told, I hate onions, cabbage and leek.


Interview by Viacheslav Tykhanovskyi (vti)