Filipin.eu

Željko Filipin's blog.
Home Blog Tags License

View on GitHub
30 April 2007

Everyday Scripting with Ruby by Brian Marick

by Željko Filipin

bmsft_small.jpg

I remember that I have heard at school something like this.

If you read a book and not write anything about it, it is like you have not read the book.

If you learn it at school, it must be true. Right?

I have just read Everyday Scripting with Ruby by Brian Marick. It is a good hands-on book written for people that have none or little scripting experience, but there is also useful information for people familiar with both scripting and Ruby. I am using Ruby for more than two years and I do not think that reading it was wasted time.

It starts with instructions how to install Ruby, followed with simple scripts that get more complicated. Methods, logical operators, objects, classes, modules, inheritance, regular expressions, blocks, test driven development, exceptions and other important concepts are introduced as task at hand requires.

Some chapters have exercises with solutions at the end of the book. I just love that way of learning. The new tool is introduced (whatever it is), then you are given a problem that you are supposed to solve with that tool. (It is how mathematics and physics, and of course programming, are learned.) The problem (for writer) is to find set of problems that are interesting and meaningful enough, simple at first, then more complicated, but not too complicated (so reader can solve them and have that great feeling of success), but also challenging enough. I find that Marick has done a excellent job, but quality of exercises degrades in the last few chapters (to complicated).

There are also several Ruby Facts chapters that introduce important things like arrays, regular expressions, hashes, argument lists and modules. Ruby Facts chapters are just great, and with exercises my favourite part of the book.

I was reading the book as I had time for about two weeks and of course that now I do not remember everything I wanted to write about it. I have a really bad memory. I wish I had written a sentence or two after I have finished reading for that day. Now I am smarter. I hope I will remember this when I start reading the next book.

In short, the first three parts (The Basics, Growing a Script, Working in a World Full of People) were great but the fourth part (The Accomplished Scripter) was not so interesting to me. Also, examples were great, but at the end got to complicated for my taste (I think I got lost while doing exercises for chapter 11 or 12).

tags: book