Live data from Hacker News

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

quora.com

31–40 of 45 posts

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

#31

Wait, you mean this was a serious question? Not a comedy routine?

Wait, you mean this was a serious comment? Not a comedy routine?

No, it was actually my idea of a comedy routine. Around here, attempts at being the forum comedy act are frowned upon and thus end up somewhat similar to masochism, but it's therapeutic in the end.

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

#32
post #28

Earlier quoted context omitted.

start with web.py then incrementally add code as you need it, how/where you need it, including how to persist

How have your experiences with web.py been? The disadvantages I saw with it are that it just doesn't have a really large community, plus there are features I just don't want to build myself. Django's built-in admin/ app, for example, or Pylon's error page.

I like starting web apps with web.py, and I like building what may end up being merely demoware or a narrow tech prototype using web.py. I think it excels at whipping up a dynamic Hello World web app in just a few lines of code, with no boilerplate directory tree or scriptage, and no messing around with external servers, and no external code dependencies. Add sqlite when need persistence. Add memcached when need caching. Grow and refactor as you go.

But if I'm very confident it's going to become part of a long-lived dynamic web service with enough of the features Django provides anyway -- especially that awesome built-in admin UI -- then yes I start with Django. The mindshare/community factor is helpful too. I know there are other web frameworks which are decent but going with a big framework other than Django in the Python space today is a bit like going with FreeBSD rather than Linux when all you really need is some sort of free Unix. To pick Linux is to get a bigger ecosystem today and therefore probably also a longer supported future.

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

#33

Earlier quoted context omitted.

Wait, you mean this was a serious comment? Not a comedy routine?

No, it was actually my idea of a comedy routine. Around here, attempts at being the forum comedy act are frowned upon and thus end up somewhat similar to masochism, but it's therapeutic in the end.

lately i'm trying to exercise my desire for humor over on Reddit rather than here, for the reasons you stated. Goes down better over there. Plus they have narwhales.

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

#35

Earlier quoted context omitted.

No, it was actually my idea of a comedy routine. Around here, attempts at being the forum comedy act are frowned upon and thus end up somewhat similar to masochism, but it's therapeutic in the end.

lately i'm trying to exercise my desire for humor over on Reddit rather than here, for the reasons you stated. Goes down better over there. Plus they have narwhales.

I'd give anything for a friendly narwhal right now.

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

#36
post #5

Earlier quoted context omitted.

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…

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

#37
post #36

Earlier quoted context omitted.

> 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…

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).

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

#38
post #17

Earlier quoted context omitted.

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).

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.

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

#39

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 commo…

Type checking has many benefits other than making assertions about value types. It can provide hints to the compiler and has proven useful in some models of parallel computation. It isn't simply "free error checking." One should be able to discriminate from problems that require type-checking.

It just seems that in most cases it isn't actually required.

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

#40
post #38

Earlier quoted context omitted.

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.

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 b…

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.

Post reply on HN