Here you can find the slides that I used for my presentation at Chicago Code Camp 2015. It was an amazing experience, and I only have words of gratitude to the organization and sponsors; it is awesome to find events for developers of such high quality for free.

There are tons of text editors out there, and every single developer has its own preference: Sublime Text, TextMate, Notepad++, GEdit, Emacs… same thing happens with IDEs, such as Eclipse, IntelliJ, XCode, RubyMine, Android Studio, Visual Studio… every single one has its own pros and cons; however, if there’s a text editor that is the preference of the so-called “hardcore programmers”, that is Vim.

Vim is a free and open source text editor based on Vi; you will probably have it installed on your computer, so go ahead, open your terminal and type vim test.txt; your terminal will turn into a full and rich text editor, which is awesome. There are great tutorials out there to learn how Vim works (if I have to choose one, this interactive tutorial is my favorite) that will show you how to get the best form Vim.

While I’ve used Vim in the past for minor things (squash my git commits, do a simple edition on a file…), it has been this last month when I’ve started to use Vim intensively: every single day I have to work on a remote instance of a Debian machine that contains a Rails application. In the past, when I had to work with Rails, I used Sublime Text or RubyMine, but never Vim before, and I was very happy with results.

Vim is totally customizable, and you can add as many plugins and fancy stuff as you can imagine, which converts Vim into a great development tool (as you can see in the following video):

However, Vim is not “my tool”. Maybe I’m used to “the graphical” text editors, maybe I don’t want to learn a whole new set of shortcuts (yeah, when I press Cmd + F I want to do a search, and want I type something I want to write something… yeah, I’m looking at you, “INSERT MODE”) or maybe, I’m just human and variety is just the spice of life, and I am that kind of developer who doesn’t like to use Vim for everything.

Just to illustrate how “hard” is to me to get used to Vim, I have found this little joke to be very appropiate:

How do you generate a random string? Put a first year CS student in front of Vim and ask him to save and exit.

The only thing that I can do is to learn as many Vim features as I can, but looks like I will continue using my mouse, using the arrow keys… and using any other text editor or IDE when I can ;)

Recently, I joined the “O’Reilly Reviewers” program, and the first book that fell into my hands was Learning Android, by Marko Gargenta and Masumi Nakamura.

The first part of the book is a brief introduction to the Java programming language, used to develop for Android. After this introduction, you will start the creation of a Twitter-like application called Yamba that covers the core concepts of every Android application: activities, fragments, services, content providers, async tasks, etc.

The book follows always the same structure: it will introduce you the concept that you are about to apply in your app, and right after that, you will introduce your new changes in the program; with all the new code in place, you will see a more detailed explanation of what you did. In my opinion, this is a great approach to fix the concepts in your mind, as you will understand every step that you’ve taken in a very simple way. However, you will find numerous errata in the code, and this could make you feel that you’re doing something wrong when that’s not the case.

Also, to start the development, you will need to use a library called “yambaclientlib.jar”, and the book provides a URL that, instead of pointing to the JAR file, it will take you to the Github repository of the library; what I had to do was to clone this respository, and inside the libs folder you will find the JAR file that you need in your application.

Finally, I was expecting to use Android Studio in this book, since Android Studio was released in the Google I/O 2013 and it’s the new IDE recommended by Google, but instead, you will use Eclipse and the ADT plugin.

Overall, I enjoyed reading this book, and I liked how clear and well explained were the concepts of Android development, but at the same time, it was frustrating to see all the those errors in the code; this will cause some beginner students to abandon the book.

I review for the O'Reilly Reader Review Program

A new version of Ruby (concretely, Ruby 2.1.0) was released on December 25th, 2013. It’s time to go through all the new features!

First of all, let’s make sure we’re on the same page; in your terminal, run the following command and make sure you have the version 2.1.0 installed in your computer:

$ ruby -v
ruby 2.1.0p0 (2013-12-25 revision 44422) [x86_64-darwin13.0]

New features

The most relevant changes introduced in Ruby 2.1.0 are: (release notes here)

  1. def's return value: no more void methods
  2. Rational and Complex Literals
  3. Refinements
  4. New Exception#cause
  5. New Garbage Collector

def's return value: no more void methods

In previous versions of Ruby, the return value of a method definition was always nil. Here we have an example:

$ irb
irb(main):001:0> RUBY_VERSION
=> "2.0.0"
irb(main):002:0> def test_method
irb(main):003:1> end
=> nil

However, in Ruby 2.1.0, method definitions return always a symbol that matches the name of the method:

$ irb
irb(main):001:0> RUBY_VERSION
=> "2.1.0"
irb(main):002:0> def test_method
irb(main):003:1> end
=> :test_method

This feature is very useful in those classes that are longer than usual. In old Ruby implementations, we used to have the private keyword followed by all the private methods, but in long classes this keyword was easy to miss out. Here we have an example of an old implementation:

module TestModule
  def public_test_method

    def private_test_method

Knowing that private can accept a symbol, in Ruby 2.1.0 we can combine the method and its visibility:

module TestModule
  def public_test_method

  private def private_test_method_1

  private def private_test_method_2

Rational and Complex Literals

In Ruby 2.1.0, the suffix i for complex numbers has been introduced:

$ irb
irb(main):001:0> (5+3i) + (2+2i)
=> (7+5i)

Working with rationals is also a better experience; the suffix r has been introduced as a helper for the Rational class.

$ irb
irb(main):001:0> (3/5r) + (2/3r)
=> (19/15)


In Ruby, all the classes are open; this means that we can modify classes without any restriction. Refinements are an elegant solution to apply our modifications only under certain scopes:

module URLBuilder
  refine String do
    def url_builder

class Article
  using URLBuilder

  def initialize(title)
    @title = title

  def build_article_url

As a result, when we execute this code, we will obtain:

irb(main):01:0> article ="My First Article")
=> #<Article:0x007f89f89d3080 @title="My First Article">
irb(main):02:0> article.build_article_url
=> ""

We can verify that String#url_builder only exists in the scope of the Article class so easily:

irb(main):01:0> "My First Article".url_builder
NoMethodError: undefined method `url_builder' for "My First Article":String
  from (irb):1
  from /Users/jorgecoca/.rbenv/versions/2.1.0/bin/irb:11:in `<main>'

new Exception#cause

Often when a lower-level API raises an exception, we would like to re-raise a different exception specific to our API or library. Currently in Ruby, only our new exception is ever seen by users; the original exception is lost forever, unless the user decides to dig around our library and log it. We need a way to have an exception carry a “cause” along with it.

This explanation can be found here.

In Ruby 2.1.0, now we can do something like this:

class CustomExceptionClass
  def method_with_exception
    cause = nil
      raise "2nd message" # RuntimeError
    rescue => e
      raise StandardError, "1st message"

rescue Exception => e
  puts "Caught exception: #{e.message} [#{e.class}]"
  puts "Caused by: #{e.cause.message} [#{e.cause.class}]"

The output of this code will be:

Caught exception: 1st message [StandardError]
Caused by: 2nd message [RuntimeError]

New Garbage Collector

Ruby 2.1.0 incorporates a new Generational Garbage Collector that replaces the old implementation of the stop-the-world mark and sweep algorithm.

The key idea and observation is that objects that are most recently created often die young. Therefore, we can split objects into young and old based on whether they survive a garbage collection run. This way, the garbage collector can concentrate on freeing up memory on the young generation.

Ruby has been always accused of putting performance in a secondary place, but with these changes we can see that the Ruby core team takes performance seriously.

Wow! 2013 is almost over, and looks like it was yesterday when we were celebrating the beginning of the 2013. It has been an amazing year, and I’d like to keep track of all the good memories; it’s gonna be hard to have a 2014 as good as 2013, but I’ll do my best ;)

Let’s start the review!



Without any doubt, dominating Android has been my biggest achievement in 2013. It’s true that I had some experience from college (in 2011), and Java is not a new language for me, but so many things changed in two years that felt like learning a whole new thing (Hello Fragments! xD).

In 2013, two new versions were released: Android 4.3 (Jelly Bean) and Android 4.4 (KitKat) with great new features. As for developers, the new Android Studio has been the best gift for us: a new IDE based on IntelliJ the make our life easier.


Also, in 2013, two new projects have kept my attention: Espresso and Chromecast. Espresso is a new framework for testing Android UI, and Chromecast… well, Chromecast is simply a great device to stream your media files to your TV (and it has been a perfect Christmas gift!).


Ruby on Rails

Rails 4 was released in summer, and it included a lot of new features. Although the first half of the year I worked on a project based on Rails 3.2, I’ve been following closely all the improvements and changes included in this new version. That’s why I prepared this small website explaining how to use all the new stuff.

Rails is, by far, my favorite web framework: simple, elegant, and it’s always one step ahead! And with the new improvements, it’s the perfect choice for your web projects. If you are new to Rails, the best tool to learn is Learn Ruby on Rails, by Michael Hartl.


St. Louis, MO | Farnsworth House, IL

During Memorial Weekend, we had the opportunity to spend a couple of days in St. Louis, MO. It was a great time in a city that we were visiting for the first time. Also, we visited the Farnsworh House, in Illinois. This house was designed by Mies Van der Rohe, the same architect that designed the Illinois Institute of Technology.

stlouis2 stlouis1 farnsworth

Park City Mountain & Salt Lake City, UT

Skiing in November? Yeah! In Park City Mountain it’s possible! We spent the Thanksgiving holidays in the incredible resort, where we met fantastic people. 100% recommendable!

skiutah DSCN0850 DSCN0867

Madrid, Spain

The last time I visited my country was in 2011… so many things have changed, but the city still maintains its beauty and charm.


My Telecaster :)

My new “best” friend!

Squier Telecaster

Swedish House Mafia

I’m not a big fan of electronic music, but this group of DJ’s is the exception. It was a great concert!

Glen Hansard

Glen Hansard, Lisa Hannigan, Millenium Park… and free! Best plan ever!



Three days of party in Chicago in the beach, surrounded by the “spanish crew”… wow! What a great summer!


Riot Fest

Pixies, Blondie, Rancid, Fall Out Boy, Blink 182, Bad Religion… I love Rock and Roll!



This is the result of thousands of hours listening to music.


Family & Friends!

Happy 2014