Thursday, June 15, 2006

Memorizing Ruby

I've never been a professional programmer. I hack in my off time and occasionally do some programming in support of my day job. I've worked with a lot of programmers though, and I often pick up ideas from them, or see them exercising skills in ways I want to emulate. Recently, I've seen something else I want to do.

We just hired a programmer here at work. He's a bit new to Ruby, but he's already hard at work turning out some system monitoring and recovery scripts or us. One of the things He's doing is memorizing the Ruby core classes. Both what classes are available and the methods and their signatures.

I've never worked like that. I just use the language, looking up what I need to, until parts of it become second nature to me. That leaves me with some pretty incomplete coverage. To make matters worse, If I don't keep using the knowledge I've gained, I'll forget it.

Memorizing these classes and methods doesn't seem like a bg investment, but I can already see the dividends it's paying off for him. I guess it's time to whip up some flash cards and get to work.

5 comments:

Anonymous said...

here are pictures of te hierarchy (in the OP and comments)

http://www.rubyinside.com/diagrams-of-rubys-class-hierarchies-48.html#comments

Anonymous said...

Sorry, let me try again


relevant (I hope) pictures of hierarchy)

gnupate said...

Anonymous, thanks for the link. Having a structure around the memorization is always a good idea.

Hans, that's good advice. I find that a single read through might or might not help me remember (especially at the level of detail I'm looking for). I'm interested in seeing how much memorizing (or trying to memorize) will help.

Is it for everyone? Probably not. Is it worth trying for me? Absolutely.

Anonymous said...

What I find really useful for me when learning a new language or just trying to improve my skills with ones I know is not to read language specs but to read code.

Manuals and class diagrams aren't nearly as good at expressing how things are actually used as real code is. When reading code, you pick up idioms and patterns that you just can't get any other way.

Anyway, this is certainly not to discourage you from memorizing class hierarchies, since that would doubtlessly improve your programming facility. It's no substitute for reading good code, though.

gnupate said...

Levi,

Great point! Code reading (and writing) are huge parts of learning to program proficiently. What Ruby code have you read recently?