Reno, NV    +1 (800)0 621-0871

Go back

Development | Industry | Ruby on Rails


  |  June 6, 2013


Well yeah, it’s the last day of my internship here at ÆLOGICA, and as I am typing this post it feels quite nostalgic — even though I only stayed for a month and a half.

Initially, I was tasked to make an open source contribution to GitLab. Specifically, they wanted me to implement my own version of GitHub’s contributors graph and send that as a pull request to GitLab. Before doing the task itself, I spent about 2 days trying to familiarize myself with Ruby and a bit of Rails just to understand how the data flows through each component and other stuff.

I also had to setup the development environment which actually was very enjoyable (probably where I enjoyed the most). I got GitLab’s vagrant vm for that. I ran into some undocumented errors though so I spent about a week trying to get that vagrant vm to work. Well in retrospect, running into those errors made my understanding of vagrant and chef a bit deeper.

After setting up the dev environment, I then started to familiarise myself with GitLab’s codebase specifically on how GitLab talks to each of the git repos. I found that out soon and started to inject my own commands through the interface. This allowed me to retrieve the logs from each repository.

With the logs retrieved, I needed to parse them into a form where I could segregate the number of commits, additions, deletions per author. I used ruby’s hashes for this (nothing surprising there, hohoho).

With the logs parsed, I needed a way to graph these so I decided to use d3.js. I went with d3 because this was what GitHub was also using. At first, d3 was really hard to understand but I think it pays off at the end because d3 is a very powerful library. I really admire how d3 ties the data to the object itself. Genius!

And that was it, but… I realised that my code wasn’t really that clean. I copied and pasted methods, I named my variables vaguely and I coded just to make everything work. Knowing that GitLab was an open source project, I needed to create maintainable code. This concept introduced me to some design patterns and test driven development. I really enjoyed this part because it’s definitely a new concept for me. It had a high learning curve at first but I think I quite get it now.

I also learned some CoffeeScript. It allowed me to create classes in JavaScript with ease which allowed me to further clean up my code.

I used Jasmine and RSpec for my tests.

And then I submitted the pull request! (I actually think it’s going to get merged. Yey!)

UPDATE: Not only did it get merged, Karlo was also named MVP by the GitLab team – Ed.

Aside from submitting the pull request, I also got to meet the local Ruby community here in the Philippines and I also gave a short talk on my open source contribution request. I also got to pair with others here in AELOGICA and I really learned a lot with regards to producing production level code and deploying code to remote servers. I got to learn some of the best practices from the best people.

What really helped me get through this were the people here, they taught lots of new stuff and I couldn’t have learned any of these new technologies on my own. They also definitely sparked my interest in emerging web technologies by just being with them. They really are passionate about what they do and they have that initiative to improve even more. It’s contagious.

Thank you AELOGICA! (Can I have a shirt, please?)