The calendar is gone.
Click here to view posts


Writing efficient ruby code
My work just bought me a safari book shelf. The first thing I read was a shortcut called "Writing Efficient Ruby Code"[1](WERC). I liked that it explained how ruby is implemented. I have often wondered how ruby worked at the most basic levels. It also goes in to details about little things like the performance of double quotes vs single quotes. My practice is to always use double quotes which a coworker raised the question of the performance. According to WERC they are processed the same so there is no performance difference. In my own benchmarking found the same results as WERC for the in place editors (! methods), each methods and for loops, and the any? methods. Some notable parts the disk io including the image_tag helper in rails, faster blocks, how variables work, open classes vs mixins and using require in rails. It a quick read and most of it I was already practicing. One really cool feature is he talks about the differences in the ruby 1.9 code. I would suggest adding it to your bookshelf or picking up a digital copy if you use ruby in everyday life.

[1]Addison-Wesley Professional Ruby Series Writing Efficient Ruby Code by Dr. Stefan Kaes
[2] Stefan Kaes site