Daily Ruby Tip #2 – View gem source with Bundler

Here is a cool way of creating a link in Rails: $ bundle open 'some-gem' This opens the gem source in your default editor for inspection.

Daily Ruby Tip #1 – Ruby Hash params into URL

This is my new way of learning and promoting my intelligence in Ruby. My intention is to create a new Ruby tip everyday. These tips will come from all places and will certainly involve examples from work and frameworks. Here is a cool way of creating a link in...

What is the difference between Proc.new and lambda

Turning a block into objects is a super cool part of the Ruby language. There are effectively four ways to go about this: lambda, proc, Proc.new, and method(&block). I will focus away from proc since it is deprecated in future versions of Ruby, and Proc.new is essentially the same...

What is Ruby on Rails Optimization – the front-end

1) Install Page Speed for Chrome and Y-Slow for Fire Fox 2) Run the tests 3) Combine images into sprites 4) Reduce images size with losslessly compressing 5) Host large images on aws 6) Add expire headers and Cache-Control to images on AWS with Bucket Explorer; bucket explorer is old...

here is an elevator

This exercise was given to me recently. It represents an elevator. You call the elevator with a param of values, and the elevator comes to you stopping at each floor you’ve told it to. There are actually hundreds of hangups on this problem and hopefully I will gain more...

ruby on rails conflict

Popular things in culture sure do take the brunt of distain for nah sayers. In the last six months it seems like the number of tweets and conversations about Ruby on Rails downfalls for outweigh the benefits. My co-worker at FanChatter has indicated the framework may only good for...

twitter feed in sinatra using haml and json

Using Sinatra 0.9.2 this is an easy to way to get an updating single tweet in your application. I am using the most recent HAML gem ( haml 3.0.5 ). I am also deploying this application with Heroku, not that it will make a difference, but it may help....