5 ms·
Better than Python? 15 years ago I would have agreed. Today, Python is a "gateway" to programming that is also the real thing. It's like one of those old lang
by p-e-w 3y ago
Better than Python?
15 years ago I would have agreed. Today, Python is a "gateway" to programming that is also the real thing.
It's like one of those old languages designed for beginners to learn coding... and then you can continue to use the same language for your entire professional career as a software engineer, to build just about any production-ready application.
Ruby is a beautiful language, but unless you are going to be working with Rails, it's not a very practical language to build something in. And I don't think telling a beginner "just learn Ruby for now, but once you're actually ready to write your first useful program, you're probably going to have to learn another language" is very motivating.
- sethherr 3y agoI love Ruby and write it professionally; unfortunately I agree - learning Python is more practical currently.
- realusername 3y agoThe biggest difference between both is mainly their machine learning story but if you don't intend to go in it (this is a very specific career choice), I'd say both are equally good options. I'd say both are pretty bad at performance critical tasks or UI stuff where usually you would use neither of those.
- newaccount74 3y agoPython is so much bigger than Ruby. It's not just machine learning. There's also numpy and Jupyter for the scientific community, which are huge. There's arcade for making 2D games. There's Micropython for microcontrollers. There are async database drivers and web frameworks. There's interop for many other programming languages, and it's really easy to make a distributable package with Python runtime included. And that's just what I can recall of the top of my head as someone whose primary language is not Python.
- chucke 3y agoYes, it is only machine learning. Trying to separate it from the scientific community is creating a wall that does not exist. Besides, barely anyone uses python for 2d games or microcontrollers (out of hobbyist programs, and ruby also has a stack there with mruby or dragonruby, which have professional adoption mostly in japan), and you can't say with a straight face that python is a meaningful player in the Web application space, beyond its niche (and async python is a s**show).
- p-e-w 3y ago> Yes, it is only machine learning. Trying to separate it from the scientific community is creating a wall that does not exist. What? 99% of science has nothing to do with machine learning. Jupyter is used in a million different environments such as pure mathematics or computational chemistry where machine learning is almost completely absent. > and you can't say with a straight face that python is a meaningful player in the Web application space, beyond its niche According to the 2023 Stack Overflow Developer Survey[1], Django is more than twice as widely used as Ruby on Rails. [1] https://survey.stackoverflow.co/2023/ https://survey.stackoverflow.co/2023/
- chucke 3y ago> I didn't mean as it's the same thing, I meant there's significant overlap across the ecosystem for both. The most obvious example is numpy, and the role of narray as an almost native type. > According to the 2023 Stack Overflow Developer Survey[1], Django is more than twice as widely used as Ruby on Rails. Even I'd consider SO surveys relevant, it'd still be a niche, just a bigger niche than rails.
- djur 3y agoLearning those specific environments and stacks will take more effort than learning however much Python is necessary for them.
- realusername 3y agoYeah sure you can, you can do pretty much anything in any language nowadays anyways, it doesn't mean that its going to be the industry standard. Even Ruby has DragonRuby for games (but not too popular either) For games, none of the big engines are python or ruby based and Micropython is more of a Python dialect to me with some partial compatibility, you can't just pip install what you want.
- dagw 3y agoThe tools and libraries for both GIS and Civil Engineering are also much much more developed in Python compared to Ruby. As are the tools for most areas of mathematics, and probably most other scientific and engineering fields.
- julik 3y agoAs far as the "UI stuff" goes sadly the Python ecosystem is way better - Python has both PyQL and Pyside which are a very solid choice for doing thicker client apps. Ruby doesn't even have decent Qt bindings, at all. Or didn't the last decade I've been checking.
- herbst 3y agoI never 'learned' python and ruby is the path I went with and still use for 90% of my own software. However Python is a easy transition. I rarely struggle to do anything with it when I need it. Even Django wasn't to weird to grasp after years of rails. IMO it's not to relevant which language you choose to learn in the beginning of your career. Whatever is more fun or works better for your interests.
- vidarh 3y agoThis (that it doesn't matter what you choose to learn early) is a key point. Early on you should aim to get exposure to multiple languages, ideally at least some very different ones. So I agree with whatever is more fun. Anything that makes you want to stick with learning is great. Then you can, and should, explore. If you want something that'll be a marketable skill right away, maybe Python will be a shortcut in the short term, but a developer who knows only one language - whichever one - is eventually going to be at a disadvantage. The most important skill is not any specific language, but learning how to think about software.
- weatherlight 3y agoAntoine de Saint Exupéry once said, 'If you want to build a ship, don't drum up people to collect wood or assign them tasks and work. Instead, teach them to long for the endless immensity of the sea.' This resonates with how I feel about programming languages. Python might be more practical, but does it ignite a passion for coding like Ruby has historically done? I remember dabbling in Python, Perl, and JavaScript (ES5) back in high school, but it wasn't until I rediscovered programming through Ruby that I truly began to enjoy it. Nowadays, I might not default to Ruby for new projects, having moved on to OCaml and Elixir, among others. Yet, there's something about Ruby's community (its charm and gentleness,) that's missing in many others. This nurturing environment is invaluable for beginners. It's noteworthy how members of the Ruby community, like José Valim with Elixir, Yehuda Katz with Ember.js and Rust, and Chris McCord with Phoenix, have carried this spirit of playfulness and a deep care for developer experience into other communities they've joined.
- VonGallifrey 3y agoThis is more or less personal preference though. When you say that Ruby ignites a passion for coding for you then that might not happen for other people. For example I only feel a headache when I look at Ruby code. For context: I worked with C, C#, some Python and now mostly work in Go.
- vidarh 3y agoHow often do you see people describe that kind of passion for Python? Maybe for lisps, Erlang, Haskell, Smalltalk. It may well put some people off, that's fine, but personally I dread it when I have to work with languages that don't instill that kind of passion. There are plenty of things I'd like to be different about Ruby and the tooling, but with Ruby I feel like I'm crafting something that at least has the potential for elegance, whereas looking at Python code is like staring at a brutalist building that spews its innards all over its surface. (and yes, I realise some people love brutalist buildings, and I can too, sometime, when particularly well done, and that's why I chose that example - it's possible to do amazing and elegant things in any language, even - as ugly as I personally find it - Python)
- swah 3y agoI wish Python had a bit of this thing (love?) that Ruby has, though...
- izietto 3y agoWhen I was young, and I had zero experience with programming, I was more comfortable with Ruby rather Python because: 1. significant whitespace was so hard to grasp. I was a beginner so I just needed to write awful code 2. Ruby was so "pure" from the OOP perspective that I had one thing less to think about: method calls start from object instances, period. Python has "exceptions" to this rule that made me confused (f.e. `len` in Python is a global function, while in Ruby is `array.length`) 3. I found Ruby matching more to English language Later I found that Ruby has deeply obscure islands (metaprogramming mainly, but also exotic syntax coming from Perl), but I was already sold to the language
- cutler 3y ago"not a very practical language to build something in" You mean something like Shopify, Stripe or Github? So switch to Python instead so you can be constrained by single-line lambdas and a runtime that performs almost exactly the same as Ruby?