Arhive etichete: Rails

Always index your tables. Always

ireadwhite Always index your tables. Always
This is going to be brief one: iRead.ro, one of the projects I’m working on during my spare time, was giving me major headaches lately - 2 weeks ago, it took like 15 seconds to render a page. In the…

10 Ruby programming tips you should already know

Other blogs about Ruby or Rails have already touched some of the tips I’m going to show, but it never hurts to remind you these small recipes aimed at Ruby novices:

Dreamhost and mod_rails for your tiny Rails application

To my shame as a rubyist, it was only a couple of hours ago that I found out, while reading Ruby Inside about mod_rails and the wonders it does for the Rails community.

Enumerable iterators (why I love Ruby part 2)

Got myself a sleepless night recently and killed some time reading the Rubyisms in Rails book. The chapter about Iterators was particularly pleasant, reminding me the beauty of Ruby’s Enumerable class - feels so Lisp-ish and Scheme-ish to write stuff like…

Ruby Metaprogramming part 2

Last time I discussed Ruby and metaprogramming, I was trying to stay DRY (Don’t Repeat Yourself) while coding some very similar-looking methods. The solution, then was to use class_eval to dynamically add methods into the current class, the way attr_accessor and it’s peers…

Wurbe 2

Am fost aseara la wurbe2, eveniment desfasurat la sediul Adobe. Buni baieti cei de la Adobe, ne-au dat wifi, sucuri, badge-uri de vizitatori si, mai ales, pizza - multe, multe pizze, cat sa se ajunga si sa mai si ramana.

Ruby: create your code on the fly

Ruby is so powerful it scares me. I’m far from even grasping how powerful it is. Whenever I discover something cool to do with it, I have the urge to tell it to the world.

First, here’s the context:
I’m currently working…

Setting up Rails and SQLITE

If you are interested in web, databases and the like then you probably already heard of SQLITE. If not, here’s a quick intro
SQLITE is a database engine that uses just one file per database. It’s tiny, simple to use and,…

Grepping in Ruby

You can’t call yourself a programmer if you never used Grep (or diff, or wget, or regular expressions for the matter). I couldn’t call myself a programmer till the fourth year of college, btw.. :)
Still, grep has a pretty big manual…

Ruby on Rails - 1-2-3 to performance analysis

My cool colleagues from Trex Global gave me an unusual assignment this week: profile the current implementation of our first two apps, DeferEm and DepreciateEm.

Among the requests, the usual ones:

Request response duration
Execution profile of flow (path taken, time in methods)
SQL Queries…