Author Archive
Reboot
Podcast: Play in new window
| Download
Today, just a quick message outlining the future of Rails Coach.
Read More →
032 RC CoffeeScript
Podcast: Play in new window
| Download
CoffeeScript is a language written by Jeremy Ashkenas that compiles to Javascript. Its syntax is much more friendly than native JavaScript. Especially if you’re used to languages like Ruby or Python.
As or Rails 3.1, CoffeeScript is available by default and a coffeescript file is created in /app/assets/javascripts every time you run the scaffold generator.
A...
031 RC Generators
Podcast: Play in new window
| Download
A generator is a way of creating code from the command line. Rails has several of these built in, including generators for models, controllers, tests, helpers, scaffold (models, views, and controllers that support Rails’ RESTful routing), and much more.
Generators are actually relatively simple. They are made up of two parts. The generator itself, and...
030 RC NoSQL
Podcast: Play in new window
| Download
NoSQL is a terrible term for a collection of widely varied databases. You have key-value stores like Redis, Tokyo Cabinet, Memcached, etc. You also have document databases like couchDB and mongoDB. Finally you have column based systems like Cassandra. And still others like HBase.
In a lot of cases, there are gems for these. I’ve used several of them...
028 RC Backbone.js
Podcast: Play in new window
| Download
I’ve been using Backbone.js for a few weeks and really like the way it helps you manage your data on the client side. It’s also a terrific way to keep your UI in sync when your data changes through Javascript events.
Read More →
029 RC Ruby-doc.org
Podcast: Play in new window
| Download
One of the most handy websites out there for people trying to find specific API’s in Ruby is ruby-doc.org.
From the main page, you can search or select your Ruby version.
From the core page, you can narrow down the class or method you’re looking for.
From the std-lib page, you can read docs and see where different aspects of the programming language...
027 RC Vim
Podcast: Play in new window
| Download
I’ve been using VIM for a while to do my development. It’s a terrific text editor that has been around for quite some time. Here’s the rundown of what I’ve got set up.
MacVim: http://code.google.com/p/macvim/
Janus: https://github.com/carlhuda/janus
I’ve also found a few resources to help me get better with Vim as well. Here...
026 RC Counter Caches
Podcast: Play in new window
| Download
A counter cache is a handy way to speed up queries where you only need the number of an associated model rather than the entire collection. In your code, you might see something like this:
@post.comments.count
When you run this code, you wind up with another query to the database to get that number. That’s not a big deal until you have that count being...
025 RC Eager Loading
Podcast: Play in new window
| Download
Eager loading is a terrific way of speeding up your response times. Let’s consider a piece of code that pulls a list of associated objects from the database. For example, a view that displays the posts written by a given user:
<% @user.posts.each do |post| %>
<%= render post %>
<% end %>
(I know that partial has a collection option...
Tags: database, eager loading
Rails 3.1 Asset Pipeline
Podcast: Play in new window
| Download
Assets in Rails before version 3.1 were kept in the /public folder. In Rails 3.1 they’ve been moved to /app/assets and function in a slightly different way. Here are some of the highlights:
Javascript assets written in Coffeescript will now be compiled to Javascript.
CSS assets written in SASS or SCSS will now be compiled to CSS
Other templating...

