alex brie . net

Archive for the ‘Rails’ Category

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:

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.

16 Jan, 2008

Enumerable iterators (why I love Ruby part 2)

Posted by: Alex In: Rails| Ruby

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 col.select{..}.collect{..}.join(“, “)
For the curious, here’s a cool excerpt from the book, with Enumerable’s most [...]

07 Nov, 2007

Ruby Metaprogramming part 2

Posted by: Alex In: Rails| Ruby| Tips and Tricks

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 already do.
Today I was having a similar, yet more difficult problem: the [...]

02 Oct, 2007

Wurbe 2

Posted by: Alex In: PHOTO| Rails

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.

25 Apr, 2007

Setting up Rails and SQLITE

Posted by: Alex In: Rails| Ruby| Tutorials

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, most importantly, very easy to use with Ruby on Rails. All you need is the [...]

18 Apr, 2007

Functional tests with login in Rails

Posted by: Alex In: Rails| Tips and Tricks

My assignment this week, as senior Ruby on Rails developer for TrexGlobal (an US startup with some cool online apps for real estate investors that help you save lots of dollars on your taxes) was to add tests for some of the controllers in place.
Yes, I know, we should have used TDD(Test Driven Development) [...]

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 made
Analyze and Identify performance bottlenecks – in-memory, sql query exec

27 Mar, 2007

Rails on a Mac – 1-2-3 noobie guide

Posted by: Alex In: Rails| Tutorials

Warning! This is not a full-blown tutorial, rather a quick step-by-step intro on what you have to do to run Rails on your Mac, if you are a noobie who just heard of Rails and wants to have it running on his computer ASAP:

Step 1 – Get Rails – Rumours say that in the [...]

Comments Off

aboneaza-te la blogul meu

Categories

About

This is an example of a WordPress page, you could edit this to put information about yourself or your site so readers know where you are coming from.