TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Ask HN: Ruby or Python for 2018?

43 pointsby methochrisover 7 years ago
I&#x27;m having a really hard time deciding between sticking with what little Python I know and using Django or switching over to Ruby&#x2F;Rails for developing my side project. I&#x27;m hoping anyone could jump in and voice their opinion on either side.<p>Clearly the Ruby community is experiencing some kind of event where the numbers are shrinking and some of the more prolific bloggers&#x2F;contributors are talking trash and moving on and i&#x27;m not sure what to make of this. There is alot of tutorials and information already out there but it&#x27;s getting dated and i&#x27;m not sure how much of it that was written in several-versions-old Rails will still apply and there&#x27;s not ton of new stuff coming out. There seems to be a gem or tutorial for anything I could need to do but it&#x27;s growing more stale by the day as their creators seem to be off to greener pastures.<p>Python has it&#x27;s moments for me but after doing some tutorials I&#x27;m really finding Ruby&#x2F;Rails to be just fun and exciting to use. I like how thorough the framework is and the development experience in general, with console commands for everything and automated tests re-running on save, and it seems they are adding greatly to the rails core, as opposed to Django&#x27;s big 2.0 feature was basically copying Flask&#x27;s URL system. I also like the community having a vocal figure like DHH kind of &quot;leading the pack&quot; with alot of methodology I agree with.<p>Is ruby really as bad as people say and is on it&#x27;s way out? Is leaving Python for it, if my only interest is web-application development, a dumb idea? it seems like i&#x27;m standing at this cross-roads looking out and seeing on one side, Rails is awesome but people hate Ruby, and the other side is people love Python but Django is a big limp dick and I don&#x27;t have time to program the kitchen sink with Flask. choosing between either is very confusing...

25 comments

busterarmover 7 years ago
Ruby, PHP, Go, Python, Javascript &amp; Elixir developer here:<p>The #1 rule that trumps all, no matter how small or big your project: Use whatever facilitates your work.<p>Sometimes you need to get things done quickly, sometimes you need to hire a lot of people cheaply&#x2F;easily, sometimes you need a project to scale. In each of these cases, you may want to use a different tool. For something that&#x27;s your side project, you probably just want to be able to get work done effectively and enjoy what you&#x27;re doing. Pick that tool that you most enjoy working with, in that case.<p>For me, I default to Ruby (and I haven&#x27;t touched Rails for work in 2 years!). I find it to be a joy to work with. I expect that later, as a I grow as a developer, this will become Elixir and&#x2F;or Erlang. Sometimes I have to work in Python, because that makes sense for the project. I find it a bit of a slog, but it gets the job done and lets me move on to other things.<p>If you are a developer learning the ropes, I couldn&#x27;t recommend a better language than Ruby. Your skills will translate. You will find work. The places that hire junior developers that only care that you know their stack aren&#x27;t worth your time.<p>Most of the people that have publicly roasted Rails were wrong, for one reason or another, by the way (especially that Twitter blog post...). Too often, people are trying to fit a square peg into a round hole. The best advice I can give you after that first rule is that you should ignore what people say and just get your work done. That&#x27;s the thing that differentiates people who stay working in this field and those who don&#x27;t.
tonyover 7 years ago
Python<p>Django, a highly competitive web framework. With great extensions like Django REST Framework. Assets with django-webpack-loader. So on. It may not be as good as Laravel or Rails, but they&#x27;re all really active.<p>But the thing that makes Python best is the web framework is where it begins, not where it ends:<p>Want text analysis? NLTK or spaCy<p>Data? Pandas, numpy, pytables<p>Want more analysis? scikit-learn, tensorflow, theano.<p>Solid language standards? PEP8 and PEP257 makes most python code you see in open source very conformant<p>Test framework? pytest. And its plugins. tox for testing against a matrix of python versions&#x2F;settings (kinda like Travis).<p>Handling environments + packages easily? pipenv<p>Multiple python versions? pyenv<p>Editor integration? Jedi + python-mode for VIM, VSCode, Atom, Python<p>Images &#x2F; Graphics? pillow<p>Super-powered REPL? ptpython<p>Deployment? Fabric, Ansible, Saltstack<p>Documentation? Sphinx, Docutils<p>Want C&#x2F;C++ integration&#x2F;performance? pybind11, cython, CFFI, swig<p>Mobile dev? kivy (though I wouldn&#x27;t say it&#x27;s the best yet, when I tried it, setup was easier than react-native)<p>And that&#x27;s just scratching the surface. Python has high quality, permissively-licensed libraries, with solid documentation. A lot of the plugins I mentioned above for handling data use C-level speedups. Of these, tensorflow, and Theano can use GPU speedups.<p>Rails is fantastic. I like guard and the asset pipeline. But I just learned to use GNU Make&#x27;s &quot;$ make -j task1 task2&quot; and django-webpack-loader. I also hear good things about Laravel in PHP.
评论 #15967393 未加载
lastofusover 7 years ago
You seem overly concerned with Hype Driven Development.<p>There&#x27;s not a lot of new stuff coming out of these frameworks because of how mature they are.<p>Both languages&#x2F;frameworks are comparable. Your end product will not be very different regardless which route you take. Both languages and frameworks will be maintained 10 years from now. The job market for both will exist 5+ years from now.<p>Pick one you like and get to work!
haskellandchillover 7 years ago
Python is a good career move. Ruby is more fun. There&#x27;s no right answer :)<p>I program in Ruby right now for work but am comfortable switching to Python. There are plenty of Ruby positions available, we&#x27;ve hired 5 or so Junior Engineers out of Rails&#x2F;JavaScript bootcamps. It&#x27;s just that Python has the data science and machine learning positions in addition to web development.
phren0logyover 7 years ago
Have you looked at Elixir &#x2F; Phoenix?<p><a href="http:&#x2F;&#x2F;phoenixframework.org&#x2F;" rel="nofollow">http:&#x2F;&#x2F;phoenixframework.org&#x2F;</a><p>It has some Rails roots, so you might like it.
评论 #15956927 未加载
chrisfinneover 7 years ago
I can&#x27;t recall ever hearing anyone say they &quot;hate Ruby&quot;.<p>Ruby is designed to make programmers happy.<p>Ruby and Rails are &quot;boring&quot; because they are mature and do their job extremely well, so the cutting-edge devs that helped get them there got bored and moved on to other newer ecosystems.<p>If you are more interested in getting the project done fast and efficiently and you don&#x27;t mind doing it someone else&#x27;s way, then RoR is a good choice.<p>If you like to do things your own way, then Rails will probably frustrate you because it is very opinionated on how things are done. You can override everything, but some people&#x27;s personality is more suited for the node.js world that is far less of a framework and more of an ecosystem of libraries.<p>These are 2 popular posts that will help you figure out if RoR is a personality fit for you:<p><a href="http:&#x2F;&#x2F;david.heinemeierhansson.com&#x2F;2012&#x2F;rails-is-omakase.html" rel="nofollow">http:&#x2F;&#x2F;david.heinemeierhansson.com&#x2F;2012&#x2F;rails-is-omakase.htm...</a><p><a href="https:&#x2F;&#x2F;medium.com&#x2F;@timbuchwaldt&#x2F;rails-is-boring-thats-great-f896e9ab2cb" rel="nofollow">https:&#x2F;&#x2F;medium.com&#x2F;@timbuchwaldt&#x2F;rails-is-boring-thats-great...</a>
评论 #15959332 未加载
harry8over 7 years ago
There are 2 choices of language for any side project.<p>1) the language you know best<p>2) the language you most want to learn<p>Only you can decide on which has a higher priority.
评论 #15959388 未加载
h1dover 7 years ago
I have almost come to regret learning Ruby because it is a beautiful language that I wish it would be my main language but unfortunately I think it has lost scripting language race by the look of its popularity among competitors.<p>Part of the reason I suspect is the development cultural difference brought by language barriers. Without sound development, it surely will struggle to become better than alternatives.<p><a href="https:&#x2F;&#x2F;www.ruby-forum.com&#x2F;topic&#x2F;4570470" rel="nofollow">https:&#x2F;&#x2F;www.ruby-forum.com&#x2F;topic&#x2F;4570470</a>
评论 #15957962 未加载
brudgersover 7 years ago
For what it is worth, I think you will probably learn something from trying Ruby, even if you wind up sticking with Python. The community and language design are just very different from Python&#x27;s: MINSWAN v BDFL, many ways versus Pythonic PEP&#x27;s, everything is an object versus some things are objects, etc.<p>All this with the caveats that: I think both languages have advantages and disadvantages and I think knowing more languages is better than knowing fewer or one.
评论 #15957359 未加载
matt_sover 7 years ago
Programming languages are just tools. People that are finding they are productive with a language&#x2F;tool are out building things and not complaining.<p>I&#x27;m personally not someone that likes to look at new languages and compare them for the sake of it. There are folks that like to compare compilers or interpreters and the internals of how those work and debate them.<p>I&#x27;m more interested if something new can help me in delivery of working software. Having moved from a Java world to Ruby&#x2F;Rails, I find it not just helps me deliver, it pretty much gets out of my way (most of the time) compared to Java.<p>I haven&#x27;t done much more than read about Python&#x2F;Django&#x2F;Flask. If they are mostly similar to Ruby&#x2F;Rails it doesn&#x27;t sound like there would be benefit to learning them outside of curiosity (and an affinity to Monty Python).<p>I suspect that big name bloggers and people that talk a lot about things may find a need to keep viewers coming to their blogs&#x2F;channels. If there isn&#x27;t a lot of new stuff to write about but it is still a solid delivery platform, that isn&#x27;t too exciting to draw viewers.
aregsarover 7 years ago
I would take a look at Laravel which is php on rails with less magic and more built in features such as authentication and background jobs. The most important thing is that its community is growing rapidly and it has a BDFL ala DHH in Taylor&#x27;s Orwell. Also there are really good fresh resources such as latacasts Codecourse and the Laracon conferences
评论 #15957935 未加载
wasted_intelover 7 years ago
Ruby’s beautiful object model alone is worth learning. “Metaprogramming Ruby”[0] is a great introduction to that. Its flexibility is what makes things like DSLs so easy. The language also includes functional programming influences. I wrote Django apps in Python for the better part of two years, and for what anecdotes are worth, I didn’t learn nearly as much as I did writing Rails applications in Ruby. I’d pick Ruby every time.<p>[0] <a href="https:&#x2F;&#x2F;pragprog.com&#x2F;book&#x2F;ppmetr&#x2F;metaprogramming-ruby" rel="nofollow">https:&#x2F;&#x2F;pragprog.com&#x2F;book&#x2F;ppmetr&#x2F;metaprogramming-ruby</a>
madhadronover 7 years ago
If you&#x27;re already comfortable in Python, don&#x27;t bother with Ruby. You won&#x27;t find anything new there, and a lot of frustrating language design errors. I&#x27;ve written about this in more detail at <a href="http:&#x2F;&#x2F;madhadron.com&#x2F;posts&#x2F;2013-02-25-a-criticism-of-ruby.html" rel="nofollow">http:&#x2F;&#x2F;madhadron.com&#x2F;posts&#x2F;2013-02-25-a-criticism-of-ruby.ht...</a>.
rajangdavisover 7 years ago
I love Ruby, but Python is super simple to learn. I haven&#x27;t spent enough time with Python to do anything super cool with it, but it does seem to be more consistent in terms of the code you will read.<p>I also think that once you learn Python, a lot of other languages&#x27; syntax (such as Go and C# for me) becomes more approachable.
mastaziover 7 years ago
&gt; Rails is awesome but people hate Ruby<p>Is this sentiment common? It might be just my personal echo chamber but I&#x27;ve often heard the opposite stance, i.e. people saying they hate Rails because of all the &quot;magic&quot; but at the same time they like Ruby as a language because of its flexibility.
评论 #15957117 未加载
cmclaughlinover 7 years ago
I understand your concerns about Django and Flask... as someone who doesn&#x27;t work with either on a regular basis, getting reacquainted with Django feels very heavy... and Flask seems too minimal.<p>Anyway, I just started using CherryPy for a new project and would like to recommend it. I had actually used it around 10 years ago and hadn&#x27;t given it much thought until recently, but it&#x27;s quite simple and nice for REST APIs.
nickjjover 7 years ago
I would say try out both and use the one that makes you happy and is the best tool for the job.<p>Personally, I&#x27;m a big fan of Rails and Flask and use both on a regular basis.<p>You may also want to give this a read:<p><a href="https:&#x2F;&#x2F;nickjanetakis.com&#x2F;blog&#x2F;it-doesnt-matter-what-web-framework-you-use-just-pick-one" rel="nofollow">https:&#x2F;&#x2F;nickjanetakis.com&#x2F;blog&#x2F;it-doesnt-matter-what-web-fra...</a>
epynonymousover 7 years ago
i have a simple suggestion, you should learn both, we live in a polyglot world now, you need to be able to learn multiple languages and to do so quickly. i started with php then moved to python&#x2F;tornado&#x2F;sqlalchemy, ror, ruby&#x2F;sinatra&#x2F;activerecord, nodejs&#x2F;expressjs, and lately golang&#x2F;gorilla mux&#x2F;database&#x2F;sql. just start with one, suggest ror, i’m sure you’ll have multiple projects in the future. ruby was built for web app development, django’s a bolt on for python that then added web functionality. dont worry about the community issues, ror has enough great libraries out there that you could put together a pretty slick website quickly. a side note, if you need to use some scientific packages, python might be better supported like numpy etc. fyi ruby language is much nicer than python imho (insert flame war). dont dwell on this decision too long, either should be able to get you what you want which is a slick website, get a move on it
assafmoover 7 years ago
It&#x27;s your side project, do whatever you want! You said ruby is fun for you then go with it.
qumeover 7 years ago
If you code alone, use the best available which generally I assume people would say Ruby.<p>If you are intending to collaborate then python might be a better choice as its more popular.<p>Just a different take. Either one is great.
nunezover 7 years ago
I used to hate Ruby until I had to learn it two years ago. Now, I wish that this is the only language I&#x27;d ever need to use. It&#x27;s beautiful, and testing stuff with it is a BREEZE.
mixmastamykover 7 years ago
Python’s more broadly applicable, easier to read and maintain, installed by default on distributions. Pyramid is another good option if you have something against Django.
pknerdover 7 years ago
I would prefer to pursue Python further for data scraping&#x2F;analysis or bot development related things, PHP for Web apps and Go just for heck of it :&gt;
ksecover 7 years ago
Recently someone asked what worries you about future of Ruby on reddit.<p><a href="https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;ruby&#x2F;comments&#x2F;7jiq6k&#x2F;what_worries_you_about_the_future_of_ruby&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.reddit.com&#x2F;r&#x2F;ruby&#x2F;comments&#x2F;7jiq6k&#x2F;what_worries_y...</a><p>I will post my answer here, but it basically sums up a lot of things that were said in the replies here as well. If you want to be happy, just use what you are happy with, if you want a career out of it, choose sensibly.<p>We need to define a few things up front.<p>When people say Ruby is dying or dead, what dying or dead actually means is Ruby is not growing. Lot of people left Ruby, even the prominent ones, but there are also lots of new faces, as DHH likes to mention.<p>Languages dont die, especially when they are open sourced. Perl is still not dead, nor PHP. But consider if a languages is slowly moving towards irrelevant, then it is certainly considered dead. In this case Perl is an example, while PHP still has vast majority of the Web programming. In any case, the Job Pool is an easy indication, and no matter how you spin it, the Job Pool for Ruby Rails is definitely shrinking.<p>The problem is Ruby at its 1-2% low level of usage, should really be growing a lot. You dont see large web scale company using it, Python has Google, Dropbox, for example, using it as well as contributing to its development. Ruby doesn&#x27;t have any of that, and it isn;t trying to get being used for large corporate either. Its whole ecosystem is bond to Rails. Even the Release note of Ruby often mention Rails and nothing else. It seems at the moment Ruby is an Rails languages rather then vice versa.<p>When people say Ruby Rails dont scale, what they really meant was Ruby Rails dont scale cheaply compared to all others. Cookpad does close to 20,000 RPS, Shopify manage 80,000 RPS, and there were once information about China&#x27;s Railway ticketing system using Rails that does 400,000+ RPS, it was basically the whole China DDOSing the system. So Ruby Rails scales, but at what cost?<p>The Web is largely divided into two camp, one is the pay by user and SaaS model, much like Basecamp which Rails originate from, the other is Ads to user which needs to reach a critical mass before it starts to paid itself. The latter is the one much more popular and which Ruby Rails is having problem, because scaling to that critical mass requires substantial investment into infrastructure, and its cost structure is not very attractive. DHH used to say Moores law is helping them to grow, but that has no longer be true for recent few years, not to mention the Goal post of sustainable advert or per user revenue on a freemium model is getting larger then the speed of Hardware improvement. For example, on Stackoverflow Engineering blog, shows a fully optimize ASP.NET could do 10x more then Ruby at 10x Faster Speed while using 1&#x2F;10 of Servers.<p>There was a talk sometime ago about Go Vs Ruby, where Ruby was likely 30%+ more productive up front, it was 10x slower, 300% more maintenance work afterwards.<p>To put this simply, the maths and scale of economy doesn&#x27;t work very well for Ruby And Rails on many applications.<p>If you watched some Conf Video, Matz has went from Ruby is fast enough, good enough, to Ruby needs to be faster, Ruby needs concurrency. From Ruby is my languages, to Ruby is communities languages. The closed development circle of Ruby means it has seen much less contribution from outsider compared to Python. When Ruby needs all the help it gets, not having the conversation and development in open and easy to follow doesn&#x27;t really help. Although I understand the resistance to GitHub, but certainly GitLab is an alternative.<p>I also dont believe backward compatibility is the most important factor for 3.0. Ruby has quirks and in some cases far too many choices, and if MJIT is really faster, it should be used as an incentive to move the ecosystem forward. Making breaking changes at the MJIT support level. Taking the chance at changes to fix and improve things. While Matz have said they dont want another Perl 5 &#x2F; 6 and Python 2 &#x2F; 3 problem, but i believe this is different. Perl 5 &#x2F; 6 is literally a completely different languages they might as well call Perl 6 something else. While Python 3 offer changes while giving no immediate benefits to its users. JIT is a very good chance to use as bait and rethink what Ruby in the future should be.<p>The biggest problem often is Ruby as a communities dont see any of these as problem until it is too late. People flock to Go not only because of its performance, but because it can be easily deployed, and deployment isn&#x27;t something even on Ruby&#x27;s Roadmap. Ruby on Windows still isn&#x27;t as easy as any other counterparts. And it is too late to join the Data Science race. Sidekiq developers gained their success using Ruby has has now moved to Go, the same as Hashicorp.<p>I know this may be a little harsh, of course Ruby dont owe us anything, you are free to use and move on as you like, but it is sad that Ruby doesn&#x27;t grow bigger, it doesn&#x27;t need to take over the world, but it should have a slightly larger presence and usage across different domain. Luckily Ruby will always live on in the form of Elixir and Crystal.
评论 #15962387 未加载
grover_hartmannover 7 years ago
Stick to Ruby, Matz will give us new Ruby this christmas, and he&#x27;s the best mormon I have ever seen so that&#x27;s a plus.