News for hackers. Stuff that matters.
Re:Ask YC: Django vs Ruby on Rails by timr on Tuesday May 20, 2008 @10:20PM (#195594)
Here's my take, after working in Ruby/Rails for a year, and coming from a background in C++ and Perl (with a tiny bit of Lisp in my distant past): Ruby is nothing like Lisp. It has some metaprogramming features that make you think (vaguely) of Lisp, but fundamentally, it's more like the bastard child of a torrid, three-way affair between Lisp, Python and Perl -- the genetic heritage was passed on, but poor baby Ruby got little of the careful childhood upbringing.

The result? Ruby has the syntactical consistency and beauty of Perl, and the blazing speed and low overhead of Lisp. There are roughly six dozen different ways of doing everything (including really simple things, like delimiting blocks), and bizarre inconsistencies in basic use cases (e.g. most String functions return copies, whereas nearly everything else works by reference), and plenty of long-term code maintainability nightmares lurking in the corners.

It can be fun to code in Ruby, and it's certainly a language you should check out someday, but I'm still not sure it's the language you want to choose for a project involving a team of programmers or long-term project maintenance. My advice, if you know neither Ruby nor Python, is to learn Python, unless you've got some particular reason (i.e. a job) to learn Ruby first. Rails is an okay framework, but Django is okay too, and Python is the more elegant language.

(Now...if you'll excuse me, I'm going to go put on my asbestos underwear....)

Re:Ask YC: Django vs Ruby on Rails by donw on Tuesday May 20, 2008 @10:48PM (#195621)
I was about to post a comment about you being insane when I read 'syntactical consistency and beauty of Perl', but then I re-read what you wrote and my Sarcasm-O-Meter started beeping.

I'm not sure your argument about Python/Django being better for long-term use really holds muster. There are a lot of very passionate Rails hackers, and I can see Rails taking over the web application development sphere over the next few years. This isn't because it's necessarily better, mind you, but because Rails has a hell of a lot of mindshare.

So, you should be as worried about finding competent Rails hackers as you should be about finding competent Python/Django hackers. Or should you?

Rails is the web development framework for Ruby. There are probably others, but nobody has ever heard of them, so they don't matter. Python has Django, and Pylons, and TurboGears, and so on. Your hypothetical future Python web developer, then, has a lower chance of being an expert in The Best Web Framework than does the Ruby hacker, because with Ruby, you only have one choice.

Re:Ask YC: Django vs Ruby on Rails by timr on Tuesday May 20, 2008 @10:56PM (#195626)
"you should be as worried about finding competent Rails hackers as you should be about finding competent Python/Django hackers."

It's not finding the coders that's hard (any smart coder can pick up Ruby quickly); it's the quality of the code that any new person will inherit. My experience is that the syntactical looseness of Ruby leads to write-only code. Lots of people complain about the readability of Perl, but Ruby is really only nominally better. In Python, readable code is the rule, not the exception.

Re:Ask YC: Django vs Ruby on Rails by jshen on Tuesday May 20, 2008 @11:46PM (#195665)
"any smart coder can pick up Ruby quickly"

True, but can they pick up ruby quickly, and rails (rails is non trivial these days), and rspec, and rake, etc. I'm guessing it would take at least 6 months to become merely comfortable with all of these. This is far different than having a proficient coder walk in the door.

You'll have much better luck getting a proficient rails coder than a proficient django coder. On the flip side I'm starting to get a lot of rails candidates that aren't really interested in rails, but used it at their previous job. For while if someone had rails on their resume it meant they took the time to learn it on their own (which is a good sign). Those days are gone.

Re:Ask YC: Django vs Ruby on Rails by timr on Wednesday May 21, 2008 @12:30AM (#195696)
You're missing my point: finding a good Blub coder, however hard, is a constant-time problem. The polynomial-time problem is maintaining/reading/understanding an established code base in Blub.

If Blub is an order of magnitude more difficult to maintain/read/understand than Foo, then even if it's far more difficult to find a Foo coder today, it makes more sense for me to use Foo for my new project.

Re:Ask YC: Django vs Ruby on Rails by 1gor on Wednesday May 21, 2008 @07:29AM (#195911)
I think code maintainability has less to do with the language than with the architecture chosen by the developers.

Try to explore (save alone, maintain) a complex Python application like Plone with its multiple inheritance. And then read the code of a modern MVC Rails application. You'll see what I mean.

And your statement that Ruby is only marginally more readable than Perl is very surprising. Ruby is a vast improvement in terms of clarity over Perl and is on par with Python there.

Re:Ask YC: Django vs Ruby on Rails by jshen on Wednesday May 21, 2008 @12:56PM (#196220)
the idea that ruby is a blub language while python is a foo language is laughable. Python has it's issues as well. New style classes vs old style classes. These types are treated differently than those types in terms of default behaviour. Decorators are not the easiest thing in the world to read. Metaclasses are another example.

In my opinion ruby's syntax is simpler from a users point of view and equally as powerful. This may be my bias, but a fair assessment is that they are fairly equal

Re:Ask YC: Django vs Ruby on Rails by elad on Wednesday May 21, 2008 @02:21PM (#196360)
Speaking from experience: I coded many thousands lines of Ruby code for my startup all alone. Then we raised seed, and hired a few additional developers. Two of them joined my project and took over the development from me. They're both very experienced programmers, but had no prior Ruby experience. It took them less than a month to become productive. Srsly. In short, if you write good code and bring in good developers, Ruby probably isn't going to be a problem.
Re:Ask YC: Django vs Ruby on Rails by cstejerean on Wednesday May 21, 2008 @12:29AM (#195695)
I'd be really worried if I hired someone that took 6 months to become comfortable with the ruby/rails (and rspec, rake, capistrano, etc). Now it might take way longer than 6 months to fully master everything, but if you already have a good quality code base to learn from and a team of experts any smart developer should have no problem picking things up quickly.
Re:Ask YC: Django vs Ruby on Rails by melvinram on Wednesday May 21, 2008 @10:54PM (#196826)
"True, but can they pick up ruby quickly, and rails (rails is non trivial these days), and rspec, and rake, etc."

2 Weeks for Ruby & Rails. 1 to 2 weeks for Rspec & rake... especially if you're learning using Peepcode videos and a real project. Those numbers are from personal experience. Your learning curve may vary.

Re:Ask YC: Django vs Ruby on Rails by donw on Wednesday May 21, 2008 @01:27AM (#195735)
This is simply personal preference; I have no problem reading Ruby code. Perhaps this is because I spent a very, very long time with Perl, but other Ruby hackers seem to feel the same way. On the contrary, I don't much care for looking at Python code, because half of it seems to consist of the word 'self'.

So, 'readability' in this case isn't a very valid argument, because anyone who codes in language X is going to find X to be highly readable.

Re:Ask YC: Django vs Ruby on Rails by timr on Wednesday May 21, 2008 @03:25AM (#195806)
"This is simply personal preference"

Well, yeah. That's why I said it was my experience.

I think the point is, I code in Ruby and in Perl, and my opinion is that neither language is particularly readable or maintainable. Meanwhile, I have less experience with Python than either Perl or Ruby, yet I find it to be a consistently readable language.

Those are all opinions, but they're informed opinions (and I'm not simply advocating for the language with which I am most familiar).

Re:Ask YC: Django vs Ruby on Rails by etal on Wednesday May 21, 2008 @01:50AM (#195750)
Rails does have a lot more mindshare than Django right now, but notice Rails had a 2.0 release in December, while Django still hasn't even reached 1.0. I'm not sure about the relative histories of the projects, but it looks like Django is still in the pre-buzz phase. (Meaning, projects tend to start publishing books, holding conferences, etc. after the big 1.0 release, not in the incubation/unstable-API phase.)
Re:Ask YC: Django vs Ruby on Rails by aidanf on Wednesday May 21, 2008 @07:12AM (#195907)
Version numbers don't measure age. Django and Rails are roughly the same age, having had their first public releases around the same time.
Re:Ask YC: Django vs Ruby on Rails by etal on Wednesday May 21, 2008 @01:22PM (#196264)
Yeah, exactly. The two projects have a completely different dynamic. Like Python, Django development is cautious, minimal and relatively slow-moving compared to Ruby and Rails.

Rails burst onto the scene, brought everyone on board with a 1.0, published books, and already decided enough design elements needed to change to warrant a 2.0 release. Django, despite having the BDFL's semi-official endorsement, has crept along, nitpicking at its own API, cranking out beautiful versioned documentation and tutorials, and writing and editing the official Django Book in a wiki. And only now are they feeling confident enough to consider the 1.0 label and even publish their precious gem of a book.

Same timeframe, completely different personalities. This played out somewhat similarly with Python and Perl a decade ago, which leads me to believe that Django's time in the spotlight is still ahead of it.

Re:Ask YC: Django vs Ruby on Rails by cstejerean on Wednesday May 21, 2008 @12:51PM (#196209)
A lot of Python projects seem reluctant to announce a 1.0 release. For example Pylons and Django are both in 0.9 range, SQLAlchemy is 0.4, Genshi is 0.4 (just some of the projects I've used in a commercial setting).
Re:Ask YC: Django vs Ruby on Rails by jamesbritt on Wednesday May 21, 2008 @12:22AM (#195691)
" There are probably others, but nobody has ever heard of them, so they don't matter. "

Simply untrue. You, and your opinion, are grossly misinformed.

Re:Ask YC: Django vs Ruby on Rails by mattjones on Wednesday May 21, 2008 @06:25AM (#195881)
with Ruby, you only have one choice.

I disagree vehemently. I myself have started using Ramaze, and like it better than Rails. In any case, it's more important to me to know Ruby well than a particular framework.

Re:Ask YC: Django vs Ruby on Rails by jamongkad on Wednesday May 21, 2008 @11:25PM (#196847)
Upvoted for Ramaze and do try to use the Sequel ORM library. It's sweeeeeeeeeeeeet. None of that ActiveRecord magic for me.
Re:Ask YC: Django vs Ruby on Rails by mattjones on Thursday May 22, 2008 @10:03AM (#197124)
I am using Sequel.
Re:Ask YC: Django vs Ruby on Rails by jamongkad on Monday May 26, 2008 @10:06AM (#200206)
You sir have good taste.
Re:Ask YC: Django vs Ruby on Rails by stcredzero on Wednesday May 21, 2008 @12:28AM (#195694)
>...the blazing speed and low overhead of Lisp...

Actually, there are some Lisp implementations that leave Ruby in the dust. (Not saying much, I'll grant you that.) There are some Lisp implementations that let you compile code to machine language.

sigh yet another clueless spreader of programming urban legend and old prejudice!

Re:Ask YC: Django vs Ruby on Rails by dats on Tuesday May 20, 2008 @10:43PM (#195615)
"Ruby has. . .the blazing speed and low overhead of Lisp."

How did you conclude this?

Re:Ask YC: Django vs Ruby on Rails by run4yourlives on Tuesday May 20, 2008 @11:39PM (#195659)
With a smirk, most likely.
Re:Ask YC: Django vs Ruby on Rails by dats on Wednesday May 21, 2008 @01:09AM (#195721)
Granted the OP was being facetious in claiming the beauty of Perl or blazing speed of Lisp, but he was sincere in analogizing Ruby to Perl and Lisp. In that sense, he was wrong. Ruby is nowhere near the speed of Lisp. Peter Norvig claims Lisp is "about 1 to 2 times slower than C++" (http://norvig.com/python-lisp.html), and I don't think anyone would sensibly equate the speeds of Ruby and Lisp.
Re:Ask YC: Django vs Ruby on Rails by sunkencity on Wednesday May 21, 2008 @04:10AM (#195827)
Well on a related note, when you become really comfortable with ruby, it's incredibly fast to write scripts and one-liners to do really complex stuff. Especially with the ruby shell as help.