I’ve just got to the end of Chapter 6 in Beginning Ruby – “Classes, Objects, and Modules”. I’d say the complexity has stepped up a gear and that leads me to question how I learn things – and by learn I really mean ‘remember’.
Let me just say again, that Peter Cooper‘s explanatory style throughout what I have read so far is excellent. He explains things very simply without being patronising and regularly reminds you of simpler point which are related and which were shown in previous chapters.
However, I do think he makes it too easy to go through large sections with many concepts without testing what you have learnt. What I would like to see after every sub-section is some kind of small exercise, with the answers at the back. Alternatively, more small tutorials to explain each individual concept with challenges to modify it to do something slightly different.
I’ve found it too easy to just read through the book and whilst I think I understand most things (okay, ‘most’ is maybe an exaggeration!) I’m never sure whether I’ve actually learnt (remembered) the concept such that I could actually use it in anger, so to speak. In fact I’d go as far as to say I’m pretty sure I haven’t in most cases.
Chapter 6 covers, amongst other things, Local/Instance/Global/Class variables, Encapsulation, Polymorphism, Module, Namespace, Mix-in, Enumerable and Comparable. At the end of Chapter 6 is a little exercise to create a text adventure-style ‘dungeon’. I went through the exercise, and yeah, I made the dungeon, but it’s hard not to when all the code is there for you. What I’m wondering is is this the best way to learn? Should I leave this chapter with the ability to go off and make a dungeon from scratch if I wanted to? I know I couldn’t. Or should I treat it as a having been introduced to these concepts and understanding (most of) them if not remembering them all?
Peter does actually set a challenge after the dungeon exercise to make it really interactive. Also, he finishes the chapter by saying he’ll assume I have a knowledge of how classes and objects work, and how the different scopes of variables work. Well… I kinda got it when I read it, but I couldn’t tell it back to you now – I don’t remember!
So, should I stop here and go through Chapter 6 a few more times (and maybe Chapter 4) until I’ve cemented it in my brain and then play around with the dungeon a bit more? If I actually could play around with the dungeon I would really know that I’ve got it all so far. This could take a while though! Worth it? I think I’ve probably answered my own question.
I wish I had a photographic memory!