7 ms·
Why did Quora choose Python (over PHP and others) for its development?
- cageface 16y agoThe python/ruby thing seems to be at an interesting point. Python as a language has a bigger mindshare but none of the python web stacks has close to the adoption that rails does. As far as I can tell there seems to be a lot more peripheral innovation in the ruby camp though, particularly in testing tools. Are there python equivalents to rspec, cucumber, factory_girl/machinist, shoulda, passenger, haml, webrat etc?
- edanm 16y agoI'm not sure about the framework adoption thing, Django seems to be the major Python framework. I'm not saying there aren't others, but most newcomers to Python web dev quickly realize that Django is the name of the game.
- cageface 16y agoYeah Django is definitely the big player. It's interesting though that python is bigger than ruby but rails is bigger than django.
- devonrt 16y agoDjango 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.
- cageface 16y agoYeah 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.
- carbon8 16y agoThere 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.
- epochwolf 16y ago> 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.
- lenni 16y agoCan 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).
- grasshoper 16y agoThat'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.
- edanm 16y agoWhy 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).
- sachinag 16y agoI 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.
- mahmud 16y agoStill, why "West"? To confirm your geographical hunch, I went ahead and asked Google: http://www.google.com/insights/search/#q=ruby%20AND%20rails%2Cpython%20AND%20django&cmpt=q 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.
- brown9-2 16y agoThis 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.
- rxin 16y agoDjango did receive Guido's bless: http://www.djangoproject.com/weblog/2006/aug/07/guidointerview/ http://www.djangoproject.com/weblog/2006/aug/07/guidointervi...
- ianb 16y agoThere are equivalents to many testing tools: rspec: I'd argue doctest does the same thing, but without being clever consultantware. I've seen passing mentions to similar things in Python. cucumber: http://lettuce.it/ http://lettuce.it/ factory_girl: I can't keep up with data fixture libraries, but there's quite a few machinist: I don't quite understand it. It seems like a mocking library to me? There's a half dozen of those at least... shoulda: Seems like Cucumber? I don't get this one either. Just a bunch of comparison helpers for your testing? passenger: as in mod_passenger? Technically it supports Python. mod_wsgi is very similar. haml: there's a bunch of more-or-less direct ports. webrat: Twill, WebTest, zope.browser are a couple. There's a lot of testing tools in Python; this list is very out of date, but at least shows some of them: http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy http://pycheesecake.org/wiki/PythonTestingToolsTaxonomy
- cageface 16y agoI know what you mean about clever consultantware. Sometimes it seems like clever beats out practical in the ruby world.
- rxin 16y agoMy 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.
- macco 16y agoMaybe you should look at web2py then. The database abstraction layer is ready to use gae out of the box.
- deleted 16y ago[deleted]
- scorpion032 16y agoNon relational support is coming soon. Hopefully in 1.3. I am sure there will be "backends" for mongodb, Appengine immediately.
- mkramlich 16y agostart with web.py then incrementally add code as you need it, how/where you need it, including how to persist
- 146 16y agoHow 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.
- mkramlich 16y agoI 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.
- paulsmith 16y ago"We didn't want to take the risk of being on Mono [...] It's not clear how long funding will be around for that project" Can anyone elaborate on that or point to some reading?
- texasrgr453 16y agoI guess they're implying that Mono ins't a money maker at Novell? Mono is great and all, but maintaining an entire development platform, along with IDE and and myriad of docs, strictly for internal use may be a bit too much for a company of their size.
- agentultra 16y agoThe 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.
- prodigal_erik 16y agoPython tends to raise errors for type mismatches, which forces you to do the work to avoid them or handle them. PHP usually does something nonsensical instead, which probably screws you over--but you don't necessarily notice unless you are independently sanity-checking its results.
- masklinn 16y ago> 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.
- agentultra 16y agoType 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.
- 146 16y ago> Spare yourself this yammering rant. They chose Python because that's what everyone else at the company was cool with. End of story. I don't think it's a bad idea to evaluate the alternatives, even if you are very comfortable with a specific language. Granted we were pretty cool with Python and that is definitely a major factor in the decision, but it can't be the only one. For example, we were all very comfortable using SVN (another technology Facebook uses and is now locked in with). But we didn't use Subversion; we decided to use Git, because the advantages of using a DVCS outweigh our personal sense of comfort.
- code_duck 16y agoWait, you mean this was a serious question? Not a comedy routine?
- crystalis 16y agoWait, you mean this was a serious comment? Not a comedy routine?
- code_duck 16y agoNo, 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.
- pypython 16y ago@ ruby babies Get over yourself....] No one in their right mind uses Ruby, The Failure of twitter has shown everyone that ruby is worthless if you ever wish to make millions and scale. Unless of course you are living off pennies like 37 signals ppl otherwise get over it, Use python all smart people use it.
- andrewtj 16y agoCharlie Cheever's comment "Python data structures map well to JavaScript data structures" resonates with me. I'm building something in Erlang right now and having come from Python, it's just plain grating.