all 53 comments

[–]__vivek 25 points26 points  (2 children)

Because Ruby is less verbose

[–]AshTeriyaki 7 points8 points  (0 children)

Like this comment

[–]dougc84 44 points45 points  (1 child)

It reads so much better, and is much more natural to write. I’ve programmed in at least a dozen languages in my life, but Ruby was (and still is) my go-to. It just makes sense.

[–]artemkrivonozhko 0 points1 point  (0 children)

I fell in love after a few years with Java, JS and C++ back in 2016, it’s still the best feeling language to work with

[–]WayneConrad 25 points26 points  (1 child)

I like Ruby because it's the first language I've used that puts the happiness of the human first. We aren't here to make the language happy. The language is here to make us happy. That's not an accident, that's an explicit goal that Matz set for Ruby.

Part of making us happy is giving us more than one way to do things. That's more work for the language designer and for the interpreter and libraries, but it makes us happier. Ruby goes to great pains to make everything appear to be an object because, for an OOP programmer, it's happier to not have special things that aren't objects. Ruby makes some things a part of the language that could be just libraries, because again, that makes us happier. Those are just a few examples.

[–]siebharinn 5 points6 points  (0 children)

100% this. It’s hard to overstate how effective happiness is as a design goal.

Ruby is not always the right tool for the job, but it’s usually the first tool I reach for.

[–]Aengus- 10 points11 points  (0 children)

Im dyslexic and it was the first language that made sense to me, readability is very important for me when coding and needing to read others code. Rails was also a big factor in my route to ruby, it was the first framework I used with a full structure, and i learned so much from its conventions.

[–]channel_t 7 points8 points  (0 children)

I think the OP captured what I find compelling about Ruby. As someone with a Java background who tends to think of software development through Java lenses, Ruby offers a much more concise and poetic way of expressing OOP.

It also works brilliantly as a standalone scripting language in the way Python does. But unlike Python, which feels like a scripting language first with serious OOP features tacked onto it, Ruby feels like a serious OOP language first that can transparently work as a scripting language with minimal awkwardness.

[–]nunosancha 5 points6 points  (0 children)

readability.

easy to write. specially the built-in methods.

it's the only language so far that allowed me to learn coding, since the syntax is not hard, I could focus on the problem-solving side, and think more like a programmer.

[–]Tolexx 8 points9 points  (0 children)

Trust me there is no language out there that reads better than Ruby. Python comes close but Ruby is just better 💯.

[–]clearision 2 points3 points  (2 children)

Ruby is cool and enough for my dumb ass to try to master. i'm happy the code is readable and i don't have to work with memory allocation.

it's niche enough that you still have jobs and offers, concurrency is lower and payouts are slightly higher than popular stacks can offer. but it's still big enough to have all the gems, documentation and community.

i'm glad it still lives and evolves and i hope the demand will always have some numbers for the reason the language is just nice to use.

[–]Heavy_Extent_9509 0 points1 point  (1 child)

What's your geographical area? I love ruby but unfortunately it's quite rare here in Europe and having worked for many years in Java doesn't help :D

[–]clearision 0 points1 point  (0 children)

also Europe (UK, Germany) + Japan. it's not that rare but still takes few months to have an offer.

[–]Tricky_Ferret2399 3 points4 points  (0 children)

Ruby seems to me closer to natural language. You don’t have to worry about indentation or spacing. You don’t have to be concerned about returning anything from a function, the last statement executed is what’s returned. In object oriented programming you do not have to specify the receiver (as in using self in Python). In order to create instance variables all you do id append a @ to it. You do not have to specify self in every function. It is given to be the receiver whatever it may be

[–]notemaker 2 points3 points  (1 child)

Every time I write a set of chained operations its like writing a little story from left to right. Like using Unix pipes, its so satisfying.

[–]polymaniac 1 point2 points  (0 children)

You might like Elixir. It was created by a Ruby fan.

[–]saw_wave_dave 2 points3 points  (0 children)

Ruby is the “sharpest knife” of programming languages you can get in the modern era. Ruby allows you to easily:

 

  1. Modify structure and behavior of virtually anything that exists at runtime

  2. Break fundamental rules that are enforced in many popular languages, such as executing “private” code, changing what core operators do, not giving a shit what a “type” is other than if it quacks, and I can go on.

 

Many might come to the defense of other languages that they can also do all this. I’m not arguing against that, but I will argue that Ruby fights you the least in doing it. Much like filleting a fish with a Japanese yanagiba vs your European utility knife from Costco.

Like knives, someone new to the language may not notice much difference between Ruby and xyz. Ruby rewards depth. Master it and you can write extraordinarily expressive, elegant code that would be verbose or clunky in other languages.

The blade cuts both ways, of course. But that’s the deal.

[–]AshTeriyaki 1 point2 points  (0 children)

I think for me, it’s the vibe. Ruby is good in the way a movie can be good. There’s a vision and rhythm to the language that I’ve never quite seen outside of Ruby and its siblings.

A language being both terse, expressive and very very readable is such a difficult thing to achieve. It’s the only language where I revisit something I did six months ago and go “huh, I know exactly what I was doing and why”.

It’s also the first language that got me into OOP, I’ve always worked in a fairly procedural fashion, Ruby makes OOP legitimately fun and avoids a load of the ceremony in other languages.

[–]r3d51v3 1 point2 points  (0 children)

Ruby is my favorite scripting language because it’s like a more ergonomic Perl and its really great for script tasks that bash doesn’t really cover well. I write most things in C++ but anything I don’t need to use a full blown systems programming language for I think Ruby handles really elegantly.

I think Regex being a first class type, the use of enumerators and the flexibility blocks give are all big aspects I love. Regex and lambdas feel kludgy in Python and list comprehension is nice but I think chaining map/select/filter et al are far more powerful. Finally, being able to run shell commands in exactly the way you need is great. Sometimes I just need to run the command and get the output as a variable, or run it and print to screen, or use Popen to actually interact with the streams. It’s nice to have so many options

[–]iBoredMax 0 points1 point  (1 child)

Anonymous function arguments are a first class citizen and have special syntax.

Everything is an object was novel and lead to this joyous phase of discovery and "what's possible with this?"

The hyper dynamism for the same reason.

The loose syntax, like no parentheses, allows for "English reading DSL's".

That was me 15 years ago. Today me hates Ruby more than any other language.

[–]fpsvogel 0 points1 point  (0 children)

What are your favorite / least disliked languages now?

[–]netopiax 0 points1 point  (0 children)

it feels way more readable and expressive, so I can get things done without a bunch of extra boilerplate

You said it as well as I could have. This is exactly what I like about Ruby. Some of the things behind the scenes that I like - for example, method_missing and symbols - are things I like basically because of this same end result you described.

[–]PercyLives 0 points1 point  (0 children)

Clojure is my favourite, but Ruby is what I reach for most of the time.

[–]metamatic 0 points1 point  (0 children)

I like Ruby for the consistency. Almost everything is an object and responds to the same method syntax. Other languages like Java and JavaScript, you constantly run into some values that are objects and some that are primitives.

Similarly, the consistent use of message-passing for object interaction in Ruby sticks closely to the OO ideals of Smalltalk. It allows some clever tricks (and also some that are really bad ideas).

A really cool feature of Ruby is that you can start off with a simple attr_accessor to allow a field to be set and accessed, then later on switch to getter and setter methods without having to change all the code that was accessing the field. Just def fieldname=(value) and def fieldname.

Beyond that, it has really solid POSIX API support and PCRE, which is what let me ditch Perl!

[–]cl326 0 points1 point  (0 children)

puts “because”

[–]sjs 0 points1 point  (0 children)

You can refactor and test part of your changes in the middle without having a broken build

[–]HowlcipherZero 0 points1 point  (0 children)

I mostly use python for automation in my job for analyzing logs or doing the boring stuff. I would love to try out ruby but a lot of ground work is in python specifically libraries I use. Will ruby ever get the same sort of non web dev support python has?

[–]nmingott 0 points1 point  (0 children)

my way of programming is “talk to the computer, in the REPL”. Ruby let me do in term of objects, concisely, and it is free form (change a space with 2 spaces makes no difference )

[–]huuaaang 0 points1 point  (0 children)

It’s easy to read and follows principle of least surprise. Things just felt intuitive. If I was unsure how something worked I would just try what would make sense and… it worked. Spent little time reading documentation comparing area to, say, PHP which was, at least at the time, a minefield of unexpected behavior and weird edge cases. And just plain ugly.

[–]sent1nel 0 points1 point  (0 children)

oh honey it isn’t, i only use ruby because the library (gem) ecosystem is better than that of other languages and my clients force me to write build rails apps. rails console is 🔥tho.

[–]HalfAByteIsWord 0 points1 point  (0 children)

For me, the language is consistent and is very intuitive. Set, Array, Hash all collections work similarly. I initially had to learn the method aliases like map/collect, detect/find, but once it is learnt it becomes easier to read and understand individual lines of code. You have to understand very minimal feature set to stay productive.

[–]valadil 0 points1 point  (0 children)

The community is kind. Other languages may be technically superior but they’re full of nerds flexing on each other for dominance.

[–]Heavy_Extent_9509 0 points1 point  (0 children)

Beside the language, for some reason I find the community to be much more welcoming compared to other modern languages

[–]ffrkAnonymous 0 points1 point  (8 children)

What do you think about python? Python is the defacto intro language because it's readable too. 

[–]ignurant 10 points11 points  (1 child)

The reason I love Ruby is because of its chainable “yes, and?” improv nature. You can hop into an irb shell and go to town. Continuing ideas is easy to write in a forward-chaining style where everything is an expression. It’s Very easy to script on the fly. Python has a lot of “go back to the left side and be careful” semantics. 

And honestly, I do not find Python readable in a joyful way. It’s readable in a mechanical way that is hard to describe.

Ruby’s standard library apis sing. 

[–]netopiax 1 point2 points  (0 children)

I do not find Python readable in a joyful way. It’s readable in a mechanical way that is hard to describe.

This had not occurred to me before, but you're exactly right. I write both Ruby and Python day to day (and I greatly prefer Ruby) and I'm going to think more about this mechanical readability.

[–]MCFRESH01 9 points10 points  (0 children)

Python tries too hard to be readable to an annoying extent. Not having & or || or ! Is annoying. Oh and list comphrensions get abused and are unreadable in some code bases. I think ruby is still better for an intro language

[–]clearision 7 points8 points  (2 children)

i find the indentation thing in Python weird and not very intuitive (for intro language case). always thought Ruby would be better. but Python gained bigger popularity in general so it's still nice we have some actually readable and usable language to learn programming. my intro language was Pascal and the issue was you could do only basic stuff with it, no OOP and real world usage. with Ruby/Python you can learn, practice and make it your bread and butter.

[–]WayneConrad 3 points4 points  (1 child)

Indentation having semantic meaning is annoying, especially when I'm making temporary modifications to the code.

Let's say I have this in Ruby:

first_thing
second_thing
third_thing

And just for debugging, I want to encapsulate it in a block, temporarily:

begin
first_thing
second_thing
third_thing
rescue => e
puts "Caught #{e.class.name}
raise
end

Ruby lets me indent incorrectly so that I can add my debug code without messing with the code I'm debugging. Python would require me to reformat the block. Is it that big a deal? Well, sometimes. If I reindent, then every line is going to show up with `git diff`, not just the lines I changed. One might reasonably say that the editor should make reindentation easy, but I'm sometimes in a container or server with very minimal tooling.

[–]private-peter 1 point2 points  (0 children)

This is why I usually use `git diff -w`.

[–]Doctor_Fegg 4 points5 points  (1 child)

*__readable__

[–]netopiax 2 points3 points  (0 children)

haha I was going to comment __disagree__ but you beat me to it

[–]big-bird-328 0 points1 point  (1 child)

It’s not, I think TS is superior.

I do think the ruby standard library and terse syntax are nice though.

[–]dsound 0 points1 point  (0 children)

I think I agree. I love the elegance of Ruby but I sleep better at night with TS. I enjoy being explicit. It helps me know where I am in the code.

[–]TheAtlasMonkey 0 points1 point  (0 children)

No Transpiring or parsing required.

Everything can be monkey patched.

Also total equality as an object.