
Some handy links from my rails conf presentation on search techniques in Rails.
The Presentation itself (pdf format) - CRUD isn’t spelled with an S: Advanced Searching in Rails (or original powerpoint format - much larger)

Some handy links from my rails conf presentation on search techniques in Rails.
The Presentation itself (pdf format) - CRUD isn’t spelled with an S: Advanced Searching in Rails (or original powerpoint format - much larger)

“The concentration of C02 measured by scientists at the Mauna Loa Observatory in Hawaii now stands at 387 parts per million, the highest level for at least 650,000 years.”[1] “It’s getting kind of hot back here”[2]
Science happily releases “deep_merge” - a ruby lib to help merging complex hash structures.
Ruby provides some nice merge capabilities in hash and array. But it rightly doesn’t give us recursive merging, because it’s too poorly defined to standardize. However, recursive merging sometimes solves problems that can’t be solved other ways. Continue reading…
(from American Scientist magazine, Mar-Apr 2008)
Previously Science and wayneseguin published a study looking at the performance of nginx fair proxy. To take that a little further, Science conducted an examination of how Thin and Mongrel compare head-to-head on performance. For kicks we took a look at Rails page template caching facility to see if that significantly impacts performance (it does). Full details follow..
By science & wayneeseguin
Thin a new-ish application server, primarily designed for serving the same community as Zed Shaw’s (and now community managed) masterwork Mongrel. Its job is to dispatch web requests, primarily Rails and other Ruby frameworks. There’s plenty already written about Thin, to get you up and running.
I’ve been eying Thin and thanks to Wayne, I got motivated to test it out. He and I spent the better part of a day doing configuration analysis and performance testing on Thin in the context of EngineYard’s hosting environment. We had access to a brand new, unloaded “slice” (aka web server) on their server farm. The stack we used looks like:
Load balancers => Nginx => unix sockets => Thin => Rails
We ran a quite a few performance tests against Thin using the above setup and overall liked what we saw.
There may be much easier ways to do this but Science wrote a nice little regular expression which will convert your numbers to comma delimited strings in pure Ruby. It demonstrates some cool features of Ruby from which maybe you will learn!
Continue reading…
A couple of great blog posts have come out in the last year, dealing with how to squeeze more performance out of Ruby on Rails. These techniques are actually massively improving the performance of Ruby on Rails, so much so that I’m starting to think of Rails less as an Application Framework and more as an Web Page Template Generator.
Science releases MojoMagick, a Ruby language image library “that does very little” ™. There are several useful image tools that “do a lot” - MojoMagick is designed to just a few things: Continue reading…
Passing multiple arguments in Ruby is easy. You can pass any number of arguments, and even vary the class/types according to context. You can even vary the number of arguments passed. The receiver has to deal with this somehow, but even that’s pretty easy to manage. It’s a little trickier if the receiver has to delegate an unknown number of arguments to another receiver, but the * does the job for you - a great example of Ruby syntax that works for you. What follows is some simple example code to illustrate the idea. Continue reading…