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.
Videos
So I just graduated with my associates in web and software development, and while I'm job searching I'm gonna try to add another language to my toolkit. I really want to do back-end development primarily.
So I was wondering which is better to learn for back-end web programming. I've been told Ruby is more for web applications and Python is more for scientific programming?
Any advice would be great!
I would say look for what jobs you want to apply for and see what they use in their back-end. Python and Ruby are both good for web development, but PHP and javascript have more real estate in web development.
Iโve never used Ruby, but Iโve heard great things about Ruby on Rails for backend work, so it seems like a perfectly good language, but not the most common one.
Python on the other hand is used in a vary broad variety of settingsโbackend APIs, artificial intelligence, data science, image processing, random utility scripts, desktop apps (pyQT), etc. You will likely encounter python many times in your career going forward, so itโs definitely worth knowing. I vote python.
Ruby and Python are the two most popular programming languages. Both languages possess different philosophies, came around the mid-90s to address various needs in the programming community. Theyโre both flexible, object-oriented languages, dynamic, and have a lot of different functionalities, required to empower web development.
Both frameworks provide views, controllers, and models to power your web application and an API that offers endpoints to address your needs.
When you are planning your new web development project this 2020, choose a framework that can provide every tool you need. And both Ruby and Python seem to be the perfect answer to these specific web development needs.
In Conclusion
After doing this Ruby Vs Python comparison, one thing is clear that both are equally capable, which language is better for your project, that is the main deciding factor ultimately. In fact, many of the changes and new features in Python are first tested in Ruby.
If you are looking at only building web applications, then consider Ruby on Rails. On the other hand, if you are interested in building web applications but would like to also learn a language thatโs widely applicable and proficient with handling data analytics than Python is the best bet.
Also, when looking to add more features to your web application, like machine learning or other areas, Python is a perfect choice as it has libraries that support other fields.
Ruby focuses on giving developers the freedom to do whatever they want and staying out of their way, whereas Python developers are somewhat conservative and value stability over change. (developments and new features are slowly added)
Both Ruby and Python are fast and simple programming languages. For projects that include a lot of data computing, processing, and analytics, Python is probably the best option. However, Ruby suits projects that are traffic-heavy and involves rapid prototyping.
For A Better overview Check This - https://codersera.com/blog/ruby-vs-python-which-is-better-for-web-development/
Technically, Python and JavaScript are the two most popular programming languages in 2020, Ruby doesn't even come close.
Of those you'd probably wasnt to choose JS for front end and you have a hard choice between two for back end. Python does provide plenty of tools for back end development.
Hello! I'm a bot!
It looks to me like your post might be better suited for learnpython, a sub geared towards questions and learning more about python regardless of how advanced your question might be. That said, I am a bot and it is hard to tell. Please follow the subs rules and guidelines when you do post there, it'll help you get better answers faster.
Show learnpython the code you have tried and describe in detail where you are stuck. If you are getting an error message, include the full block of text it spits out. Quality answers take time to write out, and many times other users will need to ask clarifying questions. Be patient and help them help you.
You can also ask this question in the Python discord, a large, friendly community focused around the Python programming language, open to those who wish to learn the language or improve their skills, as well as those looking to help others.
README | FAQ | this bot is written and managed by IAmKindOfCreative
This bot is currently under development and experiencing changes to improve its usefulness
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.
We are looking to start developing our new web app and as our master knowledge falls under the PHP umbrella and a bit of python/django, I am deeply puzzled on what language to choose and start learning in parallel.
As far as I have seen, both languages are great and have their own pros and cons. I am mostly into python but I've seen the 7 out of 10 startups developing in ruby (RoR) and I wonder.. why?
If the application succeed, then I want to look forward and find out what the best will be for the future also. What's your opinion ? We are talking about a social application, with user profiles and all the features a modern application has (tags, likes, follows, messaging, notification, error handling, galleries etc.) which will expand to mobile.
If you are learning it yousrelf, there are more web-dev related libraries written in Ruby than in Python, more web related tools like Chef, Vagrant, Rake, etc written with Ruby, and a larger web development community for Ruby. Rails is more popular and more documented than any other framework. Python is more popular as a general purpose language, however, and you will have an easier time finding Python classes and lectures.
The languages are very similar and probably 80% of the knowledge and experience you acquire will apply to both. Someone with good experience in Ruby will pick up Python very easily and vice verca; it is more like speaking British English vs Midwest-USA English than Mandarin vs Spanish. If you already have significant experience in a language, use that.
Ruby is faster to get set up and has a better web dev community. Ruby is used almost exclusively in a web context. So I'd go with that.
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 have been working with PHP for the past few months at my job, but ruby on rails and django seem to be gaining popularity.
The comments in a previous thread on programming exploded with opinions on each language, but they didn't really list any pros and cons.
I got a bit of feedback on a previous post, but a bit more would be greatly appreciated. Could I give a bit more detail on why ruby and python may be better languages for web development?
How will creating a new thread about the same topic help you more than your earlier thread which "exploded with opinions on each language, but they didn't really list any pros and cons"?
Let me save you the time and trouble. There's no list which will help you decide, especially when you haven't specified what features are most important to you.
If you really want to find out, learn the languages and then figure out which one is made for you.
This topic has been beaten to death many times by many people already. (Copy paste the subject to google.com).
There are thousands of high quality applications written in Python and Ruby and are out in the wild.
If you think you will be spending lot of time in web development world for the forseeable future, why don't you spend just 2 days (1 each for Python and Ruby) to develop a very simple app and get a hang of them.
You will get the answer.
Good luck.
I've started my journey into web development and have been learning the standard front end stuff (HTML/CSS/JS). I want to explore the back end through a server side language. My problem is after a lot of research, I can't seem to find anyone talking about or explaining the differences between the languages I've listed. Everyone says the language doesn't matter but there has to be differences. There has to be a reason Facebook chose PHP and Twitter chose Ruby.
There has to be a reason Facebook chose PHP and Twitter chose Ruby
You should not neglect the popular reason - developers who started these things simply preferred specific languages because they used them recently and feel more confident. When you are doing some startup, there are two crucial points:
-
choose the more suitable language;
-
choose the language which you know better (because language which you do not know will suit poorly because you surely will kick around many bugs and wrong solutions at beginning).
While these languages are different enough in its syntax and even "paradigm", technically it is almost the same, moreover that nowadays popular approach is to build sites as Rest API + nice javascript client (written in Angular etc.) - for such cases it is even less important which language you will choose - add Node.JS, C# and Java here.
Everyone says the language doesn't matter but there has to be differences.
Surely there are difference. Python is bit more organized compared to PHP, but has two still not merged versions. PHP retains OOP structure closely reminding one of Java and C#. Ruby is "more functional" than both. Node.Js is chosen by those who want to "do all in one language", but sacrificing OOP. It is mostly the matter of personal preferences. Technically all those languages are scripting ones and their performance and features are comparable.
More difference is made when you use some compiled language, like Java / C# / Scala etc. Development with them could seem bit more robust (but more slow and somewhat more expensive). They are often chosen by larger teams for products which are going to be developed and supported during long period of time. Roughly speaking they make you write slower, but debug less (especially others' code). The same was with Facebook's "PHP" - you know they wrote special translator which converts PHP sources into C++ language and then compiles them (if I am not mistaken).
I can't comment much on ruby as I have not pushed myself to work on it. Currently I have two ongoing projects, one in PHP and one in python. For python I am specifically using the Django framework. In my opinion Django has been hard to learn and get into but once it clicked I was shocked at the power of it and the endless opportunities. With PHP it has been the opposite, picked it up quite easily but I either run into limitations or get frustrated with errors. I have found the PHP documentation to not be so great.
If you want to get going right now, go with PHP. If you have experience with python or ruby give Django or ruby on rails a shot. You won't go wrong with any of the options and will find the prefect fit as you learn more.
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
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.
Python is one of the most used programming language but some languages like Ruby were not so different from it and are very less used.
What is the main factor which make a programming language popular ? Where are People using Ruby 10 years ago ? What are they using now and why ?
According to you what parameters play a role in a programming language lifetime ?
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: .
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.
tl;dr: Trying to decide between learning Python or Java to break into professional development. I like Python, but Java seems to be in more demand. Thoughts?
Hi all! In a nutshell, I earned a bachelor's degree in a field completely unrelated to IT in 2011, but I got into tech support shortly after and wandered into some basic infrastructure stuff. I'm really enjoying it, but I know that, long term, the only thing that's going to be able to hold my interested is development.
I know HTML/CSS, some Grails (long story), and enough PHP to make a functioning website but not an elegant one. My apps work, but most of the time I find I'm coming at tricky stuff with a sledgehammer rather than any kind of nuance. The plan right now is to build up a portfolio of projects and try to eventually get into a development jobโI just don't know which language to commit to first.
-
I'm a fan of PHP and am getting a pretty good grounding in building dynamic sites with it, but I suspect it's only because it's easier to fake a solution than it is in the compiled languages. I'm under the impression that, going forward, this probably isn't a particularly attractive language to set myself apart.
-
Learning Python is at the top of my list right now, and checking out Django only encouraged me further. But...
-
Every job listing I come across is for Java. I try to peruse a few of the standard websites every once in a while to see if I can't glean any insight into what I might try, and Java seems to outnumber the other listings at least 10 to 1. I'm in a pretty big city, so it's not like there are 11 listings total, but there are noticeably more.
In any case, thanks very much for reading this far. I know learning multiple languages for different tasks is the big-picture answer, but I really want to work at understanding the ins and outs of one for starters, rather than learning enough to smash something together and not going any further.
edit: Formatting
rev_bird, what is your ultimate goal? Is it just to get a secure job, or are you also interested in other aspects (e.g. ease of learning, programming joy, etc.)?
A few quick thoughts:
-
With any language, it's a question of supply/demand. There may be more demand for Java, but there's also more supply.
-
Knowing Java and Python will get you into different kinds of jobs. Sure, there's overlap, but there are also differences. Enterprise jobs tend to require Java a lot more than, say, smaller web dev shops, companies that do data analysis or startups - they are more likely to be Python oriented.
-
Any language you learn is just a tool. If you asked us whether you should learn how to use a sledgehammer or a drill, we'd tell you learn the one that better matches your needs - and ideally, you should be pretty comfortable using either. :)
Hope this helps!
The language isn't the most important part, what is important is which kind of projects you get assigned to by your company. There is a shortage of good devs, the devs that a company can let work on a large enterprise application without them mucking stuff up.
The chance of getting to work on a large application is larger when you pick Java, but there are also some large applications being developed in Python or JS for example. Software development isn't about languages, it's about experience.
So decide what kind of applications you want to work on, then decide which skillset makes you marketable.
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.
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?
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.