Ruby’s Building Blocks

Building Blocks

'Building Blocks' by Flickr user Artful Magpie

So I’ve just finished Part 1 of Beginning Ruby – “Foundations and Scaffolding”.

Chapter 1 just tells you how to install Ruby. I already had it installed so I was able to skip most of it. The explanations do look fairly idiot-proof so it would have been at my level if I hadn’t already installed it, when I was messing about with some other idiot-proof guide.

Chapter 2 is explaining some of the basic concepts about Ruby and why these make it a great programming language. As I previously had no concepts about any programming language it was not a hard sell. I buy it – Ruby rocks not only because Ruby is a nice word, it also rocks because of “Object orientation“. Basically everything is an Object, and for reasons that are not yet entirely apparent to me, that rocks more than a very rocky thing.

Other concepts that are explained include Class, Variable and Method. I did actually feel like this chapter laid a pretty good foundation for me, and I “got it” better than when I was reading through the other e-book guide.

Chapter 3 started getting deep. It covers the important building blocks of Ruby. I’ve read this one twice as it’s pretty difficult to get it all first time. The concepts it introduces include: Regular Expressions, Arrays, Hashes, Code Blocks, Ranges and Symbols. Even on a second read I’ve probably only got about 20-30% of that stuff locked in my head, but hopefully it will become reinforced as I go in to Part 2.

In Chapter 4 you build a little text analyser application in to which you can plug any passage of text and it tells you number of words, sentences, ‘interesting sentences’ etc. It’s a nice little exercise but I wonder how much I just copied code like a robot and how much I really learnt from it.

Chapter 5 steps back for a minute and takes some time to explain the history of Ruby and introduces you to some of the ecosystem – blogs and forums that are good resources to learn more about Ruby. I joined up to the Rail Forum, because according to the book it is “particularly friendly to beginners”. I’m going to need friendly….

Tin robot

'Tin robot' by Flickr user Glamhag

If I’ve got one criticism of the book so far, it’s probably that it needs to have some small exercises to do to make sure concepts are actually being understood and remembered. It explains things in such a clear way that it’s a shame I can’t go off and try some immediately related challenge with the answer at the back of the book with an explanation. I’m worried that the code that I have created, such as the analyser, I just did robot-style. I know there are various “Ruby exercise” websites, so I’ll maybe try them later and link to them when I do.

On with Part 2. Apparently by the end of part 2, I’ll be able to “develop Ruby applications complete with complex class and object arrangements of my own; know how to test, document, and deploy them; and use databases and external data sources to feed you applications.” Ummm…. I wouldn’t be so sure… GULP!



Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: