(no title)
solnic | 4 years ago
I provide critique that some (probably many) Ruby developers don't like and disagree with but my intention isn't to bash something and make it "all bad". I don't recall saying that everything involving Rails is bad and wrong. I had conference talks sharing my appreciation for Rails and various parts of its philosophy that I agree with and try to incorporate in my own projects. There are also things I don't like that are very problematic and I share this with the community as well.
> I want Ruby ecosystem, where everybody is free to do their things the way they want, by the rules they want, for whatever motivations they have.
Imagine a ruby gem that becomes super popular because it provides some neat features that plenty of companies can benefit from. Then, for whatever reason, this project introduces some great performance optimizations but they are achieved through monkeypatches. Unfortunately it turns out it breaks Rails in some weird, subtle ways, that are hard to debug. Rails core teams starts getting lots of bug reports about some seemingly unrelated problems, just to realize that it's not a problem in Rails, it's a problem in another library.
Does this make any sense? Nope. That's why people don't monkeypatch in their libraries.
From what I gathered, there's some initiative to move Rails to use Refinements via ActiveSupport, if this happens, then the problem is solved.
> And i'm willing to let you have your way and i will respect it but only if you can do the same without being negative about it in every other statement.
It's interesting that you mention respect here - ActiveSupport doesn't respect the rest of the ecosystem. By simply adding new methods to Kernel, Object, NilClass, it reserves them and you really want to avoid having same methods in your library. If you want to tell me "but nothing prevents you from doing this" then you're right, except that I have to think about this because if my lib doesn't work with Rails well, I might as well not build it in the first place because adoption would be non-existant.
masa331|4 years ago
Yes, maybe that is the thing, i don't like critics. The approach i prefer is to put your money where your mouth is. Why don't you to build this version of ActiveRecord using refinements? Then let others see how good it is
> Imagine a ruby gem that ... Does this make any sense? Nope. That's why people don't monkeypatch in their libraries.
This can happen any day because of infinite types of mistakes a programmer can make. Monkey patching is just one technique you have at your disposal and as with everything else, you have to know when to use it, how and why.
> It's interesting that you mention respect here - ActiveSupport doesn't respect ...
What do you mean doesn't respect? ActiveSupport is a tool without feelings and stances and believes. You can either use it or not use it. And actually i want ActiveSupport to do exactly what it does, patch all the things and give me tons of nice methods i need.
Yeah, so if you want your library to work with Rails, because *you want* Rails users adopt your lib, you have to make some effort right? Well that's how it works with anything. If you don't like it for whatever reason why don't you find some place where they do it exactly your way, or why don't you build it? I mean i like the way how Rails and the other things around work and that's why i use it. So if you want adoptions for your library from me, you have to kind of a do it the same way.