Entire ActiveRecord/Ruby Thread 0wned by a Single Comment

Okay, first off, Obie Fernandez should really take down this post which understandably rubs many of our java friends the wrong way.

He meant it to be humor but it’s not very obvious at all that he’s joking…

That among a few other articles recently have started a major Ruby backlash, like this post.

It’s one thing to have intelligent debate & discourse, another to call people “Ruby on Rails bigots” which admittedly Obie was being in that (non-humorous) post.

Cedric in turn links to Bob’s post where in the comments they proceed to rip into Obie personally & professionaly. (that’s what you get when you offend the largest group of programmers in the world, y’know)

But on the actual merits of their argument against Ruby/dynamically-typed languages and maintainability, etc, they have been flat wrong on many of the points.

i.e. one complaint was that it’s hard in Ruby to know a magic field name from a table column.

Okay, it may not be your favorite IDE as of now but Netbeans + Ruby = Autocomplete Goodness. Screencap below:

Netbeans Ruby Autocomplete

Also if Netbeans is not your style, BAM - annotated models plugin which drops this into your ruby model classes:

  # Schema as of Sun Feb 26 21:58:32 CST 2006 (schema version 7)
  #
  #  id                  :integer(11)   not null
  #  quantity            :integer(11)
  #  product_id          :integer(11)
  #  unit_price          :float
  #  order_id            :integer(11)
  #

  class LineItem < ActiveRecord::Base
    belongs_to :product
...

Yes — this is not as nice as an IDE where you can type ‘foo.qua’ and ‘quantity’ magically appears, I will definitely give you that.

But it also doesn’t bother me much and I’m rarely thinking, wow, if only I had auto-complete this whole Ruby thing wouldn’t suck so bad.

It is indeed harder when you’re on a bigger team and didn’t name all the functions/columns yourself. i.e. you’d have called it ‘name_long’ and ‘name_short’ but someone else called them ‘long_name’ and ’short_name’, etc. Still, not the end of the world.

Academic Arguments vs. Real-life Examples

Anyawy most of the Java Bob thread was all about academic arguments and people’s pie in the sky opinions on things. It sounded very FUDy to me, personally.

Then commenter sandofsky chimes in and pretty much owns the entire thread:

Yellowpages.com had a 10 year old codebase. It was 100,000 lines of Java. It was a total mess.

This year it was rewritten in Rails. It took took five developers four months from first subversion commit to public beta. Now it’s under 10,000 lines.

Those 10,000 lines are clearer than anything from the legacy site. We assign developers to unfamiliar code and they’re up to speed in no time.

As for complexity, those four months included writing a service tier that uses our proprietary Ruby library for FAST.

As far as the pluralization conventions:
Class names are singular.
Table names are plural.

Done.

If you don’t like it, use set_table_name in your class.

I don’t know what capitalization rules you’re referring to. If you mean that classes are capitalized, all classes in Ruby are capitalized.

You can learn the “ancient tomes” of Rails by buying the book “Agile Web Development with Rails.” It’s available as a PDF.

‘nuf said.

oh and by the way, the ‘0wned’ thing is a joke… lulz

You can Bookmark this entry on del.icio.usbookmark this, digg this entrydigg this or check the See this page in technoraticosmos

3 Responses to “Entire ActiveRecord/Ruby Thread 0wned by a Single Comment”

  1. Gravatar Icon 1 Reg Braithwaite 
  2. Gravatar Icon 2 Bruce B 

    No, it’s not “’nuff said”–rewriting anything usually involves a LOT less code whether you are using the same language or not. This is elementary to anyone who has ever rewritten anything.

  1. 1 Shanti’s Dispatches - This would rock: Language/Framework Web App Shootout



Shanti A. Braford blogs here.

If you really want to know, just read this.



  

Powered by FeedBlitz