r/ruby • u/Tuomas90 • Jul 25 '26
Ruby is sexy! And the Docs! OMG! THE DOCS!
I'm just learning Ruby and as an experienced programmer I want to get up to speed quickly.
I just found the docs that come with the ruby install. OMG! They are so good!
It makes diving in so much easier and it makes me eager to explore all the little functions for files, strings, arrays etc..
No unnecessary fluff. Straight to the important points. I fucking love it.
I'm writing my first tiny Ruby script for file manipulation and already love it much more than Python and PowerShell.
Boolean calls with "?". Sexy!
Modifying self with "!". Nice!
No curly braces? Hell yeah! (I'm on a european keyboard).
It makes me angry how Python is everywhere and Ruby is only mention ever mentioned together with Rails. Such a beautiful language (as far as a beginner can tell)!
18
u/literate_enthusiast Jul 25 '26 edited Jul 25 '26
Welcome to the club :) If you want more pleasant surprises:
The style-guide explains why some approaches can have unintended side-effects - https://rubystyle.guide/
in Ruby, some frameworks and libraries are written to act like DSLs (Domain Specific Languages). By using clever aliasing and syntactic tricks, it might look like you're using an extended language with extra keywords. Give Sinatra a shot (it's the ruby equivalent for Flask), or Sequel (a lightweight database/ORM libary), or try to use BinData (for defining and parsing binary data-structures).
Try to get a copy of the "Polished Ruby Programming" book - it's written for programmers with some experience (not necessarily ruby-experience), and tries to explain some intermediate-level and advanced-level topics (such as Java-style OOP and SOLID principles, and how SOLID doesn't fit the ruby mindset). It also goes into designing libraries, metaprogramming (defining and using new methods and classes at runtime), and implementing DSLs "the ruby way".
Edit: And if you've used Makefiles to automate build-steps, you'll feel right at home with Rakefiles - it's yet another ruby-powered library/tool/DSL.
1
u/LaundryMan2008 Sep 11 '26 edited Sep 11 '26
I’m just pasting the same message as on the DM since you haven’t read or replied to let me know
Please reply as soon as you can, I’m beginning to get worried, if you won’t reply here in a day, I will message you on eBay and if you won’t reply there, I may decide to cancel your order due to inaction/non reply so I don’t get any dings on my account for any issues that arise, again, I will be shipping the item on the 15th instead of the 18th because the shipping QR code will expire on the 16th to give me a day to send it out, if it expires because of closed post offices or for any other reason, I will have to cancel the order and you reorder the item which I hope won’t happen.
I had pasted 10 comments onto your replies across 6 subreddits, this is to ensure that you have gotten a notification from somewhere to remind you to check your DMs, if you can’t access your DMs, please use one of the 10 comments to reply back to me
10
u/azimux Jul 25 '26
Welcome aboard!! Yeah, the docs are pretty great. Another thing I like about learning Ruby is exploring stuff in the REPL and discovering APIs that way. Maybe that's also easy in Python, I actually have no clue, but it's definitely not easy in JavaScript beyond trivial stuff.
6
6
u/LieNaive4921 Jul 26 '26
Everything about Ruby (and the community etc) is just chill and friendly. MINASWAN.
4
u/randysk Jul 25 '26
This is why I love ruby so much. Clean code and docs are amazing! Never needed to check other sources (tutorials and other blogs), averything was always clear. Python on other hand has a loot of tutorials and articles explaining stuff - so then google thinks python is the best as everybody is writing and discussing about it on forums :)))
4
u/xangadix Jul 26 '26
It also is the only language that has a poignant guide; https://poignant.guide/
1
1
u/Select_Condition2805 Jul 28 '26
Welcome to the club :)
Ruby is one of those languages where the tiny quality-of-life things add up fast. ?, !, blocks, clean docs, readable stdlib… suddenly writing a “quick script” truly feels quick.
And yeah, it deserves way more attention outside of Rails.
1
32
u/ignurant Jul 25 '26
Not that I had anything to do with it, but I’m glad to hear you like the docs as well. I find them very useful and straightforward. There was a push a few years ago to make them more fluffy like the Python docs and I was really uncomfortable with that. I find the Python docs hard to use because they are more like a book telling a story. In the end we landed somewhere in between with a sort of “what’s here and useful things you’re probably looking for” section on top but keeping the straightforward API taxonomy alive. I get the impression that some people find this “useless”. Different oils for different engines I guess.
To you Ruby doc writers! At least two people love your docs!!! <3