r/ruby • • Jul 01 '22

Why is no one promoting ruby?

I'm quite curious about this.

I got into the world of Ruby about a month ago (I've been a programming hobbyist since 2018, started taking programming seriously around 2020) and coding in it makes me happy. Matz achieved his goal: A language that makes developers happy.

To say I fell in love with Ruby is an understatement,

The thing I don't get is why isn't the language being promoted everywhere? This gem of a language shouldn't just slowly fade into obscurity.

I'm surprised it isn't the defacto language beginner programmers use to learn to code. What gives?

138 Upvotes

139 comments sorted by

View all comments

23

u/[deleted] Jul 01 '22 edited Jul 01 '22

I came into ruby a year ago and noticed a couple things. The docs were confusing, as in which docs to even use. ruby-lang.org docs or ruby-docs.org ? Eventually I found the ruby official discord (which is fantastic and can be joined here https://ruby-discord.com/ ) to figure this out and was told rubyapi.org is a modern version of ruby-doc.org and ruby-lang.org was The Official Docs.

Cool, started using rubyapi.org which was much more pleasant and get a sense of the base objects.

Then I read a few good books about ruby:

  • Eloquent Ruby

  • Polished Ruby Programming

  • The Well Grounded Rubyist

These helped in many ways like getting a better understanding of duck typing and how it goes hand in hand with TDD which really started making things click, and ruby’s concept of the singleton object (not to be confused with the design pattern). And also the importance of understanding the inheritance structure including Enumerable and the behavior it endows with each, map, and select.

It’s a different OO paradigm from other languages is another one of the key pieces of rub success and obscurity. Schools don’t tend to teach a curriculum where you think of objects passing messages, instead you write to an interface for a type. So what many perceive as a “mess” in ruby with this encouragement of duck typing is actually an encouragement to do TDD! This last point is often totally missed by people outside ruby it seems to me, and frankly any ruby code without tests is crap (imo) and you don’t get ruby if you aren’t doing it that way.

There’s likely more reasons dealing with python’s overwhelming popularity (I used to use it until finding ruby and it’s object focus which I love and can’t have in Python which was never designed to work that way) and likely other factors that I’m not smart enough to think of.

But, I do love it.

7

u/pabuisson Jul 01 '22

The docs were confusing, as in which docs to even use. Ruby-lang.org docs or Ruby-doc.org? Eventually I found the ruby official discord (which is fantastic!) to figure this out and was told rubyapi.org is a modern version of ruby-doc.org, and ruby-lang.org was The Official Docs.

interesting. Since you looked into this, do you know why all these documentations co-exist, and if there are plans to keep only one of them, that would be up-to-date and nice to use? do you know why/how we ended up with the regular version, the official version, and a nicer-to-use version? (I believe rubyapi.org is a third party project?)

4

u/[deleted] Jul 01 '22

Great question. Simple answer: it's open source, so anyone can fire up docs.

Better answer, the team behind ruby-docs.org (from what I understood) is the one behind rubyapi.org and it is an attempt to migrate the docs into a modern looking frontend that also works on mobile.

The official docs are generated automatically and derive straight from the code, while the above are more curated and have slightly different wording, and nice things like if you select find_all it just takes you to select to try and cut down on some redundancy in the method names.

But, in general I was told use rubyapi.org unless you really want to stick with the ruby-lang.org docs for all you do (which is fine) or to dig more into some object hierarchy, etc.

3

u/pabuisson Jul 01 '22

Thanks for the reply. That's tricky, and what's really annoying is that most developers must type "ruby enumerable" in their favorite search engine, and land on whatever site got ranked higher. Meaning sometimes you'll land on one of these documentation sites, or another one, in a more or less random fashion.

Which, for everyone but even more for newcomers, is confusing (I got into a debate recently on twitter about the quality of Ruby documentation, and clearly, it was not highly regarded by developers from other ecosystems).

rubyapi.org is great but I rarely land on it when searching, unless I use my history and intentionally want to go there.

4

u/[deleted] Jul 01 '22

Yeah, completely agree! I'm annoyed with the docs for the same reasons and I don't think it's friendly to a newbie at all because of that.

My hope is by spreading the word for rubyapi.org and getting more users directed there it helps the page rank.

Actually, can we get that added to this subreddit in the sidebar somehow? This sub should maybe try to do a better job of helping with all this.

Links to the discords, links to the docs, explain them a bit more, make it a place to come and get all this context.

3

u/rubinick Jul 03 '22

fwiw, the ruby core and stdlib docs seem to be going through a (slow, long overdue) very big overhaul right now. the official docs still aren't half as pretty as rubyapi, or even most other languages official reference docs. But it is changing! I've made it my personal goal (half-year's resolution, ha!) to send in at least two ruby rdoc PRs per month, even if it's just fixing a typo or two.

2

u/rubinick Jul 03 '22

eg take a look at https://docs.ruby-lang.org/en/master right now. and compare it to https://docs.ruby-lang.org/en/3.1/ from six months ago or https://docs.ruby-lang.org/en/2.6.0/ from 3½ years ago. There have been big changes even in the last few weeks. And so much work still to be done.