Live data from Hacker News

Ruby's exceptional creatures

exceptionalcreatures.com

131–133 of 133 posts

Re: Ruby's exceptional creatures

#131

Earlier quoted context omitted.

And thank goodness for that. It is impossible to reason about types in such monstrosities.

If when looking at the pile of regexes which is Django’s router, your thought is “good, this way I can reason about types!”, then Ruby is definitely not the language for you.

No, I just implement a custom router class as the docs suggest, and move on with my life. It’s a much better use of my time than fighting mental-masturbation DSLs.

Re: Ruby's exceptional creatures

#132
post #124
post #40

Earlier quoted context omitted.

Yes, I want to highlight what you say about large companies. ruby really shines, I think, if you are a solo dev or a small team, where everybody is on the same page and the codebase is completely understood. It is also good for libraries with a clear focus. For larger projects, it might work too, but you would need some good culture of "keep it simple" around it. A few ego-trips of supposedly smart devs and things ca…

Here we go again with the Ruby isn't suitable for large projects nonsense. Github, Shopify and Stripe seem to be managing perfectly fine with Ruby, thank you very much.

Sure, but as I said, probably not without establishing some culture around it. Just for fun, let's look at shopify's Ruby Style Guide under "General"[0]:

    Avoid mutating arguments.
    Avoid monkeypatching.
    ...
    Avoid needless metaprogramming.
    Prefer public_send over send so as not to circumvent private protected visibility.
    Write ruby -w safe code.
    ...
[0]: https://ruby-style-guide.shopify.dev/#general

Re: Ruby's exceptional creatures

#133
post #132
post #124

Earlier quoted context omitted.

Here we go again with the Ruby isn't suitable for large projects nonsense. Github, Shopify and Stripe seem to be managing perfectly fine with Ruby, thank you very much.

Sure, but as I said, probably not without establishing some culture around it. Just for fun, let's look at shopify's Ruby Style Guide under "General"[0]: Avoid mutating arguments. Avoid monkeypatching. ... Avoid needless metaprogramming. Prefer public_send over send so as not to circumvent private protected visibility. Write ruby -w safe code. ... [0]: https://ruby-style-guide.shopify.dev/#general

Every big company has (and if they don't, they should) style guides. In Ruby people tend to use something like Rubocop (which is a static code analyzer/linter) to agree on a style. That will even be added as a default in Rails 8.
Post reply on HN