News for hackers. Stuff that matters.
Re:Why did Quora choose Python (over PHP and others) for its... by cageface on Monday July 12, 2010 @02:07PM (#1508794)
Yeah Django is definitely the big player. It's interesting though that python is bigger than ruby but rails is bigger than django.
Re:Why did Quora choose Python (over PHP and others) for its... by grasshoper on Monday July 12, 2010 @02:48PM (#1508955)
That's because Python is actually used extensively in the West outside the context of web development. Ruby really isn't. Rails became popular, and people decided to learn Ruby so they could use Rails. Most people who choose Python web frameworks do so because they are already familiar with Python.
Re:Why did Quora choose Python (over PHP and others) for its... by edanm on Monday July 12, 2010 @04:38PM (#1509338)
Why do you say "In the West"?

But I agree, I learned Python because it seemed like a great language, and learned Django because I was moving into web dev after years of other work with Python. I don't believe I'll ever pick up Ruby for anything other than learning Rails (and I doubt I'll even do that, since Python is so similar).

Re:Why did Quora choose Python (over PHP and others) for its... by sachinag on Monday July 12, 2010 @05:17PM (#1509466)
I take that to mean the United States and Europe. Python is used extensively in the sciences and financial services on both sides of the pond.
Re:Why did Quora choose Python (over PHP and others) for its... by mahmud on Tuesday July 13, 2010 @06:48AM (#1510969)
Still, why "West"? To confirm your geographical hunch, I went ahead and asked Google:

http://www.google.com/insights/search/#q=ruby%20AND%20rails%...

Just take a look; the django bar is not even a bar, more like a square. Rails seems to have a 40:1 edge over Django in popularity.

The other thing you will notice is that India is where Rails is most popular; but try to pull back the timeline slider and play with it a bit. See how different countries discover rails at different times but soon after lose interest? Except for India, it stays popular there.

Re:Why did Quora choose Python (over PHP and others) for its... by edanm on Wednesday July 14, 2010 @11:48AM (#1514935)
I'm not sure what your link is trying to show, actually.

But note that most people searching for Django will use only the name Django, whereas Rails is often called "Ruby on Rails", meaning searches for "ruby and rails" will naturally tend higher than "python and django". Again, I'm not sure I understand your point, so I don't know if this means anything.

Re:Why did Quora choose Python (over PHP and others) for its... by brown9-2 on Tuesday July 13, 2010 @09:04AM (#1511183)
This is an answer to a question that grasshoper is not asking: he claims that Python is used extensively "in the West" in contexts other than web development.

Comparing search traffic for django/python to ruby/rails has nothing to do with this.

Re:Why did Quora choose Python (over PHP and others) for its... by devonrt on Monday July 12, 2010 @02:20PM (#1508837)
Django is arguably the most used Python web stack, but it's also a much more controversial choice than Rails is in the Ruby world. I hear "you'll outgrow Django really quickly" a lot; whether that's true or not I can't say since I've never used it. Also, there seems to be a lot more choices for web frameworks in the Python world: Django, Pylons, web.py, Tornado, Flask, CherryPy, Zope etc. I'm not sure if this is the case in the Ruby world. All I ever hear about are Rails and Sinatra.
Re:Why did Quora choose Python (over PHP and others) for its... by epochwolf on Monday July 12, 2010 @05:04PM (#1509422)
> All I ever hear about are Rails and Sinatra.

I got two theories.

First theory.

Ruby allows developers to make really nice DSLs. (Domain Specific Languages) It makes sense to me that there would only be two major frameworks. Rails fills the need for a batteries-included framework and Sinatra is the a light weigh, nothing included framework. Both have expressive enough implementations that the community doesn't build their own frameworks.

Python doesn't make as pretty code for a DSL which makes it more likely to hit pain points in expressing what you want. Then you end up with a fragmented community around these different pain points.

Second theory.

People start using ruby because of rails. If rails is too heavy, they move to sinatra. Most of the people using ruby can't be bothered to write their own framework.

Most people using python learned python before web development. They are more experienced in the language and used to doing their own stuff. They try out different frameworks and if they get disgusted enough with them they create their own.

Disclaimer:

I'm a ruby guy. I used python for two years before learning ruby and then rails. These are only theories. I probably look at ruby more nicely than I should but I tried to be somewhat objective.

Re:Why did Quora choose Python (over PHP and others) for its... by lenni on Tuesday July 13, 2010 @03:43AM (#1510687)
Can you explaint to me what all these little DSLs are useful for? I have heard this being presented as an advantage for Ruby before, but can't really think of many use cases for DSLs (apart from business rules).
Re:Why did Quora choose Python (over PHP and others) for its... by masklinn on Tuesday July 13, 2010 @04:06AM (#1510722)
> Can you explaint to me what all these little DSLs are useful for?

Writeability and readability. The ability to bring in domain experts which have no knowledge whatsoever in programming as well.

> but can't really think of many use cases for DSLs (apart from business rules).

Any domain-specific knowledge/data may be encoded as a DSL, and benefit from it. The rules of your business, the URL mapping of your framework, the GUI layout of your application, the steps of your tests, ... In fact, they often are (in WPF, XAML is used as a GUI definition DSL; Ant is a domain-specific language for building applications, so is Make).

The great advantages of the likes of Ruby, however, is that you can build DSLs in the language itself (you don't have to build your own compiler and translator from DSL to language), which rids you of most of the complexity and limitations of usual DSLs, and lets power users realize that there is a full-blown general-purpose language under the DSL (and use that power when they need it).

Re:Why did Quora choose Python (over PHP and others) for its... by carbon8 on Monday July 12, 2010 @02:55PM (#1508980)
There are actually a bunch of Ruby frameworks (ramaze, rango, waves, padrino, camping, halcyon, to name a few off the top of my head), but it seems Rails and Sinatra meet the needs for the vast majority of Ruby web developers.
Re:Why did Quora choose Python (over PHP and others) for its... by cageface on Monday July 12, 2010 @02:31PM (#1508881)
Yeah that may be true. I wonder how big the installed base of all those python frameworks is compared to rails. Hard to estimate I suppose.

The ruby world seems to focus its innovation around the major framework whereas the python world seems to be experimenting at a more fundamental level.