My Goals for 2014

Keeping the same idea of the previous year, I’ve decided to commit myself to no more than 3 different goals for this year. The reason for this is to maintain focus and not sign me up for more things that I’m able/willing to do each time.

Things that I will be doing this year:

Weigh 90kg or more with 10%BF or less by my 30th birthday.

Before my 30th birthday I will be achieving my always wanted physique. I want to celebrate my 30th birthday enjoying my best phisique so far.

Milestones:

  • April 18th: Weigh 90kg with less than 20%BF
  • September 15th: Weigh 90kg averaging 13%BF
  • November 17th: Weigh 90~95kg with 10%BF at most

5 German writing exercises every week.

I consider this one to be pretty self-explanatory: I will be doing german writing exercises at least 5 times each week in order to improve my (very poor) written german and acquire overall fluency.

As a “side-goal” of this one, I will tentatively obtain the C1 prüfung by late may, early june. These exercises will be published and documented so I can see the overall improvement with

Will write a technical blogpost every month this year.

At the beginning of the month, I will elect a topic and spend the month researching about it and produce a blog post in vitorpellegrino.com with the results of it.

Comments

Introducing Jackpot: Billing Made Easy for Rails Applications

I would like to introduce you to my new open source project: Jackpot. It started out @ Mendicant University as my core skills project and now its going through a major overhaul to get ready to hit its primetime.

Jackpot has pretty high ambitions, though. It aims to become the easiest way to get paid using rails. It abstracts all the nasty details about recurring payment processing and let you focus on writing your appliaction, not billing code. Billing code is a boring thing to write, so i expect you not having to do it all by yourself.

YUNO USE X OR Y..!?!11

There are a lot of great solutions available, the problem is that many of them are restricted to certain countries. Being outside US and the UK, i know how painful it is to roll your own Billing solution everytime you start a new SaaS project. Also there are people that prefer having more control about their own billing solution or might not need all the advanced functionalities these solutions provide.

There are also a few open source projects, but most are quite outdated and do not take full advantage of more current solutions. Jackpot was designed to be easily distributed via Rails Engines, so it can be mounted in any Rails 3.1 or 3.2 application.

Active Merchant

Jackpot also relies on the great time tested project brought up by the fantastic guys at Shopify ActiveMerchant. Jackpot uses it to interact with Gateways, so providing it with any Active Merchant gateway with card storage support will work. This card storage support is really important, since you will not want to do it by yourself, which would make getting PCI Compliance much harder. Jackpot does not and will not record any sort of credit card information.

Unlike Active Merchant, Jackpot was designed to provide a full yet simple billing solution for SaaS apps, which means it takes care of subscriptions, customers and charging your customers monthly. In practice, Jackpot takes care of those details you would have to do within your application.

Current Status

Please, be aware that this project its in a super alpha state and that there are some rough edges yet to be polished. Right now it only supports Braintree and lacks features such as Invoicing and Mailing. Currently, you can use it to create your subscriptions, track your customers and processing monthly payment using a Cron process ready to roll.

You can see the source code at http://github.com/pellegrino/jackpot and also see a little rails 3.2 demo application.

I hope you like the project and that it may be useful to you as well. Your feedback is highly appreciated, leave your comments below or feel free to reach me at IRC. My username is pellegrino @freenode and i’m happy to help.

Stay tuned for more!

Comments

Undefined Symbol SSLv2_method in Ubuntu 11.10 and 12.04 Alpha 1 Installing Lernanta

Today i spent a couple of hours trying to get Lernanta the Open Source application that supports P2PU’s courses. If you are not familiar with any of those, i highly reccommend giving it a try. While trying to set up my local installation according to the Lernanta Installation Guide, i ended up facing the following error:

Could not import users.views. 
Error was: /home/vitor/.virtualenvs/lernanta/local/lib/python2.7/site-packages/M2Crypto/__m2crypto.so: 
undefined symbol: SSLv2_method

After a little bit of researching and googling around, i found out that this error was related to the absence of SSLv2 in Ubuntu’s OpenSSL package. The Ubuntu people build OpenSSL without SSLv2 support because the protocol has known security issues. This was introduced in 11.10 version and it also happens in 12.04 Alpha 1.

The following links are related to this issue.

Solution:

The installation guide instruct us to create our virtualenv using the command:

mkvirtualenv lernanta

However, virtual env now changed its default behavior. It seems that since 1.7 version is out one must provide the —system-site-packages trigger modifier to have the old behavior back and have virtualenv also look for system wide packages and use the apt-get version we installed while following the Installation Guide.

mkvirtualenv --system-site-packages lernanta

Creating your virtualenv this way, will make virtualenv work as expected in documentation and, finally, make your Lernanta installation work as expected.

More information about this subject can be found in this link.

I hope it was helpful!

See you next time,

Speeding Up MySQL at Linux and Ext4 Filesystem

Since i switched back from Mac OS X to Linux, i noticed some of my rails apps were running its tests much slower (almost 10 times slower in few cases).

After many wrong guesses and false alarms, i found out that MySQL doesnt like much ext4 ubuntu default settings.

I hope it can help fellow googlers facing this very same issue. After adding some minor tweaks at my ext4 partition, my test suite now runs under 3 seconds. Before those changes, it used to last almost 80s!

TL ; DR

Add barrier=0 to your fstab, restart your machine, and MySQL will run much faster.

Mine fstab entry is currently like this, feel free to change that accordingly to your needs:

# / was on /dev/sda6 during installation
UUID=98e8b440-fd76-4e49-b45a-e8e3c9dec2e4 / ext4    errors=remount-ro,noatime,data=writeback,barrier=0,nobh 0 1

For more information regarding ext4 and those tweaks im using, check this awesome blog post from Nick Gauthier

Let Your Client Approve Your Pivotal Stories With Whereuat

Yesterday i’ve been playing with this project called whereuat. This project is a very neat idea which enables your users to give feedback, approve and reject stories marked as delivered directly at your pivotal tracker.

The application is pretty simple by itself. Its basically a scaffold for recipes, with whereuat integration.

For anyone working in a situation where clients or even QA are required to participate more closely at the development process, i would recommend it to give whereuat a look.

Check the examples

You can see the code for this application in:
https://github.com/pellegrino/whereuatdemo

To see it running at heroku:
http://whereuatdemo.heroku.com/recipes

The storyboard used in this example can also be viewed here:
https://www.pivotaltracker.com/projects/323133

Ruby Mendicant University

Im really proud to announce that i am the 43rd student to join #RbMU alumni network. The course was a very intense, 3 week long, about Ruby development, OSS and Application Design in general. That was a really awesome experience. In short, if you are a ruby developer and want to take your skills seriously, you should look in doing the Core Skills ASAP. :)

Is that a really tough course?

Yes. Definitely it is. Gregory (@seacreature) and all the mentors really do push you hard to go even further (which is great!). Looking back, i never thought i could acomplish that much in so little time. I was envolved almost my entire career in Web Development, so i never did some sort of “tool development” before. That was something i really was looking forward to change, and RMU was the perfect excuse for me to do it :)

My personal experience about it

Before joining RMU, i considered myself a pretty competent Ruby Developer, given the fact i’m on rails since 2006, so wasn’t very sure about what i could expect from this. The fact is that i really did learn a bunch. The course is aimed at Intermediate Ruby developers, but i’m sure that anyone would benefit a lot from this kind of experience. The amount of feedback you receive during the course is ridiculus.

To be honest, i never thought (even after seeing so nice feedback from other alumni) that the interaction between student could be so strong, since there were no such thing as classes during the course – most of our comunication happened in a asynchronous fashion – but i was plain wrong. It was simply awesome to see how everyone did improve during the course and a “colleague spirit” did emerge from that. During the first week, most of the feedback were given by the instructors and mentors, but quickly my peers were giving me lot of quality advices and i felt very comfortable to do the same for them. I must say that, after these 3 weeks i’m a reassured about open source development in general.

If you value the RMU much like i do, i hope you will help it to keep on rocking and providing top notch trainning for Ruby developers worldwide.

Hello Again

Blogging and open-source are two things i’ve always wanted to do more seriously but never knew how to get started. After RMU (BTW, if you are serious about mastering Ruby and OSS development, THIS is the place) i felt i needed a whole refresh at this space.

Since i’m most of my day at Emacs and Github, Jekyll was perfect fit for my current setup. I hope it works for me.