Developer

Demystifying Perl with cog

Jose Castro is a Perl Monger community leader in Portugal and is quite the obfuscater and golfer. We caught up with him at OSDC and discussed Perl, Portugal and the future.

Some people know him as Jose Castro, to others he is known only as cog. Either way he remains a Perl Monger community leader in Portugal and is quite the obfuscater and golfer. We caught up with Jose at OSDC and discussed Perl, Portugal and the future.

Builder AU: Could you tell us a little bit about yourself?

cog: I used to be a Perl programmer at Log — Log is a company that does open source consulting and development — what I do there now is lead the whole development department. It's something I've been doing for about five months now.

And on the community side?

I do way too many things. I am the leader of the Lisbon Perl Mongers group; when I went to Lisbon less than two years ago there was a group but the group was inactive. There had been one meeting a couple of years ago, most people didn't know each other, so I tried to energise the group and I think I managed to — there is now over 90 of us.

I also partnered with a friend of mine who came from my home town Viana, and by the time we created the group, we had an announcement that there will be no meetings for now because there's only two of us and we are living together. Right now there is 14 of us so it was a good thing. You can and you should start a Perl mongers group, even in a small city because it will help you find others in the city.

I also help out the Portuguese Perl Association, it's a relatively new thing there. What we want to do is we want to help create different workshops and help out the conferences in Portugal.

Along with a friend of mine I helped create YAPC — Yet Another Perl Conference — in Portugal in 2005. Which was a great thing because nobody in the Perl community knew who we were and between the two of us we made a proposal and we managed to get the conference to Portugal. We organised what many people described as the best YAPC up until that point. I believe by the end of the conference, the money we got after paying for everything was pretty much same as the previous four conferences put together.

Now, although it hasn't been announced yet officially, I am now officially a member of the Perl Foundation, I am responsible for the community relations. The good thing about it is that I'm not going to have to do everything that David Cross was doing because now we have a team with incredible people like David Adler, Casey West, Jay Hannah and Jeff Bisbee in it — what I am going to do is lead and coordinate that team.

Personally for you, why Perl?

It's interesting because back in university I went through about 20 different languages and every time I was presented with a new language I would say "Wow! This is great!" and I would drop the previous one and start hacking on the next one. But soon as I saw Perl, it was "oh man! It doesn't get any better than this!" So that's why I started with Perl.

I started doing a bunch of things because the things that are suppose to be easy I could actually do the easy way, and the things that look impossible are actually pretty easy too. The language is pretty good, really really flexible — and I do agree that it's not really trivial to understand in the beginning, But if you do manage to get past that first obstacle and understand how it all works, it's going to be amazing for you.

And then there is CPAN, which is the Perl repository of modules, there are now over 10,000 modules on CPAN, and that's great.

The thing is that if you ask me today "why Perl? Why am I still with Perl?", that thing is the community. I just love the Perl community — the conferences, the mailing lists, the Web sites and the people involved — I just love the Perl community.

From your talks today, you've clearly gone deep into Perl, where are your interests in Perl now?

Now that I am leading a department I don't get to code that much. But for instance I got a couple of days a couple of weeks ago and I tried Catalyst for the very first time, and it was really really easy to put up a Web site in no time. So I now have a Portuguese Web site of jokes, that I expect to become the national reference in Portugal for jokes.

So quite frankly I don't know where to next. But I know something I want to do, I want to put more Portuguese people out there in the open. I want to take those people to the Perl community. It was really easy [for me] to get inside the community.

I was reading the "Learning Perl" book by Randal Schwartz, and I came across a site called Use Perl and I created a journal on that site. And one of my first posts there was "I am reading this book".

[On the site] You can become a fan or friend of someone, and suddenly I had two fans. I saw who they were and one of the guys was Randal Schwartz! The actual author of the book I was reading proved to be my fan. Later on I discovered that this really didn't mean that much, but in that moment it did to me. It was part of the motivation to read more and to start going more into the language and the community.

And the way that the community embraces newcomers is really awesome, and I want to make that available to more people.

If someone is put off by the reputation of Perl, is engaging with the community a good way to encourage them to pick up Perl?

Yes, I did this talk on obfuscation, and one of the things I say is "Look, you *can* do this" but it doesn't mean everyone is doing it. If one of the guys in my team codes like this, something is going to happen to that guy.

I advocate clean Perl, good Perl. If other languages like Ruby and Python really force you to do good coding and Perl doesn't, doesn't mean you should write bad Perl. I think that if you are a good programmer you will be able to do good code with most languages.

Is the uptake of Python something that could hurt or hinder Perl?

I think both Python and Ruby are great languages, I can honestly tell you the only reason that the company I work is doing Perl and not Python or Ruby is that the market in Portugal for Python and Ruby is not that strong. But I would really love it to be.

I don't see Python and Ruby as a threat. I see them as part as the same set of great languages.

Is open source getting anywhere in Portugal?

Yes, I think so. If you consider that the company I work for has doubled the number of people in the past two years and we are an open source software company. Last week there was a conference in Portugal on using open source in the public departments, and there was definitely a lot of people interested.

It's just that Portugal is not that big of a country and there is not that much money, and other countries follow better roads to get there. But open source is really getting somewhere in Portugal and I think it will be more and more of a buzzword in the near future.

What do you see as the future of Perl?

I would like the future of Perl to be the demystifying of the Perl myths. The myth that Perl is unreadable, which is not true; the myth that Perl is slow, which is not true; and a bunch of other myths. That's what I would like to get rid of.

Eventually Perl 6 will come along, but I really don't see it as too important, because even when Perl 6 arrives, there will still be a lot of Perl 5 code around and I think it is a great language as it is now. True, Perl 6 will be better but I don't think people will switch to Perl 6 from one day to the next.

So Perl 6 I see as the future of Perl in like two, three or four years. Right now I see the near Perl future as a more open community and with the myths demystified.

And finally, will your book on obfuscation be human readable?

Yes, it depends on what kind of human you are. No really, the purpose of the book is not to obfuscate Perl more and it's not to mess around with people's brains and make them bleed out their ears and all that.

The purpose of the book is to make people understand what obfuscation is all about, to give people a couple of hours of fun, entertainment and education by reading the book. And also one of my objectives with the book is to demystify a few of the Perl myths and to show people that obfuscation is not what they think it is. Because some people think obfuscation is security, for instance, and it's not. You are not going to get your code secure by obfuscating it, what you could from it is that people who understand what obfuscation is to mock you and that is pretty much it. And the fact remains that if you obfuscate your code you're just going to get people interested in the obfuscation to see what it really does.

So that's what I intend to do with the book, and I hope that the book will be readable even to a Perl beginner. That's my purpose.

Thanks a lot

Thank you.

About Chris Duckett

Some would say that it is a long way from software engineering to journalism, others would correctly argue that it is a mere 10 metres according to the floor plan.During his first five years with CBS Interactive, Chris started his journalistic advent...

Editor's Picks

Free Newsletters, In your Inbox