Ruby is currently one of the most fashionable and modern languages to program in. Ruby is synonymous with the Rails framework, which is a robust and deep framework used to prototype and then build stable and scalable web applications. Of course, Ruby has considerable potential in its own right. The book "Ruby by example, concepts and code" by Kevin C. Baird and published by No Starch Press will help you to learn the Ruby language via small incremental example scripts.
My first impression of Kevin C. Baird’s book was quite positive. It's a book based on examples, which incrementally introduce all the main features of Ruby. Maybe it's more for a seasoned C++ or Java programmer: sometimes the examples need some basic programming background knowledge and small pinch of experience.
An example based book that incrementally introduces all the main features of a newly introduced to programming language
The contents
With a well-rounded 312 pages, the book is the right size: it's not too long (so doesn’t risk losing the reader to obscure detail) and it’s not too short (so doesn’t miss fundamental and crucial structural points). With a Java 1.4, Perl 5, C programming background I saw many similarities and areas of resonance.
The thirteen chapters contain well thought out mini programs. Straight to the point, the first chapter mentions the most important tool: the Interactive Ruby shell (irb). If you have an idea or wish to verify a code snippet quickly, then the Interactive Ruby shell is a very constructive play arena.
If you have an idea or wish to verify a code snippet quickly then the Interactive Ruby shell is a very constructive play arena
There are then chapters on amusements, programmer utilities, text and number manipulation, the use of procs, HTML and XML tools, a lightning fast introduction to Ruby gems, and finally Rails. Yes, the author efficiently broaches the most significant structures at the right pace.
The emphasis of this No Starch Press book is the consistent building of the programmer’s basic knowledge of Ruby, and the examples exist primary for this purpose (which don't become a means to show off the massive potential of specific Rubygems).
I particularly enjoyed example 27, "Benchmarking and Profiling", as this raises the always-tricky balance between prematurely optimizing and postproduction nudging.
Chapters 12 and 13 dealt reasonably well with Rubygems and Rails. The book delivers enough valid information to give you the initial motivational push required to build your own first experimental Rails application.
deliver enough valid information to give you the initial motivational push required to build your first experimental Rails application
Who's this book for?
Most of the learning is done via running the code examples while reading the relevant sections. This book is aimed at highly practical people such as developers and system administrators who have basic experience of other than Ruby programming languages, but little or no knowledge of Ruby itself.
Relevance to free software
Ruby is a fully GPL compatible language which happens also to be liked by large swathes of programmers. Many free software programs use Ruby directly or in combination with the popular Rails framework.
Pros
This is a book for us generic programmers who wish to understand the fundamentals of a relatively new language via numerous examples that build up their conceptual framework incrementally over the course of the whole book.
Cons
If you are looking for a massive injection of Rails framework content then this is not the book for you. However, it makes sense to first build up your basic Ruby knowledge before digging into Rails. This book will help you do just that.
Book | |
---|---|
Title | Ruby by Example |
Author | Kevin C. Baird |
Publisher | NO STARCH PRESS |
ISBN | 9781593271480 |
Year | 2007 |
Pages | 312 |
CD included | No |
FS Oriented | 10 |
Overall score | 8 |