DEV Community

Cover image for What to choose: Ruby or Python?
Mary
Mary

Posted on

What to choose: Ruby or Python?

I asked myself once what determines the popularity of these two languages Ruby and Python?
Both Ruby and Python have excellent frameworks, open and large communities and are widely spread. It’s no use to tell which one is “better” because they serve different goals. Our team comes to a conclusion that Python is an evident choice for developing complex, database driven applications,while Ruby is perfect for startups and quick development.

Latest comments (8)

Collapse
 
thorstenhirsch profile image
Thorsten Hirsch

I would chose the one that makes developers happy. 😉

Collapse
 
nitinkatkam profile image
Nitin Reddy

What to choose: Ruby or Python? This is a very subjective question. A startup or a project requiring quick development could use Ruby on Rails. If it's a machine learning application, Python is the preferred choice because of the availability of skilled programmers with experience working with Python's ML libraries. DevOps professionals use Ruby because of the tools they work with.

Ruby code looks very elegant (with ActiveRecord). Look at this...

Ruby:
3.days.ago

Python:
from datetime import *
date.today() - timedelta(days=3)

...but why limit yourself to only Python and Ruby? When you have complex code, C# has type-safety and syntactic sugar. If you're an O.O. purist, Java is your choice. Somebody somewhere is likely wanting to recommend C-server pages because the code is compiled and not interpreted and can serve a huge amount of traffic with fewer hardware requirements. Depending on what attributes you are willing to trade, you will pick a different programming language.

Collapse
 
tvinko profile image
Tomaž Vinko

Python is widely used by data scientists, so it's natural to have better ML libraries. I would prefer Python over Ruby in any case.

Collapse
 
darkwiiplayer profile image
𒎏Wii 🏳️‍⚧️

Wait what? Ruby is by no means efficient, and while it is viable for high-traffic applications, you'll have to throw much more hardware at it than with other languages. There's also nothing about python (or ruby, for that matter) that makes it specially well-suited for long and complex projects.

Saying ruby has a "limited" set of libraries is the most blatant lie in that whole article though. Rails is pretty much known for having a gem for almost everything. Same goes for reusability: ruby code is just as reusable as python. They both have a way of importing modules and a package manager.

Collapse
 
vrsaxena profile image
VRS

Python is the way to go !!

Collapse
 
uzair004 profile image
Muhammad Uzair

It also depend on geographic locations. As Ruby is widely used in europe but in Asia most people don't even know if that language exist unless one is doing coding from 10 years.

From every side, python is choice.

Collapse
 
slimdave profile image
David Aldridge

I think that if I was doing something that makes extensive use of a database then I'd be looking to use Ruby with ActiveRecord.

Our (Rails-based) system is backed by around 400 database tables, and I dread to think how we'd cope without ActiveRecord associations to join them and scopes to make selecting and inserting data more DRY.

Collapse
 
ponyjackal profile image
ponyjackal

Ruby