WWW::Tumblr 5.00

A few years ago, back when Tumblr had not been valued a billion dollars, I wrote WWW::Tumblr, which was basically Perl bindings for their REST API. Then I forgot about it for a long time, then Yahoo! bought them or something like that. I ended up getting contacted by some Perl programmers, telling me that they were using the Perl module. Great! Anyway, following the general rule on Internet startups, Tumblr migrated most of their endpoints to OAuth and left a bunch of other resources changed to use an API key and others not. Joy. I gotta say that at this point I was’t interested on Tumblr too much, in spite of having a profile that followed a few very random blogs. But people were indeed interested on the module for their own stuff and I got contacted again a few times.

Anyway, my coworker Fernando brought it to my attention more and more and I re-started working on my OAuth branch. A few weeks later now, I present you WWW::Tumblr 5.00, which supports all of the methods from the new Tumblr v2 API. During the development phase, Fernando tested a whole bunch, as well as this other project: I am very thankful for their help, since it took a while to properly make the API work as Tumblr does not seem to have the most compliant OAuth implementation of them all, and they seem to be quite unimpressed with questions and inquiries on their development group, but what are you gonna do about it, right, sigh.

Anyway, head to MetaCPAN to grab your copy today! And report bugs and stuff to the GitHub repo.

11 years in Freenode now

Somehow last year I missed the fact that I’ve been around Freenode for 10 years. It is more than 11 years now at this point. Oh my! I understand this is nothing compared to the very old wolves in free software, but bear with me on this one :)

19:25  info
19:25 -NickServ(NickServ@services.)- Information on Damog (account Damog):
19:25 -NickServ(NickServ@services.)- Registered : Jun 26 23:45:11 2002 (11 years, 7 weeks, 5 days, 17:39:50 ago)
19:25 -NickServ(NickServ@services.)- Last addr  : ~dm@debian/developer/damog
19:25 -NickServ(NickServ@services.)- vHost      : debian/developer/damog
19:25 -NickServ(NickServ@services.)- Last seen  : now
19:25 -NickServ(NickServ@services.)- Logins from: damog
19:25 -NickServ(NickServ@services.)- Nicks      : Damog
19:25 -NickServ(NickServ@services.)- Email      : damog@damog.net
19:25 -NickServ(NickServ@services.)- *** End of Info ***

One year

A year ago today, I started working for Booking.com. I wish I could say that the time has flown by, but it really hasn’t. It has been one hell of a ride on all fronts: work, learning experiences, friends, but specially at home, since working for this company didn’t come without a complete life change. So far so good, and for that I’m grateful :)


One of the conferences that I always wanted to attend is FOSDEM. Now, since I live close enough to Brussels, it’d be a gigantic letdown not to make it there next weekend. I plan to be in Brussels Fri to Sun, see you there!

Another day, another dawn

I started working for Booking.com two weeks ago now. These last two months have been probably the most chaotic and hectic in a long time from what I remember in my life. I left New York City, chilled out in Mexico City for several weeks and then finally relocated to beautiful Amsterdam. The decision of leaving New York was not simple, but I decided to take on new challenges, one cycle had ended for me and it was time for me to move on.

The change has not been easy, but it hasn’t been bad at all. I knew that coming from a very mutating startup in New York City into a company with presence in dozens of countries and several thousand employees was not gonna be a simple change. I decided to proceed with this because I want to learn. I want to learn how other businesses use technology, specially the kind that I’m most interested on, to become successful. I want to understand how they operate. I want to help a company succeed, take on new technology lessons and learn from more experienced peers. Thankfully, I’m not financially burdened and I’m able to make this decision myself without affecting (too much) others. I wanted the adventure (again) of relocating to a new country and making it to a company that has been successful for so many years, hugely based in Perl, who has contributed boldly to its community, with so many great Perl developers in the mix, etc., just made it all worth it.

Being a new guy is never easy, and I haven’t really been one of those often. I wish I knew how a lot of things work already, so I was able to contribute faster. At the end, this is all about a business and it’s about what developers and engineers do to contribute, to give back, to produce something that ends up as revenue and profit, and I want to do just that. Benefits and perks are always nice, but what I really want is prove to myself and to those who hired me the kind of competent talent that I am.

If you can understand Spanish, this video explains it better.

Oh and yeah, I turned 28 during my first week of work here in the Netherlands and was lucky enough to have a very happy one with plenty of hopes and goals.


I'm a brogrammer, brah!

My professional career has been kind of an interesting one. I believe that when I diverted from being a completely stereotype of a geek, my career as an IT professional really took off. Or at least, the real experience: that experience that no words can describe on a resume but that only you have within, that experience that only comes up when you’re facing a real-life problem and no interviews or screening processes or algorithms challenges and tests can really discover. That experience really started emerging when, ironically, I started looking at work as a medium to get to a more fulfilled life, instead of the life itself. I stopped attending conferences for fun or just hacking mandatory GPL software, and started developing a different array of preferences. I believe that when I started doing that, I started learning more in favor of my previous employer. I didn’t see everything through the pragmatism of what other programmers (specially free software advocates that I was mostly involved with six to seven years ago) would think and started to enjoy what I do and how I did it. I started to learn from other people, to see how real life problems are approached and how they’re attacked and thankfully I did learn how a lot of those are solved. And how the entire scheme actually pays off.

I come with this preliminar description of my current professional career because I read, and you should too, a great masterpiece of a ranting about the brogrammer and geek/nerd stereotype overall, by Perl guru mst, called Neither Nerd nor Bro. In it, he rants extensively about this brogrammer term and the whole nerd culture. Go read it. I’ll wait here.

You done? Good. I am of course not a brogrammer, don’t let the title of this post trick you. I believe that such a term is associated to failure just like a company could pretend to be cool enough to call its programmers something like ninjas or rockstars. Recipe for disaster. Why would anyone think of himself like a rockstar or a ninja? What’s the point for that? And is this only a recruiting technique by that people who don’t have a single hint of clue of technical knowledge and think they’re getting to real and actual A-player programmers?

I cannot do anything else but agree with what mst states. And I think the best programmers are those who don’t consider themselves like it. Good programmers, just like everyone else in life, are those who enjoy life and not those who pretend to be something they might not even be. I stopped attending conferences when I learned that I would enjoy seeing people kick each other on the groin more so I started spending money in watching UFC pay-per-views and whenever possible, come to live shows (believe me, they are expensive). But do not fail to encapsulate me on a “I’m so not a nerd that I want to choke you until you pass out to prove my manliness” speech. I also continued developing my passion for chess by joining a chess club and enjoyed chess tournaments. And when I started doing all of this alternative activities, my work, I believe, saw a peek in productivity. Doing what you love best, does affect your skills at work.

While the whole brogrammer term might be an entire joke, calling programmers rockstars is a fact and a reality and I couldn’t do anything more but despise those using the term and even more those owning it. In the hotbed that the whole Web startups have created in places like New York or Silicon Valley, you can be approached under those terms. As someone who has interviewed people for positions before and who has effectively hired people, I can say that you can definitively benefit more from passioned people who have other interests than those who are just pretentious fucks. I like people who might spend more time thinking about how to put that passion into a full-time endeavour. Those are legit. People who do what they love are the real deal. People who dream to do what they love and never lose motivation are the real deal as well.

Please be genuine. Peace.

I quit

I just recently quit my job at the startup company I had been working in for almost five years. In startup terms, such long time might be a whole lifetime, but in my case, I grew liking it more and more as the years came, I had evolved from being just another engineer, to lead a team of seven great developers, with decision-making tasks and strategy planning for our technical infrastructure. It’s been such a great long teaching journey that I’m nothing but pleased with my own performance, learned lessons and skills and all I provided and was provided by the project.

Leaving a city like New York is not an easy task. You have it all there, you start making a life and suddenly, before you know it, you already have a bunch of ties to the place, people, leases, important dates, all kinds of shit. Seriously, all kinds of crazy ass shit start to fill up your baggage. You wake up everyday to get into the subway and commute surrounded by all of this people that are just like you: so similar yet so immensely different. No, leaving the city is not an easy task, it’s not something to take lightly. You know how people just say “my cycle has ended in this place” as an euphemism not to end in bad terms with anyone? Well, ending a cycle is indeed a reality, I got to a point where I felt like I needed to head into a different direction, take on new challenges and overall, peace out and hope the best to everyone, specially to myself.

This was me, on my last day at work, last Friday of June:

(Some) people seem to be anxious to know what I’m doing next, and my answer is, go mind your own fucking business. However, life is short and I would love to do any of the following:

  • Go back to Brazil again, now as a blue belt in Brazilian jiujitsu, and train non-stop in Rio, this time as a local. I happened to come to Rio last November (as a four stripe white belt) and it’d been a great experience, with the Connection Rio guys. I kind of regretted not staying any longer, as a lot of people use to do, maybe three months. You don’t get to do anything else but train and roll with black belts on a daily basis, eat the healthy good stuff that a wonderful country like Brazil has to offer, hang out with amazing people and chill the fuck out all day long.

  • Make a road trip through Central America and get to know all of those countries where I’ve never been to even when I’ve travelled extensively around them for the last few years. I would head to the southernmost tip of Mexico and then take a bus to backpack travel in the cities all the way to Panama. Beer all along, a lot of swimming, plenty of heaven.

  • Head to any Russian consulate so I can get an entry visa for their amazing country and travel to any chess club on any of its big cities. Or maybe Hungary (do I need a visa to visit it?). Stay on small hostels where all I could use is a few good chess books and a chessboard, absorbe myself into chess sounds like a dream come true.

  • Stop procrastinating and write all the good Perl stuff I’ve wanting to do on my own time. All of those good projects I always thought of and only had opportunity to try at work but not on a giving-back-to-the-community kind of way.

Decisions, decisions…

For the time being, I’m chilling with my people, friends and family in beautiful Mexico City. I’ve been doing so for the entire month of July and I couldn’t be more content. August will see my 28th birthday and as I approach thirty, I believe I need to continue moving forward.

This stupid world is a tiny place and our lives are short, I for one, will definitively try to take the bull by the horns.

Thanks for reading, more updates soon. Peace.

Deploying a Dancer app on Heroku

There’s a few different posts out there on how to run Perl apps, such as Mojolicious-based, on Heroku, but I’d like to show how to deploy a Perl Dancer application on Heroku.

The startup script of a Dancer application (bin/app.pl) can be used as a PSGI file. With that in mind, I was able to take the good work of Miyagawa’s Heroku buildpack for general PSGI apps and hack it a little bit to use Dancer’s, specifically. What I like about Miyagawa’s approach is that uses the fantastic cpanm and makes it available within your application, instead of the monotonous cpan, to solve dependencies.

Let’s make a simple Dancer app to show how to make this happen:

/tmp $ dancer -a heroku
+ heroku
+ heroku/bin
+ heroku/bin/app.pl
+ heroku/config.yml
+ heroku/environments
+ heroku/environments/development.yml
+ heroku/environments/production.yml
+ heroku/views
+ heroku/views/index.tt
+ heroku/views/layouts
+ heroku/views/layouts/main.tt
+ heroku/lib
+ heroku/lib/heroku.pm
+ heroku/public
+ heroku/public/css
+ heroku/public/css/style.css
+ heroku/public/css/error.css
+ heroku/public/images
+ heroku/public/500.html
+ heroku/public/404.html
+ heroku/public/dispatch.fcgi
+ heroku/public/dispatch.cgi
+ heroku/public/javascripts
+ heroku/public/javascripts/jquery.js
+ heroku/t
+ heroku/t/002_index_route.t
+ heroku/t/001_base.t
+ heroku/Makefile.PL

Now, you already know that by firing perl bin/app.pl you can get your development server up and running. So I’ll just proceed to show how to make this work on Heroku, you should already have your development environment configured for it:

/tmp $ cd heroku/
/tmp/heroku $ git init
Initialized empty Git repository in /private/tmp/heroku/.git/
/tmp/heroku :master $ git add .
/tmp/heroku :master $ git commit -a -m 'Dancer on Heroku'
[master (root-commit) 6c0c55a] Dancer on Heroku
22 files changed, 809 insertions(+), 0 deletions(-)
create mode 100644 MANIFEST
create mode 100644 MANIFEST.SKIP
create mode 100644 Makefile.PL
create mode 100755 bin/app.pl
create mode 100644 config.yml
create mode 100644 environments/development.yml
create mode 100644 environments/production.yml
create mode 100644 lib/heroku.pm
create mode 100644 public/404.html
create mode 100644 public/500.html
create mode 100644 public/css/error.css
create mode 100644 public/css/style.css
create mode 100755 public/dispatch.cgi
create mode 100755 public/dispatch.fcgi
create mode 100644 public/favicon.ico
create mode 100644 public/images/perldancer-bg.jpg
create mode 100644 public/images/perldancer.jpg
create mode 100644 public/javascripts/jquery.js
create mode 100644 t/001_base.t
create mode 100644 t/002_index_route.t
create mode 100644 views/index.tt
create mode 100644 views/layouts/main.tt
/tmp/heroku :master $

And now, run heroku create, please note the buildpack URL, http://github.com/damog/heroku-buildpack-perl.git:

/tmp/heroku :master $ heroku create --stack cedar --buildpack http://github.com/damog/heroku-buildpack-perl.git
Creating blazing-beach-7280... done, stack is cedar
http://blazing-beach-7280.herokuapp.com/ | git@heroku.com:blazing-beach-7280.git
Git remote heroku added
/tmp/heroku :master $

And just push:

/tmp/heroku :master $ git push heroku master
Counting objects: 34, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (30/30), done.
Writing objects: 100% (34/34), 40.60 KiB, done.
Total 34 (delta 3), reused 0 (delta 0)

-----> Heroku receiving push
-----> Fetching custom buildpack... done
-----> Perl/PSGI Dancer! app detected
-----> Bootstrapping cpanm
Successfully installed JSON-PP-2.27200
Successfully installed CPAN-Meta-YAML-0.008
Successfully installed Parse-CPAN-Meta-1.4404 (upgraded from 1.39)
Successfully installed version-0.99 (upgraded from 0.77)
Successfully installed Module-Metadata-1.000009
Successfully installed CPAN-Meta-Requirements-2.122
Successfully installed CPAN-Meta-2.120921
Successfully installed Perl-OSType-1.002
Successfully installed ExtUtils-CBuilder-0.280205 (upgraded from 0.2602)
Successfully installed ExtUtils-ParseXS-3.15 (upgraded from 2.2002)
Successfully installed Module-Build-0.4001 (upgraded from 0.340201)
Successfully installed App-cpanminus-1.5015
12 distributions installed
-----> Installing dependencies
Successfully installed ExtUtils-MakeMaker-6.62 (upgraded from 6.55_02)
Successfully installed YAML-0.84
Successfully installed Test-Simple-0.98 (upgraded from 0.92)
Successfully installed Try-Tiny-0.11
Successfully installed HTTP-Server-Simple-0.44
Successfully installed HTTP-Server-Simple-PSGI-0.14
Successfully installed URI-1.60
Successfully installed Test-Tester-0.108
Successfully installed Test-NoWarnings-1.04
Successfully installed Test-Deep-0.110
Successfully installed LWP-MediaTypes-6.02
Successfully installed Encode-Locale-1.03
Successfully installed HTTP-Date-6.02
Successfully installed HTML-Tagset-3.20
Successfully installed HTML-Parser-3.69
Successfully installed Compress-Raw-Bzip2-2.052 (upgraded from 2.020)
Successfully installed Compress-Raw-Zlib-2.054 (upgraded from 2.020)
Successfully installed IO-Compress-2.052 (upgraded from 2.020)
Successfully installed HTTP-Message-6.03
Successfully installed HTTP-Body-1.15
Successfully installed MIME-Types-1.35
Successfully installed HTTP-Negotiate-6.01
Successfully installed File-Listing-6.04
Successfully installed HTTP-Daemon-6.01
Successfully installed Net-HTTP-6.03
Successfully installed HTTP-Cookies-6.01
Successfully installed WWW-RobotRules-6.02
Successfully installed libwww-perl-6.04
Successfully installed Dancer-1.3097
29 distributions installed
-----> Installing Starman
Successfully installed Test-Requires-0.06
Successfully installed Hash-MultiValue-0.12
Successfully installed Devel-StackTrace-1.27
Successfully installed Test-SharedFork-0.20
Successfully installed Test-TCP-1.16
Successfully installed Class-Inspector-1.27
Successfully installed File-ShareDir-1.03
Successfully installed Filesys-Notify-Simple-0.08
Successfully installed Devel-StackTrace-AsHTML-0.11
Successfully installed Plack-0.9989
Successfully installed Net-Server-2.006
Successfully installed HTTP-Parser-XS-0.14
Successfully installed Data-Dump-1.21
Successfully installed Starman-0.3001
14 distributions installed
-----> Discovering process types
Procfile declares types -> (none)
Default types for Perl/PSGI Dancer! -> web
-----> Compiled slug size is 2.7MB
-----> Launching... done, v4
http://blazing-beach-7280.herokuapp.com deployed to Heroku

To git@heroku.com:blazing-beach-7280.git
* [new branch] master -> master
/tmp/heroku :master $

And you can confirm it works:

Please note that the environment it runs on is “deployment”. The backend server it uses is the great Starman, also by the great Miyagawa.

Now, if you add or change dependencies on Makefile.PL, next time you push, those will get updated.

Very cool, right? :)