Hulu.com is a success
Be the 1st to comment!

I love hulu.com. Try if if you haven’t. My entire family uses it to watch TV. In fact with it, and some other video sources (Blockbuster.com, torrent and other net sites) our family is considering dropping cable all together.

Apparently hulu, written in Rails by the way, is on target to make $90 million in its first year. Way to go Hulu and congrats.

Full article here.

Date Validator for Rails
Be the 1st to comment!

This week on a project I had the need to signal the user when they had entered an invalid date for a date field that wasn’t required. But I needed to show the error even if they entered a bunch of garbage into the field. Unfortunately in Rails, if you attempt to set a string into a Date field it doesn’t set at all, and so when the validator fires there is nothing to validate and since the field isn’t a required field, no error is displayed.

After searching the net extensively, I found this ruby class for adding a validates_dates function. It is very helpful and not only solved my problem, but also gives the users a few shortcuts for entering the date, such as the following examples.

+6days, +6d, +6, +2w, -6m, +1y

It also allows you to define, in the validation usage, a from and to range that the date should be within. For example, a person’s renewal date should not be before their created_at date, or limiting a date field to be beyond today.

validates_dates :birthday, :from => '1 Jan 1920', :to => Date.today, :allow_nil => true

The snippet is here.

YellowPages.com on Rails
Be the 1st to comment!

RailsonWave.com summarizes the recent talk at RailsConf 2008 regarding YellowPages.com’s move from Java to Rails. They serve up 23 million visitors a month. The conversion resulted in 20,000 lines of Ruby code instead of 125,000 lines of Java code, and most importantly eased the difficulty they had in maintaining it. Once complete, and optimized their site is now faster than before. They also completed the rewrite in three months with four developers. You can read the entire write up at railsonwave.com.

RailsConf 2008 Overview
Be the 1st to comment!

I wasn’t able to attend but for those of you like me, RubyInside has a great summary of the entire thing: The Mega RailsConf 2008 Round Up.

Bookmarks of the Week – June 3rd
2 Comments

21 Ruby Tricks You Should Be Using In Your Own Code Great Ruby tips here. Keeping this open in a browser tab and trying to use the tips throughout the week.

XMLMate TextMate plugin: “Check XML and XHTML documents for Well-Formedness and Validity while editing them in TextMate with support for DTD, W3C XML Schema, RELAX NG, Schematron, XInclude, XML Catalog, and XPath 2.0 Visualizer.”

Elements of Design Great collection of web design elements but together by Christian Watson. Great for inspiration.

Rails Widgets Nice Rails plugins to assist in creating navigation bars, tabs, tooltips, show/hide toggling, and tableizer.

Page 3 of 7«12345»...Last »