From: John Cusick Date: 2000-12-28T00:40:02+09:00 Subject: [ruby-talk:8117] Re: Code examples in the pickaxe book [long] In article , "Dave Thomas" wrote: > > A couple of people have mentioned here that they're having problems > because they're typing in code from the book, and some of the code > fragments aren't self contained. > ... Dave, I am sometimes one of those people, particularly since I'm not a professional programmer. I've read through your examples and understand that these are only fragments. Sometimes, though, I take a break and I'm not sure how far I need to go back when I miss something, as my post and followup last night mentioned. (I also don't like those 24 hours books - it's "cut and paste" learning, which isn't learning at all). As long as people don't mind helping on this list, I don't see a problem at this time. Maybe when the second edition comes out :-), an occasional caveat wouldn't hurt, such as on page 24, " Because this is such a common idiom, Ruby procides a convenient shortcut: attr_reader creates these accessor methods for you" The additional caveat might say: "Without forgetting the initialization method", or somesuch. I actually didn't try the code above to save some typing, and probably would have figured it out there, but I was in a hurry (my follow-up post explained what I tried before I wrote the group - it wasn't good enough because I refered to the example above without trying it, again). All in all, I like this book, it reminds me of "Thinking In Java" (I don't have the authors name in front of me). Maybe his method of code might help. Sincerely, John C.