Review of "Everyday Scripting with Ruby"

Oakland.pm

Reviews

Review of "Everyday Scripting with Ruby"

author: Brian Marick

reviewer: George Woolley

Title:  Everyday Scripting with Ruby
Subtitle: For Teams, Testers, and You
Author: Brian Marick
Pages: 320
ISBN:	0-9776166-1-4
Publication Month: January 2007
Publisher: Pragmatic

Note

Short Review

Smiley Rating: :) :) :) of 5

This book is a concise introductory tutorial for Ruby with an emphasis on testing.

Ruby is an object oriented, dynamic language that is available for most operating systems. It's fairly easy to learn it.

I suggest visiting your favorite local technical bookstore and taking a look at this book if:

  • you are considering learning Ruby.
  • or you are seeking a relatively easy language to write code in.

If you want more detail from me, see my somewhat longer review.

-- George Woolley of Camelot.pm and Oakland.pm

Miscellaneous

Chapter Titles

  • Introduction
  • Getting Started
  • A First Script: Comparing File Inventories
  • Ruby Facts: Arrays
  • Three Improvements and a Bug Fix
  • Ruby Facts: If, Equality Testing, and Unless
  • The Churn Project: Writing Scripts without Fuss
  • Ruby Facts: Booleans
  • Our Friend, the Regular Expression
  • Ruby Facts: Regular Expressions
  • Classes Bundle Data and Methods
  • Ruby Facts: Classes (with a Side Order of Symbols)
  • Scraping Web Pages with Regular Expressions
  • Other Ways of Working with Web Applications
  • Working with Comma-Separated Values
  • Ruby Facts: Hashes
  • Ruby Facts: Argument Lists
  • Downloading Helper Scripts and Applications
  • A Polished Script
  • Ruby Facts: Modules
  • When Scripts Run into Problems
  • Frameworks: Scripting by Filling in Blanks
  • Discovery is Safer Than Creation
  • Final Thoughts

Notes

  • To view the full table of contents, visit the Pragmatic catalog entry for this book. You'll find a link to the full table of contents there.
  • After the first two chapters, the chapters are grouped in four parts: The Basics (chapters 3-6), Growing a Script (chapters 7-12), Working in a World Full of People (chapters 13-21), The Accomplished Scripter (chapters 22-24).

On Line Watch

Safari

When I checked (2007-03-23), this book was not on Safari Tech Books Online. :( Actually, I didn't see Pragmatic listed as a publisher with books on Safari.

Pragmatic

You might wish to check out the Pragmatic catalog entry for the book. Among other thing, you'll find links to

  • the table of contents
  • the introduction
  • an excerpt from a sample chapter

You'll also be able to download the examples; I did.

Pragmatic has also published a number of other Ruby and Ruby related books. You'll find information about those books on their site.

The one I'm most interested in is Programming Ruby, 2nd Edition. The first edition is available online.

Searches

If I didn't quickly find what I was looking for in the book, I often found it with a search. A few example searches follow:

  • ruby "at sign"
  • ruby "return value"
  • ruby reflexive -film -anthropology
Some Other Links

Some sites I found particularly useful are:

I also found this page useful:

Somewhat Longer Review

Contents

The Title

Everyday

"Everyday" here modifies Scripting. I understand it to indicate that the Scripting is the kind you are likely to do day to day.

Scripting

Scripting I take to be synonymous with programming but with the connotation that it's not too difficult.

Ruby

Ruby is a programming language which:

  • is object oriented
  • is interpretive
  • is reflexive
  • is expressive
  • incorporates the features of many other languages
  • is open source
  • is available for many operating systems (e.g. Unix, Linux, Windows, BeOS, etc.)
  • is dynamically typed
  • is easy to read and write

If you don't know what some of the above means, no problem. You can just focus on the last item in the list:

  • is easy to read and write
Does the Title fit the book?

Yep. This book is for sure about programming in Ruby. And programming in Ruby should be way easier for you than programming in many other languages. This book does appear to be aimed at preparing you for the kind of Ruby scripts you're actually likely to create.

About the Reviewer

Language Experience

I've made significant use of more than 20 computer programming languages.

Reason for Considering Ruby

My favorite computer language has been Perl ever since I was exposed to it in 1994. But I find Perl 5's OO awkward at best.

I find Perl 6 intriguing. It looks like it will have many features I'd like, be simple to get started with, and still have the Perl feel. Unfortunately, I'm beginning to suspect it will never be completed.

That's why I'm interested in Ruby. That and because I favor dynamic open source languages.

Didn't Follow Directions

I didn't read the book as it was intended to be read. My aim was to learn Ruby well enough to use it a little and well enough to decide if I wanted to put a significant effort into learning more Ruby. I focused mostly on the early chapters and the Ruby Facts chapters.

Expectations

My expectation was that

  • I'd be able to learn the basics of Ruby from the book.
  • I'd be able to write some simple Ruby scripts.
  • I'd be able to learn enough to decide if I wanted to learn more Ruby.

Also, my expectation was that these things would not be very hard to do.

What You Get

Pages

The book is 320 pages long and that's including both front matter (e.g. title page and table of contents) and back matter (e.g. appendixes and the index). It also includes

  • some blank pages
  • and some pages that contain just a part title.

Chapters

There are 24 chapters. The longest chapter is 27 pages long; the shortest chapter is just two pages long; the average chapter length is less than 10 pages.

Ruby Facts Chapters

Some (8) of the chapter's have names that begin "Ruby Facts:". All but one of these chapter is 4 to 6 pages long.

Many of these chapters contain tables of very brief examples with similarly brief explanations of them.

Likes

Examples

I especially like the very short examples and accompanying brief explanations in the Ruby Facts chapters. I found them invaluable in learning Ruby basics. :)

Learned Enough Ruby

I like that I was able to learn enough Ruby to write some simple Ruby scripts. :)

I was able to learn enough to decide that Ruby interests me. :) :)

Length

I like that the book is short. :)

Tests First

I like that the author encourages the reader to write tests first. This approach, which I was exposed to before reading this book, has certainly made my program development easier. :)

Gripes

Sometimes Not Clear

I didn't think the author was always clear. :(

For example, I was unclear about the significance of an "at sign" in Ruby. I thought I'd discover the significance by either

  • following the page references to @ in the index
  • or rereading the Ruby Facts chapter on classes.

Neither led to the knowledge I sought.

Fortunately, doing some web searches uncovered a specific statement about the significance of the at sign. :)

Not Convincing On Approach

The author didn't convince me to use the book as he suggested. :(

I'm a bit of a contrarian, so maybe that's it. On the other hand, I almost always follow the author's lead.

No Laughs

While reading the book, at no time did I laugh (or even chuckle). :(

However, it's not like the author is completely dry. Actually the text is generally quite readable. :)

Who's the Book for?

For

Programmers

The book would be good for a relatively experienced programmer who:

  • wants to learn some Ruby
  • and is creative and flexible in his/her approach to learning

The book might also be good for someone with little or no experience programming. Because of the way I used the book and because I'm an experienced programmer, I'll not give an opinion.

Testers

The book would likely be good for a tester who wanted to learn Ruby. Hey, the book was originally written for testers.

Not For

The book would not be good for someone who

  • is not interested in learning a dynamic language
  • or is unwilling to put any effort into learning a language

Final Thoughts

If you want to learn a fairly easy to learn programming language, you may wish to visit your technical book store of choice and take a look at this book.

Complete and on the Web: 2007-04-05d

Draft Status removed: 2007-04-07