Our Blogs

Partitioned Graph Coloring

Before going into how to solve the partitioned graph coloring problem using integer linear programming (which is the goal of my thesis), I thought it would be a good idea to actually explain what is the partitioned graph coloring problem (or PCP from now on). Graphs and partitions First of all, graphs. Formally, a graph [...]

What is Linear Programming

Despite being able to simply provide a link to wikipedia’s already excellent article on Linear Programming, I wanted to provide a short introduction in order to present what I am doing exactly on my thesis in a future article. Linear Programming is best described as a technique, in which we want to maximize or minimize [...]

Making a thesis 2.0

Continuing with the tradition started by Beta two years ago here in Manas, I am now dedicating all my efforts to finish my thesis in order to obtain my MSc degree in Computer Science at FCEN-UBA. Having started it a few months ago, Manas generously started sponsoring my work in May, so I can deal [...]

Building an application to track expenses in one hour using GeoChat

Whenever one of our team member travels to another country we tell her to track expenses like food, transportation and accomodation so that later that money can be refunded. Each of us does it in a different way: we write it in a notes application in a cellphone, or in a text file in our [...]

Install the RMagick gem in the painless way with Homebrew

Introduction
Disclaimer: this section is just happy talking, if you want to get right to the beef, skip it and go right to the beef.
Yesterday was a sad day for me. It wasn’t meant to be like that.
I began the day with the intention of setting up a development environment for this amazing RoR application I’ll [...]

Quick way to test many values in ruby

Many times we end up having similar tests: same logic but different inputs and expected outputs. For example, suppose we need to test our brand new sqrt function:

test "sqrt 1" do
assert_equals 1, sqrt(1)
end

test "sqrt 4" do
assert_equals 2, sqrt(4)
end

test "sqrt 9" do
assert_equals 3, sqrt(9)
end

Here we are dupplicating code, since “assert_equals [...]

Deleting children with accepts_nested_attributes_for in Rails

in

On the previous post I wrote a few lines on the basic usage of the accepts_nested_attributes_for method in rails models. I strongly recommend reading that post before this one if you haven’t. Although there is a standard way for deleting items, there is few information on how to deal with them on the model or [...]

Handling children with accepts_nested_attributes_for in Rails

in

Rails makes it easy to build HTML forms associated to a certain model. Simply using the form_for instruction on the view, writing a simple update method in the controller and setting validation logic on the model, makes standard CRUD operations incredibly easy to code. Since version 2.3, Rails also provides a convenient way of dealing [...]

Status Update

It’s been a while since the last time I wrote something here. I realize I’ve promised several posts which never got written, such as some experiments with bizarre random number generators, the architecture of the silverlight DynamicDeepZoom app we hacked toghether with Martin for Codecamp 09, and the full code for the silverlight PagingListBox (which [...]

String concatenation in ruby

I just found out the difference between += and << when used for a string.
irb(main):001:0> str = 'chan'
=> "chan"
irb(main):002:0> str.object_id
=> 69952758899780
irb(main):003:0> str += 'ged'
=> "changed"
irb(main):004:0> str.object_id
=> 69952758848800
irb(main):005:0> str << ', now not'
=> "changed, now not"
irb(main):006:0> str.object_id
=> 69952758848800
So I think that basically you should never use += for strings, unless you really want to hurt the [...]