Ruby delivers on the promise of being "optimized for programmer happiness." But I think that in order to experience that you have to become fairly immersed. In fact, some of the best parts seem outright offensive at first (question marks in method names?!). No language is perfect. But once you get past the idiosyncrasies, I honestly do think Ruby feels better. That's pretty esoteric, so I'll try to call out some specifics as well. I agree with most of what's already been said, but I'll try to add a few things. In order of most to least significance (for me): The standard library, especially with regard to collection methods. Want to slice/filter/sort/chunk an array/hash in some weird way? Ruby's standard library almost certainly supports it. So many amazing things are built-in across the board. Not relying on indentation for scoping. It's one of my biggest beefs with Python. Yes, of course, code should be indented properly. But goodness....let my linter enforce that, not the interpreter. I don't love ruby's do/end keywords (I prefer curly-braces), but at least having a visual cue for end-block is a vast improvement over python. A more consistent interface. Everything is an object, and you invoke methods on those objects. I think [].size just makes more intuitive sense than len([]). Great readability boosts from things like question-marks or exclamation-points in method names (admittedly that felt gross and wrong at first), trailing if-statements, unless-conditionals, invoking methods without parens (though I only sanction this if not passing args). A more helpful, less snobby community. 100% just my personal experience, maybe I've just had bad luck with pythonistas. No __init__.py nonsense. Maybe that's fixed/improved in python3? But I hate it. In fact, I hate any use of dunders...littering the code with unreadable symbols. Answer from human_tendencies on reddit.com
🌐
Reddit
reddit.com › r/ruby › benefits of moving from python to ruby?
r/ruby on Reddit: Benefits of moving from Python to Ruby?
May 31, 2022 -

Question from someone who invested much time in Python. What benefits Ruby has to convince to move? Instead continue with Python?

Top answer
1 of 13
34

When it comes to scripting languages, the objective differences are very nuanced. Largely, it depends on what you want to do. Python, for example, is extremely popular in the data sciences. A complementary example for Ruby would be rapid application development with Ruby on Rails, a web framework that allows you to build web applications very quickly. Another example would be building an API using Ruby's Sinatra library. Python also has web frameworks, so it's not as if Ruby has an exclusive claim to this benefit, but many developers find tools like Ruby on Rails and Sinatra very satisfying and beneficial to work with.

My recommendation would be to give Ruby an honest shot. Don't make the mistake of simply trying to write Python code using Ruby. Really dig in to what makes Ruby, Ruby. If you enjoy it, then you've added another language to your tool belt. If you don't, you might walk away with some ideas about development that you can apply to Python.

2 of 13
27

Ruby delivers on the promise of being "optimized for programmer happiness." But I think that in order to experience that you have to become fairly immersed. In fact, some of the best parts seem outright offensive at first (question marks in method names?!). No language is perfect. But once you get past the idiosyncrasies, I honestly do think Ruby feels better. That's pretty esoteric, so I'll try to call out some specifics as well.

I agree with most of what's already been said, but I'll try to add a few things. In order of most to least significance (for me):

The standard library, especially with regard to collection methods. Want to slice/filter/sort/chunk an array/hash in some weird way? Ruby's standard library almost certainly supports it. So many amazing things are built-in across the board.

Not relying on indentation for scoping. It's one of my biggest beefs with Python. Yes, of course, code should be indented properly. But goodness....let my linter enforce that, not the interpreter. I don't love ruby's do/end keywords (I prefer curly-braces), but at least having a visual cue for end-block is a vast improvement over python.

A more consistent interface. Everything is an object, and you invoke methods on those objects. I think [].size just makes more intuitive sense than len([]).

Great readability boosts from things like question-marks or exclamation-points in method names (admittedly that felt gross and wrong at first), trailing if-statements, unless-conditionals, invoking methods without parens (though I only sanction this if not passing args).

A more helpful, less snobby community. 100% just my personal experience, maybe I've just had bad luck with pythonistas.

No __init__.py nonsense. Maybe that's fixed/improved in python3? But I hate it. In fact, I hate any use of dunders...littering the code with unreadable symbols.

🌐
Reddit
reddit.com › r/ruby › ruby vs python
r/ruby on Reddit: Ruby VS Python
July 16, 2020 -

More than a versus (it's more striking) I would really like to know what things they have in common and how they differ, what their main advantages are compared to the other and of course their opinion of them. One point to take into account is because they believe that python is more used in AI and Machine learning developments.

Top answer
1 of 5
35
I think Python has a bigger community, and that is it's single largest advantage. It has more deployments and more packages. In think ruby has better syntax, better readability, and a more sensible design overall. This makes it easier for greater involvement from the community, there are something like 2x note python devs but not nearly 2x the packages. I also think the ruby community is better at communicating best practices. Consider that the top Ruby packages are testing tools and the top python of are a mix of docker and db stuff. https://rubygems.org/stats https://pypi.org/ I also find Ruby projects to have better engineering. This might just be bias but having tried similar things in both languages maintainability, support, and things working years later (except web API bindings) are nearly magical. The ruby community always seems to try to be doing better, but I guess that is most communities, but I feel like python users just want to be done and damn the tech debt, full speed ahead. EDIT 2 years later - spelling
2 of 5
11
Python was designed with a thing in mind: there is one best way to do something and that's all. Ruby lets you express yourself. There is always different ways to do something in Ruby (or at least I feel like it). It's up to you to decide if you see this as good or bad. Python has a really larger community. Mainly in sciences and data analysis. Probably because scientists that are not programmers found the language well suited because of it's ease of use. And there's a whole lot of scientific libraries. People bring people and so on... On a more personal side, I don't really like python because I don't find it... elegant. I use Ruby for personal projects and scripts as I know how to get things done with this little fella. Disclaimer though: I'm still a college student and don't have that much experience.
🌐
Reddit
reddit.com › r/learnprogramming › what should i learn? python or ruby?
r/learnprogramming on Reddit: What should I learn? Python or Ruby?
October 24, 2023 -

I started learning Python as a hobby some years ago. I really liked to learn it and I also made an app for me using PySimpleGUI to make exams reports (laryngoscopy). Then I saw Ruby and started to learn it and I like it a lot too. I made another app for exams reports using Ruby on rails. Now I want to go further, study harder to work as a programmer, but I really don't know if I go with Python or Ruby. Maybe Python should be easier to find freelances or jobs in the future? Thanks for your help

🌐
Reddit
reddit.com › r/learnprogramming › ruby vs python, for the back end?
r/learnprogramming on Reddit: Ruby vs python, for the back end?
April 14, 2023 -

So , I been thinking deep lately, with a sprinkle of curiousness. With all the hype behind python nowadays, I've noticed most people learn python and ruby is out of question for most juniors. Correct me if I'm wrong, but, if that's the case, Learning solely only python, wouldn't that create more competition for yourself in the job market if you're a junior competing with 90 % of other juniors who also only learned python for back end?? Would learning ruby and going that route / niche be a better option due to less people learning ruby, and an ongoing need to fill ruby positions? What do you guys think. I mean, as a developer, We are worth what the market is willing to pay at the end of the day. Less of a surplus in talented developers in a certain language drives a higher salary point due to lack of talent no? I've done research, and I don't see ruby going anywhere. Sure, anyone can learn both, but I noticed that's not the case. I rarely ever hear someone talking about learning ruby, it's always learn python. But is ruby a good choice for a junior developer trying to land their first job? By junior, I clarify as in, knowing and understanding intermediate to advanced programming concepts. Wouldnt it help you stand out a little bit better considering like I said most bootcamps and juniors learn Python?

Im attaining a software programming degree soon and am looking for a path to full stack, and just looking for some insight Any feedback / perspectives would be appreciated. Thank you guys so much for taking the time to read this post, and happy coding c: .

Top answer
1 of 2
3
Would learning ruby and going that route / niche be a better option due to less people learning ruby The flipside to that double-edged sword might be fewer overall positions hiring for Ruby, gotta go and look at the numbers yourself and so on. Caveats. Also, sometimes it just doesn't work that way with niches. For example, you might see the salaries for Elixir or Scala and think those would be nice to try to break into, but they're almost exclusively in domains like distributed systems and cluster processing, so you're looking at mostly senior jobs. Super unfriendly for juniors, even if you knew those languages deeply. Ruby is not that way from what I can tell, but this is more of a generality. Go with something utterly ubiquitous for maximum odds at junior jobs. JS, Java, C#.
2 of 2
3
If you learn ruby, then you'll really need to learn the full stack, which isn't necessarily bad. But i found that you have to be a complete expert in ruby nowadays to get any decent positions. If your going to exert that much energy you might as well just learn python. I found ruby, especially RoR to stagnate my progress so much I actually regressed. I use to be a badass with sql but after so many years of having it abstracted away I actually feel like a noob now with sql. And that's the problem. A real brutal way to put it is that it's the Fischer Price of programming. I will say though that it might be good to spend a couple weeks learning it purely for the purposes of learning object orientation since it is purely object oriented but that is not really a big deal anymore.
🌐
Reddit
reddit.com › r/ruby › elixir vs ruby vs python vs javascript | which path to choose?
r/ruby on Reddit: Elixir vs Ruby vs Python vs Javascript | Which path to choose?
December 18, 2023 -

I am completely sure I want to dive into the world of Programming (web dev) and ultimately get a job(in programming) to continue learning to program.

I have to choose a path: to get a Programming job and ultimately support myself.

Why should and shouldn't I choose the Elixir programming path to reach my goal?

I have dabbled into Elixir Programming a bit and I have already started to like it.

I have to choose a language and it's confusing. I like Elixir but I don't know where it will lead me, the other is JS, and Python which seem to have a lot of opportunities but I never got along well with both.
And then there is Ruby, which in terms of Job Opportunities seems similar to Elixir.

My Background: I am from a Commerce Background. Know basic Python, MYSQL, and created a few blog sites using WordPress and managed their backend by myself (cloud hosting), which gave me an understanding of configuring the NGINX webserve.

🌐
Reddit
reddit.com › r/learnprogramming › which is better for beginning programmers: ruby or python?
r/learnprogramming on Reddit: Which is better for beginning programmers: Ruby or Python?
February 7, 2022 -

Strictly between these two. Excluding their uses (Ruby mostly used for web dev, Python mostly used for AI/ML) which is more beginner friendly for new programmers, considering their syntax and features?

Top answer
1 of 7
7
Python because: The philosophy of " there's one obvious way to do it " means that the language is very idiomatic - lots of different Python programmers would often converge on very similar solutions to the same problem. Perl is the opposite philosophy, it's closer to Perl where there are often several ways to accomplish the same thing. Python errs on the side of "readable" and avoids magic. Ruby is full of magic variables you have to memorize if you want to be able to read anyone else's Ruby code. I disagree that it's used mostly for AI/ML. That may be one of the major uses now, but Python is the world's most popular "second" programming language. Tons of projects are written primarily in one language, but Python is the language behind the scenes that does build scripts, data analysis, random web scraping, and all of the other stuff that isn't part of the user-facing app. That doesn't mean Ruby is a bad language, just that if you had to pick one, I think there are some good arguments for Python.
2 of 7
2
After coding on/off for 20 years at a basic ass level, the ONLY language I've ever went "damn I get this" has been Swift. Yes, it's limited to one ecosystem, but the fact you could write something and run in XCODE or on your device, was just awesome and as long as you can google, S/O something you can build some cool stuff and play with it instantly + upload to the AppStore. In the early days (2002 - 2007) PHP was a good way to get "up and running" pretty quickly as well. Most of the web seemed to be based on this language and it was decent, but sloppy. RE: Ruby. About 10 years ago I did Hartl's Rails tutorial where you built a Twitter clone. It was OK, but never really made me go "wow, I'm using RoR from here on out!" - and Python has been that way as well, though I do like it. I wouldn't freelance with either, though. If I'm doing it all over again and looking for both employability and all-around use for web projects, I'd go JS. In fact, that's what I'll be doing just because it's so useful.
🌐
Reddit
reddit.com › r/python › ruby vs python
r/Python on Reddit: Ruby vs Python
August 12, 2013 - For instance, ruby has for...in but it also has a .each. There are two different notations for ranges (inclusive and exclusive), and myriad unexpected methods for other things: unless (instead if not), upto (instead of the aforementioned range), etc. It all seemed philosophically messy to me, like they just let whomever patch in whatever tool seemed most useful at the time, and did not imply the same rigid philosophical framework that the python community has adopted.
Find elsewhere
🌐
Reddit
reddit.com › r/ruby › what makes python more popular than ruby?
r/ruby on Reddit: What makes Python more popular than Ruby?
May 30, 2018 -

Hi folks, as a web engineer I've been coding for quite a lot in Ruby and Python and have an obvious question since that both languages are often compared to each other: why is Ruby not as popular as Python outside of the web? In my opinion obvious Ruby's advantages are as follows: object model is sane, neat and intuitive compared to Python's magic methods based duck typing, descriptors, metaclasses and imperative std; blocks are an absolute killer-feature; no Unicode hell; metaprogramming is easy to use; pip literally can't be compared to gems + bundler which can be found in almost all projects. The only advantages I can see in Python is list/dictionary comprehensions, and some low-level features buffer protocol.

🌐
Reddit
reddit.com › r/ruby › ruby or python for a first language? (no experience)
r/ruby on Reddit: Ruby or Python for a first language? (no experience)
March 29, 2019 -

Hey so as the title say, I'm really interested in becoming a DigitalNomad and learning how to programme, obviously this is not a viable career untill I'm confident with the language I learn. Just wondering what you guys think would be the best language for a person like me with no experience, I hear both are the easiest languages to learn (not to say they are not hard) If you could tell me some pros and cons of each language and what sort of work i would be looking at with each language (freelance & office) thanks, and sorry if this is not the place to ask!

🌐
Reddit
reddit.com › r/programming › python vs ruby
r/programming on Reddit: Python vs Ruby
August 23, 2022 - Python offers a wide range of data types such as form list, tuple, set, and dictionary. On the other hand, Ruby doesn’t offer a wide range of data types, but its array is equivalent to Python’s list and dictionary.
🌐
Reddit
reddit.com › r/python › why is python used so much more than ruby?
r/Python on Reddit: Why is Python used so much more than Ruby?
February 21, 2018 -

Hello,
I'm thinkink about learning new scripting language, Ruby or Python. I'm going to use it for creating non-web applications, for Windows and Linux. So my first idea was to look for already made applications.

There are lot of applications and tools for real-world usage written in Python. For example:

  • youtube-dl (famous console tool for downloading/converting videos)

  • OpenShot (GUI video editor)

  • Wifite (favourite tool for hacking wifi routers)

  • PiTiVi (another video editor)

  • Ubuntu Software Center (GUI package manager)

  • BitTorrent (original torrent client)

  • Blender (3D modeling tool and video editor)

  • ...and much more

But in Ruby, there is literally nothing famous except Ruby on Rails (which is not even application, but framework).

After checking the languages syntax I like Ruby much more. But it looks like every time real programmers have to choose scripting language for non-web application, they always choose Python over Ruby.
Why is that?

🌐
Reddit
reddit.com › r/ruby › why is ruby used instead of python/r/perl?
r/ruby on Reddit: Why is Ruby used instead of Python/R/Perl?
July 2, 2017 -

I have never worked with Ruby, but I work with all of the "other" scripting languages in data science.

Why use Ruby? Why does it exist?

Top answer
1 of 5
19

Ruby vs R - I don't see the comparison. Ruby is a general purpose programming language, R is specifically designed for statistical computing. Different tools for different jobs, you won't be building a web-app in R any time soon.

Ruby vs Perl - At the time Ruby was being developed, perl wasn't much of a general purpose language, it was mostly a tool for scripting and string processing and had a limited and rather bolted on object model. With modern perl you could make a more direct comparison but the mindshare has largely departed from perl and Ruby borrowed it's best features while adding a much stronger object model.

Ruby vs Python - These are pretty much directly comparable languages and it's more a matter of taste than anything. Python still has a bit of a bolted on object model which makes it a little weird to work with for those that prefer the smalltalk style object model of Ruby. Python has a strong following in the data science world due to the quality of supporting libraries: numpy, scipy, pandas, etc. Both rubyists and pythonistas have relatively strong opinions on language design that run into conflict at various points. As one example Ruby strongly favors chaining for functional programming constructs, map, filter, reduce, etc. Python heavily favors list comprehensions to fill the same use case.

2 of 5
6

Why would you use python instead of Perl? Or Perl instead of R?

Mostly preference, and sometimes availability of a certain library (for ruby, classically Rails).

Why does it exist?

https://en.m.wikipedia.org/wiki/Ruby_(programming_language)#History

I was talking with my colleague about the possibility of an object-oriented scripting language. I knew Perl (Perl4, not Perl5), but I didn't like it really, because it had the smell of a toy language (it still has). The object-oriented language seemed very promising. I knew Python then. But I didn't like it, because I didn't think it was a true object-oriented language — OO features appeared to be add-on to the language. As a language maniac and OO fan for 15 years, I really wanted a genuine object-oriented, easy-to-use scripting language. I looked for but couldn't find one. So I decided to make it.

🌐
Reddit
reddit.com › r/ruby › is ruby a changing language like python or is it "stable" like lua?
r/ruby on Reddit: Is Ruby a changing language like Python or is it "stable" like Lua?
September 12, 2022 -

Hi, Im basically looking around for a language that would replace Python for me. I need something that is easy and fast to write in, interpreted, and dynamic. Sure, Python is that, but also Python is a very fast-changing language which causes packages to be frequently out of date for specific versions or operating systems, there is a ton of features that get kinda forgotten because new ones were added.

Therefore my problem is that: I want to write high-level scripts/packages mostly for automation that I know will run today and in 5-10 years. Do I think I could achieve that in Python? I don't think so.

That's why Im looking at Ruby. I know that Lua is also a good candidate, mainly due to the fact that the whole language is basically in maintenance mode now, and no new features will be added. But its environment is not as mature as Rubys. So my question is how does Ruby compare to all of that?

🌐
Reddit
reddit.com › r/ruby › why ruby is more readable than python
Why Ruby is More Readable than Python : r/ruby
July 18, 2022 - Countless syntactical additions being made to language mixed with preponderance of aliasing of core methods, home-grown and 3rd party "cutesy" DSLs, meta programming, class << self vs def self.foo, do vs {} blocks, " vs ' etc... I can go on. These give people a lot of rope —just like Perl! Rope that Python does not have. Is this bad code or typical Ruby code?
🌐
Reddit
reddit.com › r/ruby › should i learn ruby or python?
r/ruby on Reddit: Should I learn Ruby or Python?
September 9, 2017 -

Hi I want to learn an all-purpose scripting language which I can use in:

  • Unix text processing (instead of awk, sed, Perl)

  • Web development

  • Programs for Unix open source projects

  • Mobile Dev (not as much important as the first three items).

So, Ruby or Python?

Top answer
1 of 14
40

Unix text processing (instead of awk, sed, Perl)

You've named the kings of that domain, ruby and python both have text processing/regexp facilities but they are nowhere near as fast. I like ruby's regexp implementation a little better than python's. (go figure, says the guy on the ruby subreddit)

Web development

Ruby has some pretty bitchin web frameworks, though django and flask do a lot of the same things. The only thing that might edge ruby out as a clear winner here is that rails has so much community support, so if you don't want to re-invent the wheel, you can use a gem, whereas python might not have the same level of community support for django. It's probably pretty close.

Programs for Unix open source projects

Python is probably viewed as more of a "systems language" now than ruby. Both are equally capable of being scripting languages used for everyday tasks, just depends on what you're wanting to do.

Mobile Dev (not as much important as the first three items).

Ruboto/Rubymotion/Mobiruby are all things. I think ruby might actually take this the most handily.


tl;dr Learn multiple languages, use the tools that make sense for the project. Don't be bound to a single language.

2 of 14
28

I did 8 years of scientific programming in ruby, and 3 years of professional web dev in python (yes, it's ironic). Both are great languages, and I'm more than happy to code in either language at this point. I personally think ruby is easier to use for most of the things you mentioned, and I think ruby is a more elegant language than python (I think ruby is a better language, but I do think aspects of python are better).

You really can't go wrong with either. And, as was already pointed out, use python 3.6 if you choose python (the 2 train has left the station, thank heavens).

🌐
Reddit
reddit.com › r/learnprogramming › python or ruby to learn?
r/learnprogramming on Reddit: Python or Ruby to learn?
May 17, 2019 -

I am new to programming and would like to learn a language good for web and app development. I have read python is a great all round language to learn to get started and Ruby is a little more challenging but more powerful in the areas I want to learn.

Which do you reccomend I put my focus in?