"Talkative Rails"

3 views
Skip to first unread message

David A. Black

unread,
Apr 27, 2008, 9:38:02 AM4/27/08
to rubyonra...@googlegroups.com
Hi --

Please have a look at this:

http://pastie.caboo.se/187581

and tell me whether you think it's potentially interesting, useful,
cool, etc. (Line wrapping may be making it unclear, but that can be
tweaked.)

I've added some running commentary to AR::Base, so that you get a
kind of guided tour as to what's happening. I suspect that this might
be useful to people who are starting to get to know the Rails source
code. I'd like a little feedback before I go nuts with it, though.


David

--
Rails training from David A. Black and Ruby Power and Light:
INTRO TO RAILS June 9-12 Berlin
ADVANCING WITH RAILS June 16-19 Berlin
INTRO TO RAILS June 24-27 London (Skills Matter)
See http://www.rubypal.com for details and updates!

Peter De Berdt

unread,
Apr 27, 2008, 9:57:08 AM4/27/08
to rubyonra...@googlegroups.com

On 27 Apr 2008, at 15:38, David A. Black wrote:

Please have a look at this:

http://pastie.caboo.se/187581

and tell me whether you think it's potentially interesting, useful,
cool, etc. (Line wrapping may be making it unclear, but that can be
tweaked.)

I've added some running commentary to AR::Base, so that you get a
kind of guided tour as to what's happening. I suspect that this might
be useful to people who are starting to get to know the Rails source
code. I'd like a little feedback before I go nuts with it, though.

Would be great David.

Having a commented method chain would benefit plugin development as well. The Rails source is structured pretty well, but still it can be a pain sometimes finding out what the ideal plugin solution to a problem is.


Best regards


Peter De Berdt


Frederick Cheung

unread,
Apr 27, 2008, 9:57:00 AM4/27/08
to rubyonra...@googlegroups.com

On 27 Apr 2008, at 14:38, David A. Black wrote:

>
> Hi --
>
> Please have a look at this:
>
> http://pastie.caboo.se/187581
>
> and tell me whether you think it's potentially interesting, useful,
> cool, etc. (Line wrapping may be making it unclear, but that can be
> tweaked.)
>
> I've added some running commentary to AR::Base, so that you get a
> kind of guided tour as to what's happening. I suspect that this might
> be useful to people who are starting to get to know the Rails source
> code. I'd like a little feedback before I go nuts with it, though.
>

Neat! I could also see it being useful in those cases where you're
trying to trace through something weird happening in rails, and having
that output rather than just stepping through the code (mentally or
via a debugger) could be pretty helpful.

Fred

Bill Walton

unread,
Apr 27, 2008, 10:49:04 AM4/27/08
to rubyonra...@googlegroups.com
Hi David,

David A. Black wrote:
> I suspect that this might be useful to people who are
> starting to get to know the Rails source code. I'd like
> a little feedback before I go nuts with it, though.

Very cool. I think it'll be very useful in that respect, and probably in
others as well.

Best regards,
Bill

George Bailey

unread,
Apr 27, 2008, 1:23:07 PM4/27/08
to rubyonra...@googlegroups.com

On Apr 27, 2008, at 7:38 AM, David A. Black wrote:

> I'd like a little feedback before I go nuts with it, though.


I think it's a wonderful idea.

Jeremy McAnally

unread,
Apr 27, 2008, 1:40:12 PM4/27/08
to rubyonra...@googlegroups.com
This would be awesome for training. Instead of having to explain
every little detail over and over, you could cover it once and then
have your students install the plugin for when they're toying around
on their own.

Great stuff!

--Jeremy

--
http://jeremymcanally.com/
http://entp.com

Read my books:
Ruby in Practice (http://manning.com/mcanally/)
My free Ruby e-book (http://humblelittlerubybook.com/)

Or, my blogs:
http://mrneighborly.com
http://rubyinpractice.com

milann

unread,
Apr 27, 2008, 4:17:51 PM4/27/08
to Ruby on Rails: Talk
As an "advanced newbie" who is trying to get his head around the
internals of Rails right now, I have to say: this looks very cool,
indeed!

Nathan Esquenazi

unread,
Apr 27, 2008, 5:39:30 PM4/27/08
to rubyonra...@googlegroups.com
I just want to add my support behind this project. Also, may I recommend
putting it up on a public repository (ahem.. GitHub) so others can
contribute because I think the idea is of great use for newbies and
experts alike.
--
Posted via http://www.ruby-forum.com/.

AndyV

unread,
Apr 28, 2008, 1:20:24 PM4/28/08
to Ruby on Rails: Talk
I think it's a great idea on a number of fronts. In addition to the
ideas above I can see it aiding debugging where some unknown-to-us
'Rails magic' jumped in at an unexpected place.

Thanks to you and a few others, I also spend a fair bit of time
reading through the Rails source and I can see your talkative rails
comments helping to illuminate some of the more esoteric code.

I'm sure you've already considered this but the one thing I'd want to
make sure is that I could turn the feature on and off. I'd be
concerned about the logs getting populated with the ARec::Base
comments. Even if they were only 'on' in development they could
potentially mask bottlenecks when you're trying to tune the app.


Great work (again)!

On Apr 27, 5:39 pm, Nathan Esquenazi <rails-mailing-l...@andreas-

David A. Black

unread,
Apr 28, 2008, 2:38:21 PM4/28/08
to Ruby on Rails: Talk
Hi --

On Mon, 28 Apr 2008, AndyV wrote:

>
> I think it's a great idea on a number of fronts. In addition to the
> ideas above I can see it aiding debugging where some unknown-to-us
> 'Rails magic' jumped in at an unexpected place.
>
> Thanks to you and a few others, I also spend a fair bit of time
> reading through the Rails source and I can see your talkative rails
> comments helping to illuminate some of the more esoteric code.
>
> I'm sure you've already considered this but the one thing I'd want to
> make sure is that I could turn the feature on and off. I'd be
> concerned about the logs getting populated with the ARec::Base
> comments. Even if they were only 'on' in development they could
> potentially mask bottlenecks when you're trying to tune the app.

I haven't figured out how I want to engineer it entirely yet, but I'm
leaning toward having it be either a monster plugin, or even a
separate distribution. It definitely would be engineered so that you'd
have to decide you want to turn it on, and it would mainly be geared
for use in the console (or some as-yet-unimagined visually integrated
extravaganza :-)

> Great work (again)!

Thanks!


David

>
> On Apr 27, 5:39 pm, Nathan Esquenazi <rails-mailing-l...@andreas-
> s.net> wrote:
>> I just want to add my support behind this project. Also, may I recommend
>> putting it up on a public repository (ahem.. GitHub) so others can
>> contribute because I think the idea is of great use for newbies and
>> experts alike.
>> --
>> Posted viahttp://www.ruby-forum.com/.
> >

--

Frederick Cheung

unread,
Apr 28, 2008, 5:41:05 PM4/28/08
to rubyonra...@googlegroups.com

On 28 Apr 2008, at 19:38, David A. Black wrote:

>
> Hi --
>
> On Mon, 28 Apr 2008, AndyV wrote:
>
>>
>> I think it's a great idea on a number of fronts. In addition to the
>> ideas above I can see it aiding debugging where some unknown-to-us
>> 'Rails magic' jumped in at an unexpected place.
>>
>> Thanks to you and a few others, I also spend a fair bit of time
>> reading through the Rails source and I can see your talkative rails
>> comments helping to illuminate some of the more esoteric code.
>>
>> I'm sure you've already considered this but the one thing I'd want to
>> make sure is that I could turn the feature on and off. I'd be
>> concerned about the logs getting populated with the ARec::Base
>> comments. Even if they were only 'on' in development they could
>> potentially mask bottlenecks when you're trying to tune the app.
>
> I haven't figured out how I want to engineer it entirely yet, but I'm
> leaning toward having it be either a monster plugin, or even a
> separate distribution.

Sounds like the sort of thing where git is a very good thing. The only
thing I have doubts about is the maintainability of this, as I imagine
that it would be a substantial ongoing task to keep on top of changes
to rails.

Fred

Reply all
Reply to author
Forward
0 new messages