TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why are more Startups using Python over Ruby?

27 点作者 kp212超过 13 年前
It was just an observation I noticed with job postings, and meeting early stage startups. Is there a reason why Python + a framework has become more prevalent over Rails?

12 条评论

b14ck超过 13 年前
I can't give you a definitive answer, but I'll explain why my company chose to use python.<p>NOTE: We're a technical startup in the telecommunications industry. We build web-based telephony applications in addition to traditional phone-based applications.<p>1. python's syntax is extremely clear and easy to read / maintain. I can open any python project, and immediately find my way around with no prior knowledge. This makes working in teams especially easy, when you have numerous developers committing various bits of code to various parts of the product throughout the day.<p>2. In the past two years, the python community has put a great amount of emphasis on documentation for open source projects (using Sphinx), and as a result of this, many open source python packages now have <i>excellent</i> documentation that makes it really easy to start using third party libraries and feel secure in your choices. Just check out <a href="http://rtfd.org/" rel="nofollow">http://rtfd.org/</a> for examples (ReadTheDocs is a hosted open source documentation site, focusing on python).<p>3. Django is an excellent web framework, and has tons of reusable open source applications that you can use, which makes rapidly developing web applications easy. The Django app ecosystem has been growing at an insane rate over the past few years, and there are more than enough applications to solve most common patterns.<p>4. Tools like tox, nose, coverage.py, and others make testing in python simple. It also helps that Django encourages testing in a large way (providing a default tests.py module for each application, with example tests). Having such a large emphasis on testing, with such great tools, makes it easy to "Do The Right Thing" and build tests into your software.<p>5. There are excellent tools in python for performing complex tasks, like celery / redis for building distributed queue processing workers.<p>6. PyPY (an alternative python interpreter) has been showing immense promise with python speed improvements. PyPY can be used as a drop-in python replacement on any linux system, and yields immense performance improvements to even the simplest code.<p>7. The python community in general tends to be very friendly, supportive, and encouraging. There are a lot of popular figures in the python community, and the overall personality traits of leading python community figures tends to be humble, helpful, and encouraging. This has fostered a really excellent community focused around accomplishing things, and helping people out, which I think gives the language a good overall feel.<p>Just my two cents.
评论 #3141033 未加载
ryanto超过 13 年前
None of the posts in this thread really answer the question to "why python over ruby", they just talk about all of the nice features of current python development. The thing is modern Ruby has all of those tool sets as well.<p>Before you even being to make the statement "Why are more Startups using Python over Ruby?" you need some data. I'd be willing to bet that more places do in fact use python over ruby, but that number is a lot closer to 50/50 than you think. In fact, it is probably so close that this argument becomes pretty silly.<p>I once heard a successful startup founder describe the choice to use Python over Ruby because a couple of years ago getting started with Ruby was too difficult for them. They had spent a day trying to setup Ruby, Rails, etc and nothing was going correctly. After that they tried to install Python, it worked, and from that point on code was written in python. This story isn't elegant, sexy, or thought provoking, but it goes to show you that there are all sorts of crazy, silly, and stupid reasons why some people pick one language over another.<p>Lets talk about reasons why startups are _NOT_ using Python over Ruby.<p>Python is not taught at more schools than Ruby. Well, I couldn't find a list of schools teaching Ruby, but search for the Python list (hint, its up on python.org). There are only a handful in the US and these look like nothing when you consider all of the places that use Java.<p>Python's syntax is not easier or better than Ruby's. Nor is Ruby syntax better than Python syntax. Anyone trying to compare the two is just looking for a flamewar. Omg significant white space vs lol meta programming type arguments.<p>Both languages have excellent documentation and community. Very hard to compare these sort of things.<p>Django is a great framework, but so is Rails. Both have very vibrant ecosystems that are just exploding right now.<p>Tools - great tool sets in both. If a Ruby tool comes out that is good you can bet your ass there is going to be a python port of it in the next few years (and vise versa of course). A single great tool is never bound to one language/framework.<p>Implementations - both languages have a ton of cool projects that revolve around finding alternative ways to rebuild the VM.<p>Go ask people why they chose to write in a language/framework. They are going to give you answers like "it's what we chose", "i dunno, we just knew it". Comparing things like documentation, community, MVC Frameworks, tools, syntax, etc with two languages like Python and Ruby is pretty silly because its going to become a wash every time.
atdt超过 13 年前
The web stack in Python got dramatically better in the past two years: just take a look at Flask, Werkzeug, requests, class-based views in Django, etc.<p>There were major improvements in deployment, too: Fabric and supervisord are maturing very nicely.<p>Once you've nailed the CRUD part of your startup down and want to start slicing your data in interesting ways, you have extremely powerful and easy-to-use libraries like nltk and numpy at your disposal.<p>Finally, Python continues to get a tremendous boost from the fact that Google uses it to write sample client code for their APIs.
评论 #3140170 未加载
评论 #3140071 未加载
dgunn超过 13 年前
Python is a great language. Simple. Powerful. Easy to read. Why not?<p>Also django is pretty great with amazing docs. I know a lot of people argue against because the django community isn't as large as the rails community (and it isn't). All that matters is that it's large enough though (and it is). Hasn't failed to answer my questions yet.
mfieldhouse超过 13 年前
What gives you that impression? Where did you get the numbers from?<p>I reckon RoR is faster for rapid prototyping and development of new features so I'd choose that in the beginning for a one or two man startup.<p>Later on if there's anything in particular you need that Python does, you can always recode once you're profitable.
评论 #3140304 未加载
jtchang超过 13 年前
I'd like to know where you are looking for job postings. Every posting I see is a Ruby on Rails shop. My own feeling around the bay area is that ruby/rails has overshadowed django/python...at least in the web arena.<p>General purpose stuff though I concur that python tends to beat out ruby. Except for maybe puppet.
sjd超过 13 年前
It's a bit disappointing not to see more mention of Groovy/Grails.<p>It has all the great features you get with Ruby/Rails but built on two solid time tested technologies being Spring and Hibernate. Not to mention the ability to integrate with pretty much no effort with existing Java infrastructures.
igouy超过 13 年前
So far you haven't provided a credible reason to think that "more Startups <i>are</i> using Python over Ruby?"
评论 #3140880 未加载
Yxven超过 13 年前
I switched from rails because I got tired of ruby magic breaking my code in difficult to debug ways. I switched to python because of its emphasis on clarity and readability.
abbasmehdi超过 13 年前
Python is being taught at unversites, and Ruby isn't (that I know of).
devs1010超过 13 年前
Because they are just going by whats trendy I suppose. If they wanted to build something serious that can actually scale then they probably shouldn't be using a dymanic language at all.
评论 #3144538 未加载
stray超过 13 年前
Same reason rails was hot last year: fashion.