Recent Entries
-
31 Jan 2012
How to check if object can be destroyed if it has dependent: restrict associationsRails 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)
-
2 Dec 2011
Default request parameters in Rails functional testsI 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)
-
21 Sep 2011
InSTEDD at Pacific Endeavor 2011Pacific 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)
-
7 Sep 2011
Using xmpp for mocking SMS channel in NuntiumFor 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)
-
15 Jun 2011
Reuse code, not user experienceLet’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)
-
5 Jun 2011
Thesis in Computer ScienceAfter 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)
-
9 May 2011
Don’t make me think… nor work more than I’m supposed toDon’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)
-
20 Apr 2011
Careful when truncating stringsOne 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)
-
30 Mar 2011
Nuntium: exponential backoff and new xmpp libraryThis 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)
-
18 Mar 2011
Upgrading to Rails 3: @routes is nilI’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)