7 ms·
I have a love hate relationship with rails. I think rails is quite powerful and great for prototyping. But I’ve noticed lots of rails developers optimize so he
by mostertoaster 2y ago
I have a love hate relationship with rails.
I think rails is quite powerful and great for prototyping. But I’ve noticed lots of rails developers optimize so heavily for making things DRY, they make the most hard to debug monstrosities full of meta programming all so they could write a thing one one line of code instead of 3.
Still for starting out it’s pretty awesome.
If your company grows enough that you have legacy data models that no longer fit the designs demanded by customers -
First: congratulations, that is awesome.
Second: you are either going to want to be very careful how you add new things to your legacy data models, and how you define your boundaries, OR consider migrating off rails. If you start just slapping things on whatever data model is most convenient, to keep up with demands from product, you are going to be in a world of hurt that will take exponentially longer and longer to get out of.
- jrochkind1 2y ago> DRY, they make the most hard to debug monstrosities full of meta programming all so they could write a thing one one line of code instead of 3. I feel like this is one of the mistakes that many developers make, and it's achieving a kind of wisdom to eventually realize it -- that optimizing for DRY above all else creates a mess. I've definitely seen this done in many languages, but I've been mostly using ruby so much these days that I can't actually compare. Do any people who do have deep experience on multiple platforms (these people are few and far between) find this problem is worse in ruby than other places? Maybe it's that ruby gives you tools such that when you do optimize for DRY abstraction above all else you create a bigger mess, compared to other platforms?
- cplanas 2y ago> I’ve noticed lots of rails developers optimize so heavily for making things DRY, they make the most hard to debug monstrosities full of meta programming all so they could write a thing one one line of code instead of 3. I think that was definitely the case some years ago, but the Ruby community has matured since then. Meta programming is a bit looked down upon, these days.
- mostertoaster 2y agoOh yeah totally. Our linter definitely discourages it. I still see a false equivalency in the ruby community that verbosity == complexity, that tends to make super complex abstractions and DSLs in order to make the consumption less verbose, that then say “see how simple this is to use” Because rails does such a good job in their DSL, I think I understand why that tendency exists. But rails under the hood is quite complex, and most DSLs are no where near as well thought out. Maybe I have Stockholm syndrome, because I hated ruby coming from a nearly all c style language background at first, but I honestly think it is pretty cool now. I think a lot of issues come from people wanting to do things in ruby like they would in C# or Java.