Archive for February 2011

Ruby beats Perl for UTF-8 handling

Just had to write a script to do some processing on a tab-delimited file that contained some Hebrew UTF-8 chars, including a json chunk containing some Hebrew. Major headache with Perl – either got ‘wide char in subroutine’ errors, or escaped codes in the JSON. Needed to compare the UTF-8 tab-delimited fields with specific pieces of JSON, and have them both handled as UTF-8. Tried use utf8; binmode(STDIN, ':utf8') and various other permutations, but couldn’t get the output to look the way I wanted while keeping all the subroutines happy.

Implemented the same thing in Ruby, and it just worked. I’ve been a Perl girl for years, but am leaning Ruby…

Varnish -drop in website cache / accelerator

Check it out – Jeff Su, a developer on our team at Factual.com has had really good results using Varnish, written up here:

A Practical Guide to Varnish

For sites that need to ramp up suddenly, this could be a lifesaver…