From: "David A. Black" Date: 2009-07-15T06:36:54+09:00 Subject: Re: Twelve rules of Ruby Hi -- On Wed, 15 Jul 2009, Ian Hobson wrote: > Joel VanderWerf wrote: >> Rick DeNatale wrote: >>> On Tue, Jul 14, 2009 at 11:46 AM, David A. Black >>> wrote: >>>>>> Objects don't "have" methods >>> First of all, as you just stated, object DO in a sense have methods, >>> in the same sense I have, say, an iPhone, because I know how to find >>> it, usually. >> >> Yep. You said it better than I was about to (not just this line, but the >> whole post). I was going to say "people don't 'have' bank accounts; they >> have the intelligence to perform transactions by visiting a web site and >> entering a password. >> >> As you say, the location of such intelligence is a question that can wait >> until someone starts poking around in the interpreter. >> >> For a beginner, it's more important to have a _model_ of how method lookup >> works (model in the sense of science, not rails). If the easiest way of >> stating this model is in terms of what methods an object has (and what >> class they were acquired from), so be it. >> > Hi Joel, > > I agree that a beginner needs a model. It is (IMHO) more important that the > model helps him achieve his goals, than is accurate to the Nth degree. A > rule of thumb - it must not miss-lead. A lot of what's involved in teaching, too, is deciding what *not* to say. I think that for many people, when they first try teaching, there's almost a feeling of guilt if something occurs to them, in the course of explaining something, that's sort of relevant but really tangential and they don't say it. But of course if you do say everything, the student can't tell that some of it is -- so to speak -- in parentheses. There's an art to cutting yourself off and keeping to the main path (knowing, of course, that other things can be revisited later). > The art of learning is to update your models as you need them updating, so > you are neither miss-led by their shortcomings or tricked into error. I see > the ability to help with this, as a key skill for anyone who professes to > teach or educate. Definitely. It's not the whole story, but it can be important. Another interesting point is that sometimes your models have models. For example, we're really talking about two things in this thread: the Ruby object model, and ways of framing and explaining that model so that people can understand and assimilate it. It's interesting to think about how those things interact and combine. David -- David A. Black / Ruby Power and Light, LLC Ruby/Rails consulting & training: http://www.rubypal.com Now available: The Well-Grounded Rubyist (http://manning.com/black2) Training! Intro to Ruby, with Black & Kastner, September 14-17 (More info: http://rubyurl.com/vmzN)