When I don't understand how something works, it feels like magic to me. I don't like magic. It bugs me.
Do you know what the Ruby object model is? I've been coding in Ruby for years and only recently have I read these words. I immediately watched a couple of youtube videos about it and one thing became clear: although I can code in Ruby, I don't really know how it works. This is the kind of moment in my life when I realize there's a whole universe I haven't explored yet and my brain becomes a knowledge junkie about it. I know this is what I need to understand to get to the next level in my craft.
I'd like to take you with me on this journey of learning about Ruby. We'll be looking at it in light of how it is implemented in Ruby MRI (also called CRuby) because reading code is the only way I have to answer my never-ending questions.
The CRuby source code is complex, though. I initially wanted to write a single article about my learnings but I have so much to discover that I changed my mind. I will be writing a series of articles called Wandering in CRuby. Each article will focus on a specific aspect of the code and will be written as I learn. This is not academic material and is to be challenged. Read the code, try stuff, segfault, and try again until you feel comfortable with your understanding.
A tool can only be mastered when there's no magic anymore.
Let's get started:
- Wandering in CRuby - Introduction to objects and classes
- Wandering in CRuby - Instance variables (WIP)
- ...