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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Why Ruby for startups?

13 点作者 karangoeluw将近 12 年前
I see so many new startups being built on Ruby&#x2F;Rails. Why so?<p>Why not Python?<p>PS: This is not a Python vs Ruby question. Just, why is Ruby preferred in the startup world?

5 条评论

anonyfox将近 12 年前
When Rails came up, it&#x27;s &quot;new way&quot; of developing a webapp fast and without much hassle was exciting. In addition, Ruby is a really nice language, and switching to it may give you massive productivity boosts, depending on where you come from. Plus: the amount of high-quality libraries (&quot;gems&quot;) is very high. But i forecast a massive decrease of Ruby usage in startups. I&#x27;ll explain why in the following sentences:<p>Startups are not picking _Ruby_, they are picking _Rails_, which happens to be written in Ruby. Seriously, the language doesn&#x27;t matter that much nowadays it&#x27;s all about the ecosystem around it. You need one or more nice frameworks, as light or heavy as you want, and a bunch of libraries for common stuff you have to deal with (never invent the wheel again if not absolutely neccessary!).<p>But time goes on. I was a ruby zealot, but this changed over the last 2 years. Most of the webframeworks of other languages integrated the &quot;rails way&quot; in one way or another. To be clear: Rails hasn&#x27;t special benefits or is &quot;cool&quot; any longer (i say this as an currently employed rails developer). In addition to this, Ruby itself is showing it&#x27;s age:<p>- excessive metaprogramming (like eg. in ActiveRecord) makes these things nearly unreadable&#x2F;un-understandable today. - parallel processing in MRI is not possible, Rubinius 2 didn&#x27;t finish&#x2F;change for the last 2 years (especially unicode support is the showstopper in non-english countries), JRuby brings the disadvantages of the JVM to the table (the startup times in short TDD-cycles are annoying). - Ruby is still one of the slowest scripting languages in use. In addition, stuff like ActiveRecord kills performance even more, some expressions (no exact number) take hundred times longer than writing the raw sql statement in the rails app. The &quot;convenience&quot; of AR comes with price. (and as i mentioned, the &quot;under the hood&quot; isn&#x27;t that easy to understand either).<p>To be fair: other languages have their problems, though.<p>- python: the frameworks are similar to the language in their inception: quite good, but not mind-blowing, boundary-pushing or just &quot;hip&quot;. I&#x27;d say most usage of stuff like Django results from &quot;yeah, i know python, let&#x27;s use a python web framework&quot; if you know what i mean. Indeed, there&#x27;s nothing wrong with that. Also: Python3-transition-hassle, GIL like Ruby prevents parallel processing, similar hassle like with the different ruby implementations.<p>- PHP: cheap. hosting is cheap (most customers are happy with near-garbage hosting since they won&#x27;t get _that_ much traffic). developers are cheap and everywhere available. developing is cheap because of the massive amount of high-quality &quot;frameworks&quot; (not only coding-frameworks, but also stuff like drupal, typo3, wordpress, wiki, ...). But: you get what you pay for. Innovations happens everywhere except in PHP, folks there are just playing catch-up. If you have to develop something new, where you don&#x27;t have the skeleton in place, PHP isn&#x27;t the best choice. Like Ruby, performance is not that good, especially when you target modern webapps with thousands of concurrent small requests. PHP isn&#x27;t made for this.<p>- Perl: slowly fading away. May become &quot;cool&quot; again, similar the way old clothes become &quot;retro&quot; and cool again. No pun intended, i personally like perl. And CPAN is just insane. Everything you&#x27;ll ever need (and more) is available.<p>- Scala: very interesting (but also complicated and not beginner-friendly) language. Biggest drawback last time I used scala: the &quot;package manager&quot;, the single most important thing of every modern language, the thing that defines how the ecosystem will behave, was just garbage. There (as i know) is no place like &quot;rubygems.org&quot; and just &quot;gem install myawesomelib&quot;. It _may_ be that SBT has involved into something great over the last year, i don&#x27;t know. The whole &quot;JVM Ecosystem&quot; has quite a learning curve, too. Not startup-friendly and you&#x27;ll need _great_ developers (my experience).<p>- ASP.NET MVC&#x2F;C#: This is my personal opinion: i would never use it again or recommend it to anyone. Not only C#, but the whole .NET stuff or other microsoft-centric technologies. It has fanboys for sure, but not only i hate to work with every single piece of the microsoft &quot;stack&quot;, MS is fading away slowly. Even silverlight was abandoned, ehrm i mean, &quot;open sourced&quot;. The only way to write C# code in a productive way is in Visual Studio. Oh, you&#x27;ll need the features of the &quot;ultimate edition&quot;? Have fun shelling out thousands of $$ for your developers. Use MS-SQL Server? Look at the license costs. Whatever, i don&#x27;t want to start flamewars here. Actually i (european) see C# stuff outsourced to indian offshore businesses more and more (no pun intended). C# Development is just &quot;stuff that needs to be done&quot; in some businesses, there is nothing really innovative or exciting going on and developers are cheap.<p>All this said and done, there is one outstanding &quot;stack&quot;, and this is... javascript. We all know the language and the &quot;fame&quot; of javascript and how it evolved over the years. But today, things have changed.<p>- JS is the only player in the browser. &quot;unfair&quot; advantage. Every softwarestack above have to deal with JS today. - Node.js brings JS to the server. While not suited for anything, it is just _perfect_ for many apps today. - NPM (the &quot;rubygems&quot; for JS&#x2F;Node) is quite &quot;better&quot; than rubygems and seems way more active today. - Kickstart from scratch with express&#x2F;mongoDB is <i>really</i> fast and perfectly suited for agile development. - &quot;Big Frameworks&quot; are evolving rapidly the last months. - Desktop- &amp; Mobile-Apps tend to be written in HTML5&#x2F;JS more and more. - Databases like MongoDB use JS as their query language. - if you don&#x27;t like JS, there are preprocessing-languages like coffeescript which compile to JS. Write in the style you want, that&#x27;s it. - The raw Speed of the V8 VM is amazing.<p>=&gt; if you want, you can have a Stack with JS-pieces only today. From database to the UI, everything can be javascript, which makes development of modern client-heavy apps a breeze.<p>So, to conclude: The future question will not be &quot;why ruby?&quot;, but &quot;why not javascript?&quot;.
评论 #6187333 未加载
评论 #6186792 未加载
评论 #6187337 未加载
评论 #6190977 未加载
评论 #6177366 未加载
workhere-io将近 12 年前
<i>why is Ruby preferred in the startup world?</i><p>I&#x27;m not sure it is. If you look at the polls there have been here on HN, Python often places better than Ruby (one example is <a href="https://news.ycombinator.com/item?id=3745084" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=3745084</a>, but there are other polls as well).
评论 #6172447 未加载
lewstherin将近 12 年前
I can&#x27;t speak for others but I chose Ruby&#x2F; Rails over Python&#x2F; Django, because the Rails community seemed bigger and much more active. This may not be necessarily true of course, but I took a look at Ruby and liked what I saw, so much that I never looked back :)
_random_将近 12 年前
Because it is fashionable (in a bit hype-y way) and happens to be not bad :).
deathwithme将近 12 年前
cause with Rails, a web application is developed fast and very easy and the cost is very low. You know start ups need time and money.
评论 #6172456 未加载