• Recent Entries

    • How to check if object can be destroyed if it has dependent: restrict associations

      Rails provides several handy options for specifying how to deal with associated models upon deletion, for example: class Blog has_many :posts, :dependent => :destroy end The destroy value for the dependent option will call the destroy method for every post in the blog when the … more

      (No Comments)

    • Default request parameters in Rails functional tests

      I was looking for an easy way to force every request in a functional test in Rails to use a set of parameters by default, regardless of being specified explicitly. This is, every time I write: it “should get index” do get :index end Rails … more

      (No Comments)

    • InSTEDD at Pacific Endeavor 2011

      Pacific Endeavor is a humanitarian communication workshop, organized by the US Pacific Command, which brings together military representatives from all SE Asia, NGOs and industry leaders. Its main goal is to improve the multi-national communications in HA/DR situations, based on the premise that communication is … more

      (No Comments)

    • Using xmpp for mocking SMS channel in Nuntium

      For those of you not familiar with it, Nuntium is an open-source tool we developed together with InSTEDD for easily building applications that rely on SMS for communication. Even though several other kinds of channels are supported, such as email or twitter, text messaging has … more

      (No Comments)

    • Reuse code, not user experience

      Let’s face it: as a developer, I’m lazy. I just want to write just enough code. What is more, I want to reuse it whenever possible. I want it to be abstract. If I’m asked to implement a view which needs a sortable grid, one of … more

      (No Comments)

    • Thesis in Computer Science

      After a long time, I have finally finished my thesis to get the MSc in Computer Science degree, from FCEN UBA. It has been almost a year since I started working in the thesis in the context of Manas Research, and before that I had … more

      (No Comments)

    • Don’t make me think… nor work more than I’m supposed to

      Don’t make me think is a great book about usability and interaction design written by Steve Krug. One of the best things about it is that Steve has used the very same principles he preaches at in his book in the design of its reading … more

      (1 Comment)

    • Careful when truncating strings

      One of our Rails applications has to consume an RSS. Nothing fancy here, we simply wanted to extract some fields from each item and store them in the PostgreSQL DB (app was hosted on heroku). Simply slicing the string seemed to work at first: summary … more

      (No Comments)

    • Nuntium: exponential backoff and new xmpp library

      This week we’ve updated nuntium to version 2.8, yay! Aside from some minor bug fixes, nuntium now implements an exponential backoff strategy when a message delivery fails. Previously, it worked like this: A message failed to be delivered. If the cause was the message itself … more

      (No Comments)

    • Upgrading to Rails 3: @routes is nil

      I’m currently in the process of upgrading an application from Rails 2 to Rails 3. Fortunately, it’s not the first time someone does so, and there’s plenty of resources throughout the web that will help you to work it out. In particular, I chose to … more

      (2 Comments)