Skip to content

Instantly share code, notes, and snippets.

@janko
Last active May 7, 2016 11:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save janko/b7e05017b616b8b20930a1133479799c to your computer and use it in GitHub Desktop.
Save janko/b7e05017b616b8b20930a1133479799c to your computer and use it in GitHub Desktop.
Response to http://bikeshed.fm/56 regarding "ActiveRecord is Reinventing Sequel"

Hey Sean,

I just encountered your "The Bike Shed" podcast, concretely number #56 where you were talking about the "ActiveRecord is Reinventing Sequel" post I wrote. I'm sorry that this post struck you as negative, and that it made you feel like I was attacking you. I admit that I did feel some negative energy while I was writing it, but I still felt like I needed to say it.

Firstly, you said in the podcast that you would like to read an article which shows parts where Sequel is better than ActiveRecord. However, I did link my previous "Ode to Sequel" post in the first paragraph of my post, and soon after added two more. So I think it's a bit unfair that I was presented as a negative person, even though previously I did write a positive (and pretty successful) article, which I did link to immediately.

To be honest, I really am entirely convinced Sequel is better for everyone, and that ActiveRecord is being developed not because it has some advantages over Sequel (I think many ActiveRecord contributors don't even know about Sequel, or at least don't realize how similar the two projects are), but mainly because it existed before and has a large community (since almost every Rubyist uses Rails). But that remains just my opinion, although I would like that you correct me if I'm wrong.

Now, regarding the reason why I decided to write another, more controversial and slightly negative article. One of the simpler reasons was that I felt a need to "prove" my opinion. In the past I read a lot of "This Worked For Me" blog posts, and while I did find them interesting and educating, they don't really push me to evaluate my current choice. I do think that most things in this world are subjective, but I also think that a lot of things are pretty-much objective. In the programming world, it often happens that tool A is better for scenario A, and tool B for scenario B. However, sometimes tool C is better for both scenario A and scenario B, because you can simply do more with it.

When I first started learning Sequel, I was finding it to be consistently better than ActiveRecord, from features to design decisions. Not just for my use case, in general. Then I felt cheated by Rails, because it's supposed to encourage the best tools. "Why is Rails promoting ActiveRecord instead of Sequel?". The reason why "the best tool" is so important to me is because, once you choose an ORM which is "good enough", later when it stops being "good enough" for your requirements you cannot really switch because there would be too much to change in your application.

Then I dug in the past, when Rails starting to work on 3.0. At that time ActiveRecord didn't yet have the chaining interface, but Sequel did. At that moment Rails could have started advising people to move to Sequel, but instead Arel was extracted and ActiveRecord "adopted" Sequel's chain API. The author was asked if he knew about Sequel, and he said yes and gave two vague reasons for this decision (see Disqus discussion). And this is what I was referring to in my tweet, not that ActiveRecord contributors are in general stealing from Sequel like you said on the podcast. It had nothing to do with you or the current ActiveRecord contributors, 3.0 was long time ago. I'm all for being inspired by other projects, but it has to make sense.

In our Twitter discussion, I didn't feel like I deserved that my blog post is called "bile". A lot of people found it interesting, including Avdi Grimm who tweeted about it. Also, you told me that "Not a single feature listed in my article was because "we tried but it was hard to add"". But I recently encountered your "Rails 5 features you haven't heard about" talk, where among other things you talked about how ActiveRecord::Relation#or was difficult to design. And ActiveRecord::Relation#or was literally the first on my list, so what you told me wasn't true.

I'm sorry I offended you, it wasn't on purpose, but you also returned. I hope that you now better understand my point of view on this topic.

Regards,
Janko

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment