Python vs. Ruby: Which Should You Choose?

Gabriel Demes
Mar 28 · 6 min read
Photo by Negative Space from Pexels

If you are like the thousands of people each year who have decided to study computer science, or have decided to learn how to code, then you have definitely faced this question: Which programming language should I learn first? In a sea of roughly 700 different programming languages, it’s already amazing that we can narrow down the list to two — Python and Ruby. But, which one should you pick?

In this article I will discuss some of the key differences between the popular programming languages, Python and Ruby. I will also give my opinion about which language is a better choice for new programmers looking to learn their first programming language.


Python was created in 1991 by a Dutch mathematician named Guido van Rossum. Despite being a general purpose language, Python is primarily used for academia, AI, machine learning, and data heavy programming. Ruby was created in 1996 by a Japanese computer scientist named Yukihiro Matsumoto. While also being a general purpose language, Ruby is primarily used for web development and functional programming.


Python is built on the principles laid out in The Zen of Python. Programming in Python focuses on readability and explicitness to insure that code is easy to follow from one developer to the next. Because of this transparency, code written in Python tends to be relatively easier to debug than code in other languages. Python tries to highlight simplicity by ensuring that there should be only one way of solving a problem. Therefore, Python offers little flexibility in how code is written and is more rigid in how programmers should solve problems.

Ruby’s philosophy is built around the human element of coding. Ruby was designed with the idea of using computers to work for humans rather than the other way around. As such, Ruby code often resembles human language. Because Ruby is centered around the human experience, it is very flexible in how problems should be solved. Ruby offers tremendous flexibility between developers since there is no right way of doing something in Ruby. Because of Ruby’s emphasis on human interaction, it isn’t very explicit like Python; because of this and it’s flexibility, code in Ruby can be very difficult to debug. Where as in Python it is very clear how code flows from one line to the next, Ruby has many things happening behind the scenes — think Ruby Magic!


Python has many frameworks such as Django, Flask, CherryPy, of which Django is the most popular. Django is a web framework that supports MVC (models, views, controllers) programming. It is known for being scalable and is very compatible with different databases and operating systems.

Ruby is known primarily for its web framework, Ruby on Rails (RoR). Ruby on Rails is a great framework for web development as it is known for its speed in the development process. RoR is also known for its community and resources such as its extensive docs, and tutorial videos. Lastly, there are many Ruby Gems available for Rails that allows quick and easy customization of web applications.


Since Python is an open source language, many people are constantly and consistently collaborating on new projects as well as innovating Python as we know it. Due to its constant transformations, the Python community is constantly shaping the direction that the language goes in — and you can too! Also, since Python is used in a broad array of disciplines and its popularity is on a steady increase, the Python community is ever growing. As such, programmers of Python can often find extensive resources to help them with their latest projects. Furthermore, with such a large community, libraries are always being updated and added, giving developers increasingly powerful tools to work with.

Like Python, Ruby is also an open source language, implying that it also has a large community behind it. However, due to its decline in popularity during recent years, the Ruby community is not as large as the Python community. Typically when talking about programming in Ruby it is in the context of Rails, so, both communities are talked about interchangeably. The Rails community, albeit slower than the Python community, is constantly innovating Ruby on Rails and is actively shaping the direction that Rails moves towards. New gems are always being added and updated which continues to push Rails forward compared to other frameworks.

Career Opportunities

As Python’s popularity in recent years has skyrocketed, so has its job opportunities. When Python is searched on LinkedIn, roughly 130,000 job listings are returned. These jobs range from data engineering, to web development. Python is extremely versatile as are the jobs requiring knowledge of Python. Still, many of the jobs seem to lean more towards roles involving data, due to the powerful libraries at Python developers’ disposal. Furthermore, according to Glassdoor, the average Python developer earns $85,634 annually, which may be understated when compared to the $103,807 average for software engineers. Some top companies using Python include: Google, Facebook, Spotify, Dropbox, and Netflix.

Unlike Python, Ruby’s popularity has been on a slow decline in the recent years. As such, job opportunities have also been on a decline, however, there are still many companies hiring Ruby developers. When Ruby is searched on LinkedIn, roughly 25,000 job listings are returned. Most of these positions are for Ruby on Rails developers and full stack engineer positions. According to Glassdoor, the average Ruby developer earns $78,878 annually, which again may be understated when compared to the $103,807 average for software engineers. Some top companies using Ruby include: Airbnb, Bloomberg, Github, and Yellow Pages.

Which to Choose?


I’ll leave you with the best advice that a software engineer gave me when I was considering learning to code: “Just pick one, start, and don’t look back.”

Happy Coding!


Everything connected with Tech & Code

Medium is an open platform where 170 million readers come to find insightful and dynamic thinking. Here, expert and undiscovered voices alike dive into the heart of any topic and bring new ideas to the surface. Learn more

Follow the writers, publications, and topics that matter to you, and you’ll see them on your homepage and in your inbox. Explore

If you have a story to tell, knowledge to share, or a perspective to offer — welcome home. It’s easy and free to post your thinking on any topic. Write on Medium

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store