-
Recent Posts
Recent Comments
Archives
Categories
Meta
Advertisements
You can use an ActiveRecord scope from one model to scope queries on another that joins it. This can be very convenient and keep your scopes DRY. class Post < ActiveRecord::Base belongs_to :user scope :recent, lambda { order(:updated_at).last(10) } end class … Continue reading
Here’s a useful tip for testing rails routes in the console: include ActionController::UrlWriter default_url_options[:host] = ‘hostname’ Then you can just type: users_url users_path etc. Nice!
I’ve only read a few pages of Mark Pilgrim’s Dive Into HTML5, and I already love it. The first thing that you’ll notice is that the pages are beautifully laid out with retro typographical elements. This gives the site a … Continue reading
In my last article, I posed an off-the-cuff model of skill development in order to illustrate a point about when we ought to improve our programming technique and when we ought to spend our time on other things. Today I … Continue reading
There are many times when programmers should study programming, such as when they are first starting out, or in the process of solving some especially difficult problem. For certain developers, however, improving one’s programming skills seems to be a kind … Continue reading
The law of requisite variety has fascinated me since I first learned about it several years ago in a course on cybernetics and design. The law is rigorously defined in W. Ross Ashby‘s Introduction to Cybernetics, but for our purposes … Continue reading
My name is Nick Urban. I’m a web developer with a penchant for philosophy. I love the startup world for its energy and innovation, but I think it can be rather shortsighted at times. I’m starting this blog as a … Continue reading