"Talkative Rails"

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

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

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

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

I think it's a wonderful idea.

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

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!

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.

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)!

Hi --

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 :slight_smile:

Great work (again)!

Thanks!

David

Hi --

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