Comparing Ruby to Python

Grant Hesketh
2 min readJun 12, 2021

I recently completed a skills assessment for my job search and ran into a bit of a wall. I had to solve an algorithm, pretty standard stuff, however I wasn't familiar to any of the languages that were available to solve. One of the languages was python. I tried to make it work but wasn't able to get the solution I wanted simply because I didn't know the language well enough. So since python is one of the more common languages, especially for scripting I though I would do a little dive into the differences between a language I do know, Ruby, and Python.

At the base level, Ruby contains a lot of built in functionality and things happening under the hood. This is great for developers as it provides flexibility and some streamlined looking code, however it does make things difficult to debug at times. Python on the other hand is much more direct. It makes things immediately apparent and visible to the programmer. It’s all stated very explicitly. While this makes it a bit less elegant it does make it much easier to debug.

Both have their own very popular web frameworks as well. Ruby has Ruby on Rails and Python has Django. They both have good performance and can be used to create CRUD applications with ease. They both also have community built add ons for increased functionality. Ruby has its gems and Python has its package index.

Coding wise they are not too different. Math, boolean values, and strings all work almost the same. A little difference comes with arrays. In python they are referred to as lists, but still behave the same.

Python is quite popular and is worth knowing in my opinion. So I will take my own advice and dive deeper into python!

--

--

Grant Hesketh

Full Stack Software Engineer with an Oilfield past