Inspired by Learning Python from Ruby; Differences and Similarities.
I'm in the exact opposite boat - I'm pretty well-versed in Python, but I need to start learning Ruby soon (and Rails later, but that's another topic). The question I'm linking to addresses this a bit, but are there any other resources out there that teach Ruby for someone who already has Python experience? (In other words, someone with a background in programming, but who doesn't yet know the difference between code that IRB will execute properly and proper Ruby code.)
EDIT: I'm not just looking for a list of the differences between the two languages - I'm wondering if there are any guides/walkthroughs that are directed towards teaching Python programmers to write idiomatic Ruby. I know similar guides exist for migrating to Python from other languages, but I don't know about Ruby.
Python is generally better for educational use or for people who want to build quick programs rather than work as developers, while Ruby is better for commercial web applications. There are more specific differences when comparing Ruby versus Python, and they have in common that there are many ways to learn both.
Learning Curve Without a doubt, Python is much easier to learn because of how the language is structured - and how explicit it is. One can literally become proficient in two to three months. Ruby takes much longer to learn due to its flexibility.
They have similar performance because both Ruby and Python are scripting languages. Each framework provides you all the concepts from traditional MVC frameworks like models, views, controllers, and database migrations.
Whether you should learn Ruby or Python depends on the applications you want to use programming languages for. Ruby is more difficult to learn than Python and is best for web development and design. Python is ideal for data science use cases, and it's best for tech newbies.
While not targeted at Python programmers, you might find this idomatic Ruby talk useful.
(Related, but for Python: Code Like a Pythonista: Idiomatic Python)
The Ruby website has a page exactly on this topic. It's a summary list, so other answers with more best-practice style comments are surely a good idea.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With