Live data from Hacker News

Why did Quora choose Python (over PHP and others) for its development?

quora.com

11–20 of 45 posts

Re: Why did Quora choose Python (over PHP and others) for its development?

#11
post #9

My biggest problem with Django is that the entire data model layer is designed with relational database in mind (i.e. normalization and JOINs). Many of the new data stores (RDF stores, Google Data Store for App Engine, etc) are inheritantly non-relational.

Maybe you should look at web2py then. The database abstraction layer is ready to use gae out of the box.

Re: Why did Quora choose Python (over PHP and others) for its development?

#13
post #9

My biggest problem with Django is that the entire data model layer is designed with relational database in mind (i.e. normalization and JOINs). Many of the new data stores (RDF stores, Google Data Store for App Engine, etc) are inheritantly non-relational.

Non relational support is coming soon. Hopefully in 1.3. I am sure there will be "backends" for mongodb, Appengine immediately.

Re: Why did Quora choose Python (over PHP and others) for its development?

#15
The biggest issues with Python are speed and the lack of typechecking.

Interesting that they took this bit of wisdom away from programming in PHP.

I say this because I've never heard anyone consider a lack of type-checking as an issue when considering Python. It's a feature. You either need type-checking or you don't. I suspect that the Quorum engineers didn't need type-checking, so I don't understand why the felt the need to consider it an "issue" with choosing Python.

Spare yourself this yammering rant. They chose Python because that's what everyone else at the company was cool with. End of story.

Re: Why did Quora choose Python (over PHP and others) for its development?

#16
post #9

My biggest problem with Django is that the entire data model layer is designed with relational database in mind (i.e. normalization and JOINs). Many of the new data stores (RDF stores, Google Data Store for App Engine, etc) are inheritantly non-relational.

start with web.py

then incrementally add code as you need it, how/where you need it, including how to persist

Re: Why did Quora choose Python (over PHP and others) for its development?

#17
post #4

Earlier quoted context omitted.

Yeah Django is definitely the big player. It's interesting though that python is bigger than ruby but rails is bigger than django.

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.

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 development?

#18
post #9

My biggest problem with Django is that the entire data model layer is designed with relational database in mind (i.e. normalization and JOINs). Many of the new data stores (RDF stores, Google Data Store for App Engine, etc) are inheritantly non-relational.

We're on Django; there is a relational DB in our architecture, but when you're browsing the site you're nearly always hitting either Solr or a key-value store.

But why wouldn't you use a relational database? It works, the ORM's good, it's fast enough, you're probably not going to hit scaling problems. If you do hit scaling problems, then that's a really really good problem to have.

Re: Why did Quora choose Python (over PHP and others) for its development?

#19
post #5
post #4

Earlier quoted context omitted.

Yeah Django is definitely the big player. It's interesting though that python is bigger than ruby but rails is bigger than django.

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…

> 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 development?

#20

The biggest issues with Python are speed and the lack of typechecking. Interesting that they took this bit of wisdom away from programming in PHP . I say this because I've never heard anyone consider a lack of type-checking as an issue when considering Python. It's a feature. You either need type-checking or you don't. I suspect that the Quorum engineers didn't need type-checking, so I don't understand why the felt t…

> You either need type-checking or you don't.

That's not really correct. In general, nobody needs type checking (it's not like there's any actually done where it would be needed the most), but it's "free" error checking. Always nice to have.

But it is a feature to balance against others.

Anyway, considering how weak the type systems of "industry standard" languages are as opposed to Ada, or MLs, or Haskell, the common type-checking trope is mostly a huge joke.

Post reply on HN