Leo's Technical Blog
user

Leo's Technical Blog

Mostly about computer programming.


Featured

ruby, slides

Java Day Presentation: "Ruby, Programando para Humanos" (Spanish)

Posted on .

Introducción a Ruby View more presentations from Leonardo Soto The slides are actually just a shell for the examples which can be seen here.…

Featured

java, ruby, inacap

Speaking at "Java Day", sponsored by INACAP Osorno

Posted on .

What!? Didn't I hate Java? Well. not exactly. I do think that it is used for a lot of tasks in which a more powerful language should be used instead. For example, I think that doing web development in Java on 2011 is similar to have been doing web development…

Featured

tips, ruby

Quick Solution: MySQL gem on Snow Leopard

Posted on .

A few days ago I got the following error on a Rails application (after installing the mysql gem) on Snow Leopard: Error: uninitialized constant MysqlCompat::MysqlRes If you ever encounter this problem, uninstall the gem and reinstall it in the following…

Featured

python, ruby, chile

Dynamic Languages Meetup in Santiago de Chile!

Posted on .

This Wednesday is the second meeting of the Dynamic Languages group. The first one was great, with more attendance than expected: ~20 enthusiast, all of them quite passionate. We had a good time meeting each other and learning what we expect of the group we ar…

Featured

ruby, rails

Loading Rails Fixtures Without Deleting Existing Records

Posted on .

This blog post by choonkeat explain how to overcome the ruby limitation which forbids the use of the "class [name-of-the-class-to-monkeypatch]" statement inside methods. Why would you need this? I just used it to define a db:fixtures:insert task, which differ…

Featured

ruby, rails, asking

Rails Migrations Gotcha: Backward-Incompatible Model Changes

Posted on .

I'm pushing for adoption of Rails Migration on all Rails projects on my job (we use them on a few). As a consequence, I won the assignment of writing migrations for the last changes on the system I'm currently involved. That seemed easy, but it wasn't. I will…

Featured

tips, ruby, windows

Reading a Binary File on Ruby

Posted on .

No, it is not as simple as: contents = IO.read(path_to_binary_file) Because it does not work well on Windows platforms. In code meant to be compatible with Ruby 1.8 you should do: contents = open(path_to_binary_file, "rb") {|io| io.read } Obviously, th…