Groupon Experiences - First Month July 2014

September 29, 2014 - 3 minute read -
ruby rails groupon

Beginning things

Its been around three months at Groupon. Personally I don’t like Chennai very much, owing to lack of basic infrastructure in the city like internet, public transport and much more… Office here is a much much cooler (in all ways you can think of) than rest of the city! People in office are great. Managed to make some new friends here.

In the first month in Groupon, I was a temporary part of the Tools team which works in Ruby on Rails. RoR wasn’t hard to learn for me considering that I mapped it to Django. Although Django follows the MVT concept (Model - View- Template), the MVC (Model - View - Controller) followed by RoR was very much similar. The mapping is as follows -

  • Django Model to Rails Model
  • Django View to Rails Controller
  • Django Template to Rails View

First of all I was a bit uneasy with Ruby and its strange looking syntax. One pain was putting the end tag after each and every if, ‘for’, ‘while’.. Had to adjust the editor since Ruby follows standard indentation of two spaces opposed to four for Python. But indentation in Ruby is just for separating the content like ‘i=0’ and ‘if i > 0’, and it doesn’t really seems to bother much about the indentation anyways. And Ruby also has a wierd datatype - symbols, which is like :entry. Its basically a simple string in Ruby stripped off a lot of unnecessary methods attached to it. Hence somewhat lightweight. The syntax of the :symbol often confused me with the Python dictionary.
But after these initial strangeness, I started to like the Rails framework. Some good things about it were - resources which make things so much RESTful, the auto-generation of various paths like new_resource_path. Models could be created with ease and relationships like foreign keys could also be added pretty easily.

Comments Section

Feel free to comment on the post but keep it clean and on topic.

blog comments powered by Disqus