So the question is Python Vs Ruby. Before we actually make a choice on this, let's just say that there is a lot of talk about this and to an extent you could say that the debate has been laid to rest. However, here in India, apart from the the small fraction of people involved in competitive coding or open source contributions, this is still a burning question. Which of these two languages, which is rapidly increasing in popularity, should one learn to get a job?
India is an interesting programming ecosystem. Most software skill adoption is directly related to its usefulness in landing a job. I have personally come across students who've told me that they'd been advised to learn python or ruby over the other, because it will help them get a job. They aren't wrong, as they're speaking from what they know.
But let's do some research. To understand why a job would require you to learn one of these languages, I think it is important to understand the differences between the two languages.
How are the two different from each other?
The two programming languages have philosophical differences. While Python believes in having only one way to do something, Ruby is built around the philosophy of having many ways of doing the same thing.
Python is modelled after the Fortran line; there is a clear distinction between expressions and statements, and between code and data. This makes it faster, and better suited to top-down programming. It is a lot easier to learn and to understand when reading it.
Ruby on the other hand is modelled after Lisp; there is no difference between expressions and statements, and code and data. The most striking commonality is how similar Ruby's blocks are to Lisp's closures. This makes it easier to do metaprogramming to solve problems, and so it is more suited to bottom-up programming.
There are many detailed blogs regarding the differences between the two languages. I liked this one the best -https://ochronus.com/a-
And which of these will get you a job?
Let's get one thing straight - if you're good at something, there is always a job for you. However, good is a measure of industry demand. Less demand means the bar for good is much higher when compared to more demand, where the definition of good is slightly lesser.
With that in mind, some basic trends analysis on Indeed.com, a job search engine says that the number of jobs postings on their site for ruby on rails is far more than the posting for Django, a popular web framework on Python. However, job searches for Python, the language, as a skill far outclasses Ruby. This tells us a few things.
Web or not
By the looks of it, Python seems to be a more popular language that Ruby, but the demand for their corresponding web frameworks is vice versa. This could be also because Python is also a very popular backend language, as opposed to Ruby.
So where does that put you, the job seeker? Many people say that learning Python is easier than Ruby. But when it comes to the web frameworks, Ruby on Rails is very powerful and it does a lot of work for the developer, leaving the coder to think more about the business logic of the application being built.
I think at the end of the day, it's a call on whether you want to work completely on web or do you want to work on backend code as well. If you want to work only on web, then you might have a better chance of landing a job with Ruby, as you can learn Ruby on Rails with relative ease after that. Python, on the other hand, can get you a lot of backend jobs and if you put in the time to learn Django, you can work on web applications also.