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?
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.
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).
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?
Videos
Question from someone who invested much time in Python. What benefits Ruby has to convince to move? Instead continue with Python?
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.
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.
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
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!
I think Ruby is better for learning.
Everything is an object™
clearly demarcating the end of a logical block with end, rather than whitespace is much easier to follow for beginners.
Documentation for Ruby is much more readable
Depends what you want to do, most Ruby people do web dev (e.g. apps's backend and websites), and python devs do a lot of data crunching and some web dev.
Personally I use Python sometimes for small things I can't do with ruby (mitmproxy, machine learning, etc.) but I try to send the data back to some ruby code as fast as possible :D.
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: .
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.
I'm looking to learn a new language, so I can extend my web-oriented programming skills.
I've read a lot, even watched a few Youtube videos that answer the question: should I use Python or Ruby.
I was unhappy with most of the explanations, so I've decided to ask the community.
I'm curious to know which is easier, which has more learning resources, bigger community, and most of all - which is more used in practice.
I know reddit engine is written in Python, so is Google (or parts of it), discuss, pinterest, and on the other hand Twitter, ProductHunt, Hulu, Scribd, Zendesk, GitHub - are written in Ruby.
So, what are your recommendations - which one should I learn?
Thanks in advance :)
Check this link out. https://onemonth.com/blog/ruby-vs-python
Python is a language, and Ruby on Rails is a framework. A better comparison is Django vs Rails, or Python vs Ruby. I haven't done much Python, but Ruby is awesome. I'd personally recommend that, but there's no hard answer. Learn both. You should try to learn the language, not just learn the framework either way.
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?
To me, they're about the same. Yes, they have different philosophies (there's one way to do it vs. there's many ways to do it). Python is currently quite a bit more popular than Ruby, for several reasons
-
Guido, who invented Python, works at Google so Google uses Python (among other languages) a fair bit.
-
Python is associated with data science and numerical libraries (NumPy, Pandas, etc)
-
Python is taught at some US universities instead of, say, Java
Python has two web frameworks that people tend to use (Django and Flask) although there are other Python web frameworks. Ruby is most closely tied to Ruby on Rails (but again, other web frameworks exist, e.g., Merb, Sinatra, etc).
In the end, it probably doesn't matter which one you learn. I've played a little with both, and find they do roughly the same thing (maybe it's because I haven't delved into either deeply). Python's popularity might make it a better choice.
I'd say to go with Python just because of the relative popularity of the two languages. They are both highly-abstracted languages with minimal (if any) boilerplate. But Python has been around for a long time, and Ruby has been steadily losing popularity over the last 5+ years, maybe more. Rebounding from the "rockstar developer" years, I guess.
What should i learn first Ruby or Python and which is more imp?
Current wisdom is that Ruby has been on the decline for almost 2 years. Python sees almost 4 times the use, according to the Stack Overflow 2018 Developer Survey.
Which language you learn first basically doesn't matter. The important thing is learning programming concepts. Once you have learned your first language, you will very easily pick up future languages.
Neither language is more important than the other.
Python is arguably a better choice because it's so common as a language of instruction, and it is popular in a wider range of domains. I personally prefer Ruby though.
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?
I have decent experience with both and still strongly prefer Python syntax. The reason Python is more popular is probably a combination of the popularity snowball effect and the simplicity of the underlying implementation, which together lead to a huge selection of high quality libraries.
from Internet import Everything
That's why.
Yes, I'm in the right subreddit.
Any rubyists use python over ruby in some contexts? If so, which ones and why? Apart from winning by dying with the most skills, is it a useful addition?
Python has some good math libraries (see another post in this subreddit), that's about the only thing I can think of.
You might find this interesting:
Python vs. Ruby: A Battle to The Death
The talk is actually targeted at people interested in ruby who already know Python, but he does a pretty cool comparison of the two languages which might help you anyway.
Looking to pickup my first language and i'm with the understanding that either Ruby or Python is a great choice and very similar. I am under the impression that Python is somewhat more traditional in terms of syntax, but is easy to understand, while Ruby is about as human friendly as it can be.
I also am under the impression that Ruby is becoming more and more popular for webdev while Python is more for data manipulation. (though i am not entirely sure what this means.)
Is either one better/worse to learn? Is python more similar to other programming languages? Eg. learning python would be a segue into something else while Ruby seems to be its own thing. Besides syntax, are there any clear-cut benefits to either? It appears there isn't from what i've read.
Just looking for your opinions. I am trying to get a good Udemy course while the sale is happening, just not sure which to get.
thanks
So far, I've found them fairly similar. Python seems to have a strong foothold in data science (compared to Ruby). Ruby was very strongly associated with Rails (a web framework), but Python has Django and it has Flask.
I think Python has become a bit more popular, these days, but other than that. Both support OO programming.
According to https://insights.stackoverflow.com/survey/2018, Python is used by about 40% of people, while Ruby is used by about 10%. I don't think that really says much about either language. If a language is getting popular, more people start to learn it.
Python and Ruby are both great languages, but Python is definitely more popular of the two. Both are general purpose languages that have multiple uses, including scripting, backend web development, security, and DevOps tools.
Is your goal to get a job in programming in the future, or to learn to code for your own personal benefit? If it's for a job, I'd pick Python, but if it's for your own personal benefit I'd pick Ruby.
Purely for a hobby, not for work.
Your help needed, seasoned programmer.I've been debating a lot on what to learn next after HTML, CSS and JS.
A bit of background about myself: I'm a product manager and business-side partner that wish to gain deeper exposure to the technical aspect, so I'll be able to join a startup not as a completely-non-techy co-founder.I used to code when I was younger, mainly VB.NET and a bit of C, but that was long time ago. I don't wish or think I'll be able to be a pro programmer, just wish to gain an overview of front and back end so I would be able to have a look at code and speak about it rather freely.What I wish ultimately is to build a web-based business.
Now to the problem: I've been testing Ruby and Python quite extensively. I'm much more natural to Python, the syntax and the mind-set just comes easier to me, and I'm having hard time to grasp the Ruby's magic, i.e. I need to see things happening in front of my eyes not in the background. Also, Python seems to be much faster.
However, I feel that the world is going Ruby. I had a look at websites that are Ruby based and they look great. 'New world' websites. Of course it isn't the 'Ruby' that makes them look great, but it's like the innovation and creativity is set within the Ruby design somehow, and the practicality and simplicity within the Python one.
Can you refer me to beautiful sites that are back-end Python-based? (please no "Google!")Also, as a seasoned programmer, what is your opinion?
Thanks!
Anything could be written in Python, including Reddit, so I wouldn't obsess over the language because of how certain sites look. It's not like your small sampling is that meaningful, anyway. But, the normal flavor of Python isn't really fast at all.
However, I feel that the world is going Ruby.
Why would you think this? Twitter famously ditched Ruby and went to Java when they became too massive.
I had a look at websites that are Ruby based and they look great.
This has absolutely nothing to do with Ruby.
but it's like the innovation and creativity is set within the Ruby design somehow, and the practicality and simplicity within the Python one.
Again, what evidence do you have of this?
beautiful sites that are back-end Python-based?
Reddit? Again, the look of the site has nothing to do with the backend language. The "beauty" would be in the code itself.
Also, as a seasoned programmer, what is your opinion?
Both get the job done and are probably fairly similar in most things. Like you, I have a harder time with Ruby (and the, what I call, smalltalk-like languages in general) and am biased toward Python, but I concede both are great.
Hello,
So I’m really intrigued by watching one of the ruby on rails screencast and that has sparked my interest in learning Ruby.
I do have experience working in following languages:
Python (my strongest skill)
Java
JavaScript
I mostly code in python and I’m looking for resources to learn ruby.
I started Rudy in 2022, but my computer broke and I lost all of the progress and projects I built then. I wanted to go back and relearn everything I have forgotten but I wanted to know if it is even worth it learning all of this again?
I am current in college for software development, but I wanted to test the waters again of learning a programming language before I am hit with Java at Western Governors University, I had one web development class and I did pretty good, and also I want to work as a developer or get an internship somewhere
I know Ruby isn't as used anymore but it was one of the only languages i was able to learn at that time due to the syntax being simple, and it overall not being as difficult to learn certain concepts as i tried with JavaScript.
Just give me your thoughts on this?