How does ActiveRecord#find work?
omniref.com
omniref.com
It's trying to build an AST for every query, and that AST uses Arel, which is its own, complex layer of abstraction. There are a lot of layers of turtles before you get to anything that looks like SQL.
All of this is to say that it would be neat to see this journey go even deeper!
http://tenderlovemaking.com/2014/02/19/adequaterecord-pro-li...
It's the `s = find_by_statement_cache[key] || ..` statement.
The publishing of code-as-narrative or code alongside narrative is something that will slip into the mainstream, maybe in our lifetimes.
Already, ruby code (and other similar languages) are nearly understandable by non-technical folks. And consider the popularity of tools like cucumber that involve tests that are readable by anyone.
Imagine a day when code is published on the New York Times homepage, alongside some Silicon Valley luminary's commentary.
It's great that the site supports such deep linking.
Doesn't your suggestion harm the UX for the person who has spent the minute or two required to figure out how to operate the site?
Even from my very first visit earlier today, I found great value in being able to read the annotated code and the annotation simultaneously.
I just posted a question: https://www.omniref.com/ruby/gems/activerecord/4.2.0/symbols...
I see that it popped up under recent questions on the home page. Once a question gets bumped off that list, is there an easy way to find it (e.g. through search) or can one only find it if they happen to be viewing the Q&A tab under the same file?
Since this is my first question there, I'm not sure if I have to check back repeatedly for answers or if I'll get notified somehow.
(seriously, though: vote registered for Java as our next language.)