Ruby: Initial thoughts
Along these past 6 years I have worked with Java, C#, Apex and then some Javascript since, obviously, nobody can escape JS. Except for the latter, most of my experience comes from strongly typed languages that look somewhat similar.
This week I started learning Ruby. Initially, I started with a coding kata but then I took on the classic Tic-Tac-Toe game. My first is impression was something along the lines of “… what kind of monster is this?”, but as I got more comfortable, I must admit that the development was pretty smooth. In just a couple of hours, I had already developed most of the main logic for the game which, even though the game is easy, surprised me.
Ruby is a loosely typed language and for those who come from the strongly typed world, like me, at first glance, it feels strange. It feels like a kind of wannabe JS and Java at the same time, but as lines get written, you eventually realise it just has its own expressive style. It has its own way of implementing encapsulation, not with visibility words like public or protected, but by inherently making everything private and forcing you to create methods to give access to the attributes.
As of today, I wouldn’t commit to say if I like or not Ruby, but I can commit to saying that I’ve found it interesting in ways that I hadn’t thought of. For example, this afternoon, as I was exploring the packaging options with bundler
and rbenv
I was surprised at how lightweight and easy to pick up they were. I did come against a steep curve during the initial configuration, but afterwards, it worked like a breeze.