Quotations to live by

Posted by science on November 28, 2007

Interrobang

There are plenty more quotations for your lifestyle at the kind host of Science: www.misuse.org

Little Bobby Tables

Posted by science on November 19, 2007

Little Bobby Tables

Split and Join: Using Ruby arrays and CSV files as databases 1

Posted by science on November 09, 2007

Splitting wood

If you mess around with CSV or other text delimited files and you use Ruby, you should know all about String::split and Array::join. If you don’t, here’s a quick primer. Split allows you to break up a string into elements of an array based on a delimiter (it returns an array). Join will merge an array into a single string, using a delimiter to separate the array elements.

Continue reading…

Determing File Paths for Action Caching in Rails

Posted by science on November 08, 2007

Path

I just spent some “quality time” figuring out how to programatically determine the location of an action cache file in Rails. “cache_action” is a great tool and when applied properly can really save cpu. To find the file locations for this cache you could clearly hack your way in, but it’s harder than with page caches, because the *machine name* is included in path. Hassles!

Continue reading…

Close enough

Posted by science on November 01, 2007

Iraq/n