Beyond the 10,000th gem install of Rails

All the latest attention have spurred downloads of Rails to new heights and we just surpassed the 10,000th gem installation of Rails (not counting all the beta gem installs or svn:external setups)! On top of that, we have some five thousand downloads of the zip/tgz version for a total of around 15K in combined downloads. This encompasses all versions, so naturally there’s plenty of overlap and this doesn’t translate into 15K people working with the Rails (yet!).

So on this occassion, I’d like to take this opportunity to thank instead of berate other projects that have proven influential to the development of Rails.

Thanks to PHP for getting me into programming and teaching me how much immediacy matters. Thanks to Smalltalk for being an inspiration so far ahead in many areas where we’re still scrambling to catch up. Thanks to Java for being the birth place of many great ideas in frameworks such as Struts, Tiles, WebWork, Hibernate, and more.

Most importantly, of course, thanks to Matz and the Ruby community for proving such fertile grounds for creativity and achievement.

And now, let’s all hold hands and sing songs about spreading love, not hate.

'That application is so stupid'

Just as Patrick Lightbody recants his ill-guided charge, Geert Bevin — also involved with a Java web-framework, this time RIFE — picks up the torch and tries his best to scorch the earth anew:

About tadalist, that application is so stupid that I’m wondering how the hell it could have taken him 600 lines to write it. Also, the hugely hiped ‘killer application’ of RoR, Basecamp, is a total fraud imho. The screenshots look nice, and are nicely presented. So I did make an account and started using it. And honestly, everything they say is true, it sets itself apart in simplicity. Not difficult to write that in a few weeks.

It’s incredible how much vile bile that lies within the Java community. I’m beginning to understand why many of the defectors I’ve talked to are so happy about the Ruby and Rails communities. Oh well, back to the stupid, fraud applications.

Programmer needed for JSP to Rails conversion

Gately’s would like to dump their JSP-powered shop and upgrade to Rails. They’re looking for Rails talent to help them do just that:

We need a developer who is proficient in (and hates) JSP for a contract-to-hire position which would involve replacing a JSP app with a Rails app for a growing e-tailer in the Denver, CO area. Would prefer local talent, but would consider teleworkers from anywhere with the right skills. Please contact me (Solomon White, solo [at] gatelys [dotcom]) if you feel you might be a fit.

"I think Ruby on Rails is way over hyped"

Patrick Lightbody is on the steering committee of the Java web-framework WebWork and not at all happy about all the attention Ruby on Rails is gaining. Apparently, it’s all terribly undeserving as Rails surely “doesn’t scale” to applications with “thousands of concurrent users and/or hundreds of thousands of gigabytes”, right?

Of course, Patrick doesn’t bother to back up his charge besides asserting that “anyone… knows that a CRUD framework just doesn’t cut it”. Interesting. Rails follows a similar approach to scaling as do Yahoo and LiveJournal. Share Nothing. Push concurrency into the database and the memcache. I hear that approach is working rather well on LJ’s 100 machine park handling 5+ million dynamic requests per day.

But why bother addressing the specifics when you can just assert the somewhat cryptic “Mapping web UI directly to the DB never scales”. What does this mean exactly? Does Patrick think that the only UI you can do in Rails is a scaffolded one? Oy, talk about forming ill-informed opinions.

If any of these vague, hand-waving assertions should have failed to convince you, then of course, we can always rely on our good friend complexity!

Form processing, payroll, etc probably work very well with RoR. But trying to implement Spoke using RoR would be impossible — the schema is just too complex.

I’m sure it’s too complex, Patrick. Can’t beat an expert at his own game. But since you’re interested in learning more about marketing your open source wares, you might start by dropping the FUD tactics. They leave such nasty stains of ignorance and bitterness.

Brian McCallister offers a similar rejection of Patrick’s fear mongering:

It is scary (FEAR FEAR) to see opinions formed, and backed with vitriol, by fear that something different than what they are doing works better. Something you don’t know that approaches the same problems as something you do know does not make the first thing bad. It does not justify lashing out at it saying “it is just [foo] and sucks so bad compared to [bar] and can never [scale|perform|manage|eat] enough to be used for [serious|difficult|real] things.” Possibly this is true, but reacting that way out of fear certainly does not make it so.

Now back to our mega-scala-enterprisy-serious-real-complex-important work. Nothing to see here, move along.

Welcome Slashdotters!

We’ve been part of a Slashdot posting once before, but this is the first time that Rails is actually the primary topic of one. So a proper welcome to all the Slashdotters flowing in from the article about Curt Hibbs’ great new Rails tutorial on O’Reilly’s ONLamp.

Hopefully we’ll survive the onslaught and a few will stick around!

Matz takes note of Ta-da and Rails

Matz — the creator of Ruby — noted the launch of Ta-da List and the fact that it’s 579 lines of Ruby on Rails code today. What a great honor, but unfortunately, I can’t read Kanji (which I’m ignorantly guessing this is). Perhaps someone could translate?

Rails tutorial on O'Reilly's ONLamp

Curt Hibbs has written a great tutorial called Rolling with Ruby on Rails. It takes the reader through setting up Ruby on Rails, scaffolding an application into immediate use, and tailoring the results. It’s focus is especially on setting everything up and using it with a Windows machine. It has been published by O’Reilly with their ONLamp.com site. A small note from the introduction:

What would you think if I told you that you could develop a web application at least ten times faster with Rails than you could with a typical Java framework? You can—without making any sacrifices in the quality of your application! How is this possible?

I’m always hesitant to provide any exact measures of productivity increases, but the 10x number has been echoed by more than a few of the Java programmers I’ve known coming over. Of course, most projects involve lots more than just programming, so this would hardly mean a project completed 10x — or whatever multiplier you fancy — but the difference is indeed startling.

In any case, awesome work, Curt! Let this serve as an encouragement for other Railers to spread the good work by getting their knowledge published by outfits like O’Reilly.

Ta-da goes international with UTF-8

One of the simplest ways to make your application more welcoming to non-English speakers is to allow them the right of the native language. Before UTF-8 that was a huge mess of encoding types, but now all it takes is one line. One single meta setting and you can allow for:

The magic string is:

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />

Make your Ta-da list today

Todo lists have long been one of the favorite features in Basecamp, so we thought it would be a nice experiment to share that particular feature with the world at large. Free of charge. And Ta-da List was born!

A few user-oriented highlights of Ta-da:

  • Extensive use of XMLHttpRequest: Adding new items and checking them on and off are done with remote calls that change their state in the database while simultaneously updating the view using Javascript. This makes it really, really fast to add new items to a list — and you’re not restricted by the 10 predefined fields that most apps like this does.
  • Loose sharing with unique URLs: Sharing a list with a single or group of buddies is easier than ever as there is no password to remember. Instead, everyone just gets a unique URL that they can bookmark right away. At 32 characters and as a MD5 hash, it’s plenty of security for this type of application and much easier to use.
  • Collecting all the shares: By allowing you to share any list with any email address, we already got the viral thing going. The barrier of signing up has been postponed until you’re hooked, and once you are, you automatically collect all the shares as you signup. This means that they’re all available from your dashboard and you can reduce the bookmarked lists down to one URL.

And for the technically inclined:

  • Three levels of caching: I implemented page, action, and fragment caching for the Action Pack in Rails so I could be able to use it in Ta-da. And it’s working exceedingly well. Lots of pages went from 50-70 req/sec to 400-1100 req/sec due to caching.
  • 579 lines of code: That’s including models, controllers, and helpers. It’s really lean and really readable too. It was great to see just how small you can make an application with a recent version of Rails (especially the 0.9.x series) on a fresh code base. In Basecamp, I’m often working on code that predates the release of Rails, so it’s a nice change of scenery.
  • Finally FastCGI: Basecamp is still running mod_ruby for various reasons, but Ta-da is fresh out the gate on FastCGI. And what a difference it makes in memory consumption! We’re currently running five FCGI processes (which is more than plenty) that come in at about 15MB a piece. On top of that, we got 50 Apache processes at just around 3.5MB a piece. That’s just 250MB for the entire setup. Much unlike the situation on Basecamp where we have 40-60 Apache processes of 40MB a piece.

In addition, it seems we’re off to a flying start as we blew through 1,000 people signed up in just a matter of hours! And it’s getting blogged all over the place. Justin French has a really nice post about how he switched his workflow over. And Tobias Luetke already whipped up a script to integrate Ta-da into your site using Ruby.

Rails 0.9.4.1: Cleaning up the mess

Seems like the 0.9.4 release required a public launch in order to find the last snags. No game, no pain, or something. The changes are:

Action Mailer

  • Fixed sending of emails to use Tmail#from not the deprecated Tmail#from_address

Action Pack

  • Fixed bug in page caching that prevented it from working at all
  • Fixed a bug where cookies wouldn’t be set if a symbol was used instead of a string as the key
  • Added assert_cookie_equal to assert the contents of a named cookie

Active Record

  • Fixed that the belongs_to and has_one proxy would fail a test like ‘if project.manager’ — this unfortunately also means that you can’t call methods like project.manager.build unless there already is a manager on the project #492 [Tim Bates]
  • Fixed that the Ruby/MySQL adapter wouldn’t connect if the password was empty #503 [Pelle]

Rails

  • Added 5-second timeout to WordNet alternatives on creating reserved-word models #501 [Marcel Molina]
  • Fixed binding of caller #496 [Alexey]

…you may need to use “gem install rails”, and not just “gem update”, to install the latest version.